:root {
  --black: #050508;
  --white: #f0ede6;
  --cream: #e8e3d8;
  --accent: #c8f23a;
  --accent2: #ff5533;
  --muted: #7a7869;
  --card-bg: #0d0d14;
  --border: rgba(240,237,230,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;
}

/* CURSOR */
.cursor {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.18s ease, width 0.2s, height 0.2s, border-color 0.2s;
  opacity: 0.5;
}

/* NOISE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9000;
}

/* HEADER */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.4rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(5,5,8,0.7);
  border-bottom: 1px solid var(--border);
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}
.logo-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 0.6rem;
}
.logo-level {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-left: 0.6rem;
}

nav { display: flex; gap: 2rem; align-items: center; }
nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
nav a:hover { color: var(--white); }

.nav-cta {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  background: var(--accent);
  color: var(--black) !important;
  padding: 0.55rem 1.1rem;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav-cta:hover { background: var(--cream); }

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(200,242,58,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,85,51,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240,237,230,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,237,230,0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.hero-left { position: relative; z-index: 1; }

.hero-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-tag::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.hero-name span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px var(--white);
  opacity: 0.25;
}

.hero-role {
  font-size: 1rem;
  color: var(--muted);
  margin: 1.5rem 0 2.2rem;
  max-width: 46ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  background: var(--accent);
  color: var(--black);
  padding: 0.8rem 1.8rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover { background: var(--cream); transform: translateY(-2px); }

.btn-ghost {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  background: transparent;
  color: var(--white);
  padding: 0.8rem 1.8rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--white); transform: translateY(-2px); }

/* HERO RIGHT — stats panel */
.hero-right {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.stats-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  width: 300px;
  position: relative;
  overflow: hidden;
}
.stats-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.stats-panel-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.stat-value {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}
.stat-value.accent { color: var(--accent); }

.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 0.4rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  animation: fill 1.5s ease forwards;
}
@keyframes fill {
  from { width: 0 !important; }
}

/* SCROLL INDICATOR */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  animation: bounce 2s ease infinite;
}
.scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* SECTIONS */
section {
  padding: 6rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 55ch;
  line-height: 1.7;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
  margin-bottom: 1.2rem;
}
.about-text p strong { color: var(--white); }

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.skills-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.skill-group {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(200,242,58,0.06);
  border: 1px solid rgba(200,242,58,0.14);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.skill-cell {
  background: var(--black);
  padding: 1.5rem;
  transition: background 0.2s;
  position: relative;
}
.skill-cell:hover { background: var(--card-bg); }

.skill-icon {
  font-family: 'DM Mono', monospace;
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
}

/* CONTACT SOCIAL ICONS */
.contact-social { display:flex; gap:0.75rem; justify-content:center; align-items:center; margin-top:0.5rem; }
.icon-btn {
  width:48px; height:48px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--white);
  text-decoration:none; transition: all 0.14s ease; box-shadow: none;
}
.icon-btn svg { width:22px; height:22px; fill:currentColor; }
.icon-btn:hover { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: var(--black); transform: translateY(-4px); border-color: transparent; }
.sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skill-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.skill-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

/* PROJECTS */
.featured-project {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  border: 1px solid rgba(200,242,58,0.2);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(200,242,58,0.05), rgba(13,13,20,0.92)),
    var(--card-bg);
  box-shadow: 0 18px 50px rgba(0,0,0,0.2);
}

.featured-project-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.featured-project-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.featured-project-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.featured-project-copy {
  color: var(--cream);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.featured-project-aside {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(240,237,230,0.02);
}

.featured-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.9rem;
  border-radius: 8px;
  background: rgba(240,237,230,0.03);
}

.featured-metric span {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.featured-metric strong {
  font-size: 0.92rem;
  color: var(--white);
  font-weight: 500;
}

.featured-project-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s;
  cursor: default;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(200,242,58,0.2);
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,242,58,0.4), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.project-card:hover::before { opacity: 1; }

.project-number {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.project-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

/* LANGUAGE ICONS (homepage highlights) */
.lang-icons {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}
.lang-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}
.lang-icon svg,
.lang-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.lang-icon:hover {
  /* keep a subtle lift on hover but do not change background/color */
  transform: translateY(-4px);
  border-color: var(--border);
}

/* Tech logos (skills row) - subtle hover scale */
.tech-logos .tech-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: inline-block;
  transition: transform 200ms cubic-bezier(.2,.9,.2,1), filter 200ms ease;
  border-radius: 6px;
}
.tech-logos .tech-logo:hover {
  transform: scale(1.18);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.48));
}

/* Keep language highlight icons visually stable (no scale) */
.lang-icons img {
  transition: none !important;
  transform: none !important;
}
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  background: rgba(200,242,58,0.07);
  color: var(--accent);
  letter-spacing: 0.05em;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.status-pass { color: var(--accent); }
.status-progress { color: #fbbf24; }
.status-fail { color: var(--accent2); }

/* TIMELINE */
.timeline {
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  padding-left: 2.5rem;
  padding-bottom: 3rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.timeline-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.timeline-heading {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.timeline-body {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 55ch;
}

/* CONTACT */
.contact-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(200,242,58,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.contact-email {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  margin: 1rem 0 2rem;
  transition: color 0.2s;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

/* DIVIDER */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0 3rem;
  max-width: calc(100% - 6rem);
}

/* ANIMATIONS */
.section-animate {
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* MOBILE */
@media (max-width: 768px) {
  header { padding: 1rem 1.5rem; }
  nav { gap: 1rem; }
  nav a:not(.nav-cta) { display: none; }

  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 3rem;
    gap: 2rem;
  }
  .hero-right {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.25rem;
  }
  .stats-panel {
    width: 100%;
    max-width: 420px;
  }
  .hero-name { font-size: 2.8rem; }

  section { padding: 4rem 1.5rem; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .featured-project { padding: 1.25rem; }
  .featured-project-grid { grid-template-columns: 1fr; }

  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
