/* =============================================================
   Anurag Pandey — Portfolio
   Aesthetic: engineering-editorial · ink & paper · single lime signal
   ============================================================= */

/* ----------------------------- Tokens ----------------------------- */
:root {
  --font-display: "Clash Display", "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --r-xl: 26px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 70px;
}

/* Dark (default / first-class) */
:root,
:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-2: #0e0e10;
  --bg-3: #141417;
  --bg-tint: #0c0d0a;

  --line: rgba(255, 255, 255, 0.085);
  --line-2: rgba(255, 255, 255, 0.16);

  --ink: #ededee;
  --ink-2: #a3a3a9;
  --ink-3: #6a6a70;

  --accent: #c6f24e;        /* text / links / hairline highlights */
  --accent-fill: #c6f24e;   /* chips, dots, primary button bg */
  --accent-soft: rgba(198, 242, 78, 0.12);
  --on-accent: #0b0c08;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 18px 48px -24px rgba(0, 0, 0, 0.8);
  --grid-dot: rgba(255, 255, 255, 0.045);
}

/* Light */
:root[data-theme="light"] {
  --bg: #f4f3ee;
  --bg-2: #ffffff;
  --bg-3: #ecebe4;
  --bg-tint: #f6f6ef;

  --line: rgba(20, 20, 14, 0.12);
  --line-2: rgba(20, 20, 14, 0.22);

  --ink: #16160f;
  --ink-2: #56564c;
  --ink-3: #82827a;

  --accent: #3f6212;        /* darker for AA contrast on paper */
  --accent-fill: #c6f24e;   /* lime fills still pop on paper */
  --accent-soft: rgba(63, 98, 18, 0.1);
  --on-accent: #0e1206;

  --shadow-sm: 0 1px 2px rgba(20, 20, 14, 0.06);
  --shadow: 0 22px 50px -28px rgba(20, 20, 14, 0.35);
  --grid-dot: rgba(20, 20, 14, 0.05);
}

/* ----------------------------- Reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.006em;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);

  /* faint engineering dot-grid */
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -16px -16px;
}

img, svg { display: block; max-width: 100%; }
svg { fill: none; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

::selection {
  background: var(--accent-fill);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* Skip link */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  background: var(--accent-fill);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font: 600 14px/1 var(--font-mono);
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ----------------------------- Layout ----------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }
.section + .section { padding-top: clamp(40px, 7vw, 90px); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.col-meta { grid-column: 1 / span 3; }
.col-main { grid-column: 4 / span 9; }

/* Section header (sticky editorial rail on desktop) */
.section-head { align-self: start; }
.section-index {
  font: 500 13px/1 var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.04em;
}
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  margin-top: 14px;
}
.section-sub {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 22ch;
}

@media (min-width: 1024px) {
  .section-head {
    position: sticky;
    top: calc(var(--nav-h) + 36px);
  }
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background-color 0.3s var(--ease),
              color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  will-change: transform;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn--lg { padding: 16px 28px; font-size: 1.02rem; }

.btn--primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px var(--accent-fill);
}
.btn--primary:hover svg { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ----------------------------- Nav ----------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.brand__mark { color: var(--accent); flex: none; }
.brand:hover .brand__name { color: var(--ink); }

.nav__links {
  display: flex;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav__num {
  font: 500 0.66rem/1 var(--font-mono);
  color: var(--ink-3);
  transition: color 0.25s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--bg-3); }
.nav__link.active { color: var(--ink); }
.nav__link.active .nav__num { color: var(--accent); }

.nav__actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: border-color 0.25s var(--ease), transform 0.4s var(--ease), background 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle .icon { position: absolute; transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); }
:root[data-theme="dark"] .icon--sun { opacity: 0; transform: rotate(-50deg) scale(0.5); }
:root[data-theme="dark"] .icon--moon { opacity: 1; transform: none; }
:root[data-theme="light"] .icon--moon { opacity: 0; transform: rotate(50deg) scale(0.5); }
:root[data-theme="light"] .icon--sun { opacity: 1; transform: none; }

.nav__resume { padding: 9px 18px; font-size: 0.9rem; }

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 17px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.4px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: var(--bg);
  padding: calc(var(--nav-h) + 30px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 11vw, 3.2rem);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mobile-menu__link span { font: 500 0.85rem/1 var(--font-mono); color: var(--accent); }
.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: 500 0.95rem/1.5 var(--font-mono);
  color: var(--ink-2);
}
.mobile-menu__foot a:hover { color: var(--accent); }

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 950;
  background: transparent;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-fill);
  transition: width 0.08s linear;
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 35%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 70% 35%, #000 30%, transparent 78%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 0.82rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 9px 15px 9px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg-2);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-fill);
  box-shadow: 0 0 0 0 var(--accent-fill);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-fill) 70%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero__name {
  font-size: clamp(3.4rem, 12vw, 8.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin-top: 26px;
  line-height: 0.92;
}
.hero__period { color: var(--accent); }

.hero__lede {
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.9vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 30ch;
  font-weight: 400;
}
.hero__lede em { color: var(--ink); font-style: normal; font-weight: 600; }

.hero__cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__meta { justify-self: end; width: 100%; max-width: 320px; }
.meta-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.meta-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.meta-row dt {
  font: 500 0.7rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.meta-row dd { font-size: 0.92rem; color: var(--ink); font-weight: 500; }

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 30px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 0.72rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.hero__scroll svg { animation: bob 2.4s var(--ease) infinite; }
.hero__scroll:hover { color: var(--ink); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ----------------------------- About ----------------------------- */
.about__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.prose { margin-top: 30px; max-width: 60ch; }
.prose p { color: var(--ink-2); font-size: 1.04rem; }
.prose p + p { margin-top: 18px; }
.prose strong { color: var(--ink); font-weight: 600; }

.stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat { background: var(--bg); padding: 26px 24px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat__label { margin-top: 8px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; }

/* ----------------------------- Experience / Timeline ----------------------------- */
.timeline { display: flex; flex-direction: column; }
.exp {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: clamp(18px, 3vw, 44px);
  padding: 34px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.exp:last-child { border-bottom: 1px solid var(--line); }
.exp::before {
  content: "";
  position: absolute;
  top: 41px; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
  transform: translateX(-2px);
}
.exp:hover::before { background: var(--accent-fill); transform: translateX(-2px) scale(1.25); }
.exp__period {
  font: 500 0.78rem/1.4 var(--font-mono);
  color: var(--ink-2);
  padding-left: 22px;
  display: inline-block;
}
.exp__role {
  font-size: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.exp__tag {
  font: 500 0.68rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 5px 9px;
}
.exp__org { margin-top: 6px; color: var(--ink-2); font-weight: 500; }
.exp__points { margin-top: 16px; display: grid; gap: 11px; }
.exp__points li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.55;
}
.exp__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 8px; height: 1.5px;
  background: var(--accent);
}
.exp__points strong { color: var(--ink); font-weight: 600; }

/* ----------------------------- Projects ----------------------------- */
.projects__list { display: flex; flex-direction: column; gap: 0; }
.project {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(34px, 5vw, 52px) 0;
  border-top: 1px solid var(--line);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project__index {
  font: 500 0.85rem/1 var(--font-mono);
  color: var(--ink-3);
  padding-top: 8px;
  transition: color 0.3s var(--ease);
}
.project:hover .project__index { color: var(--accent); }

.project__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 26px;
}
.project__title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.03em;
}
.project__kicker { color: var(--ink-2); font-weight: 500; font-size: 1rem; }
.project__date {
  margin-left: auto;
  font: 500 0.74rem/1 var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
}

.project__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  margin-bottom: 26px;
}
.project__field h4 {
  font: 500 0.7rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.project__field p { color: var(--ink-2); font-size: 0.98rem; line-height: 1.55; }

.impact { display: grid; gap: 12px; margin-bottom: 24px; }
.impact li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  font-size: 1rem;
}
.impact li:last-child { border-bottom: 0; padding-bottom: 0; }
.impact__metric {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
  min-width: 64px;
}
.impact__sub { color: var(--ink-2); font-weight: 400; font-size: 0.92rem; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.stack li {
  font: 500 0.78rem/1 var(--font-mono);
  color: var(--ink-2);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg-2);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.stack li:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-2px); }

.project__links { display: flex; flex-wrap: wrap; gap: 10px; }
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  color: var(--ink);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.3s var(--ease);
}
.link-pill svg { transition: transform 0.3s var(--ease); }
.link-pill:hover {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
  transform: translateY(-2px);
}
.link-pill:hover svg { transform: translate(2px, -2px); }

/* ----------------------------- Skills ----------------------------- */
.skills__list { display: flex; flex-direction: column; }
.skillrow {
  display: grid;
  grid-template-columns: 0.85fr 1.7fr;
  gap: clamp(16px, 3vw, 44px);
  padding: 26px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.skillrow:last-child { border-bottom: 1px solid var(--line); }
.skillrow dt {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-top: 4px;
}
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tags li {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg-2);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease), transform 0.25s var(--ease);
}
.tags li:hover {
  color: var(--on-accent);
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  transform: translateY(-2px);
}

/* ----------------------------- Education ----------------------------- */
.education__list { display: flex; flex-direction: column; }
.edu {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.edu:last-child { border-bottom: 1px solid var(--line); }
.edu__when { font: 500 0.78rem/1.4 var(--font-mono); color: var(--ink-2); }
.edu__degree { font-size: 1.3rem; }
.edu__inst { margin-top: 4px; color: var(--ink-2); font-size: 0.96rem; }
.edu__score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}
.edu__score span {
  display: block;
  font: 500 0.62rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.edu__score small { color: var(--ink-3); font-size: 0.7em; font-weight: 500; }

/* ----------------------------- Honors ----------------------------- */
.honors__body { display: flex; flex-direction: column; gap: 56px; }
.honors__label {
  font: 500 0.72rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.awards { display: grid; gap: 4px; }
.award {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 22px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.award:last-child { border-bottom: 0; }
.award__rank {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.award__rank small { font-size: 0.5em; vertical-align: super; }
.award__detail h4 { font-size: 1.12rem; font-weight: 600; }
.award__detail p { margin-top: 7px; color: var(--ink-2); font-size: 0.96rem; line-height: 1.5; }

.certs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cert {
  background: var(--bg);
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.25s var(--ease);
}
.cert:hover { background: var(--bg-2); }
.cert__name { font-weight: 600; font-size: 1rem; line-height: 1.35; }
.cert__date {
  font: 500 0.72rem/1 var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ----------------------------- Contact ----------------------------- */
.contact { padding-bottom: clamp(60px, 9vw, 120px); }
.contact__head { max-width: 24ch; }
.contact .section-index { display: block; }
.contact__title {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  margin-top: 18px;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.contact__title .accent { color: var(--accent); }
.contact__sub {
  margin-top: 26px;
  color: var(--ink-2);
  font-size: 1.08rem;
  max-width: 46ch;
}
.contact__actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

.contact__channels {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.contact__channels li { background: var(--bg); }
.contact__channels a {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px 24px;
  height: 100%;
  transition: background 0.3s var(--ease);
}
.contact__channels a:hover { background: var(--bg-2); }
.channel__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__channels a:hover .channel__icon {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
}
.channel__meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.88rem;
  color: var(--ink-2);
  word-break: break-word;
}
.channel__meta strong {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ----------------------------- Footer ----------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 36px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
}
.footer__brand .brand__mark { color: var(--accent); }
.footer__note { color: var(--ink-3); font-size: 0.84rem; }
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 0.8rem/1 var(--font-mono);
  color: var(--ink-2);
  transition: color 0.25s var(--ease);
}
.footer__top svg { transition: transform 0.3s var(--ease); }
.footer__top:hover { color: var(--accent); }
.footer__top:hover svg { transform: translateY(-3px); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 140%);
  z-index: 1000;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 99px;
  font: 600 0.88rem/1 var(--font-sans);
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
  opacity: 0;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ----------------------------- Reveal animations ----------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 1023px) {
  .col-meta, .col-main { grid-column: 1 / -1; }
  .grid-12 { gap: 20px; }
  .section-head { margin-bottom: 6px; }
  .section-title { margin-top: 8px; }
  .section-sub { max-width: none; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__resume { display: none; }
  .menu-btn { display: flex; }

  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__meta { justify-self: start; max-width: 420px; }

  .project__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .project__date { margin-left: 0; }
}

@media (max-width: 680px) {
  :root { --nav-h: 64px; }

  .stats { grid-template-columns: 1fr; }
  .certs { grid-template-columns: 1fr; }
  .contact__channels { grid-template-columns: 1fr 1fr; }
  .contact__channels a { gap: 18px; padding: 20px 18px; }

  .hero__name { margin-top: 20px; }
  .hero__scroll { display: none; }

  .exp { grid-template-columns: 1fr; gap: 10px; }
  .exp::before { display: none; }
  .exp__period { padding-left: 0; }

  .project { grid-template-columns: 1fr; }
  .project__index { display: none; }
  .project__cols { grid-template-columns: 1fr; gap: 18px; }

  .skillrow { grid-template-columns: 1fr; gap: 14px; }
  .edu { grid-template-columns: 1fr auto; row-gap: 4px; }
  .edu__when { grid-column: 1 / -1; }

  .award { grid-template-columns: 60px 1fr; gap: 16px; }
  .award__rank { font-size: 1.5rem; }
}

@media (max-width: 420px) {
  .contact__channels { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .hero__cta .btn { width: auto; }
}

/* ----------------------------- Motion preferences ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Print */
@media print {
  .nav, .mobile-menu, .scroll-progress, .hero__canvas, .hero__scroll,
  .theme-toggle, .menu-btn, .footer__top, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 24px; }
}
