/* ============================================================
   Gaurav Luthra - portfolio
   dark engineer aesthetic: phosphor green on deep ink,
   blueprint grid, mono accents, glowing telemetry charts
   ============================================================ */

:root {
  --bg: #06090d;
  --bg-raise: #0a1017;
  --panel: #0c131c;
  --line: #18222e;
  --line-bright: #24323f;
  --text: #dbe6ee;
  --muted: #74838f;
  --faint: #4a5662;
  --accent: #3ddc97;
  --accent-dim: rgba(61, 220, 151, 0.14);
  --amber: #f0b429;
  --amber-dim: rgba(240, 180, 41, 0.14);
  --font-display: "Syne", sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
  --font-body: "IBM Plex Sans", sans-serif;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #042216; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.accent { color: var(--accent); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #042216; padding: 10px 16px;
  font-family: var(--font-mono); font-size: 13px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- atmospheric background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.33;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
#grid-fx { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
body.gridfx .bg-grid { display: none; }
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  border-radius: 50%; filter: blur(110px); opacity: 0.16;
}
.bg-glow-1 { width: 560px; height: 560px; top: -180px; right: -120px; background: var(--accent); }
.bg-glow-2 { width: 420px; height: 420px; top: 50vh; left: -200px; background: #1f6feb; opacity: 0.12; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  height: 64px;
  background: rgba(6, 9, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  color: var(--text); letter-spacing: 0.02em;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }
.cursor-blink { animation: blink 1.1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--line-bright); padding: 6px 14px; border-radius: 4px;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--text);
  margin: 5px 0; transition: transform 0.25s, opacity 0.25s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0 30px; }

.section-no {
  font-family: var(--font-mono); font-size: 0.5em; font-weight: 400;
  color: var(--accent); vertical-align: 0.5em; letter-spacing: 0.05em;
  margin-right: 10px;
}
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.section-sub { color: var(--muted); margin-bottom: 36px; max-width: 640px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px;
  align-items: center; min-height: 92vh; padding-top: 110px;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
  letter-spacing: 0.04em; margin-bottom: 18px;
}
.hero-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(42px, 9vw, 104px); line-height: 0.96;
  letter-spacing: -0.02em; margin-bottom: 22px;
  background: linear-gradient(135deg, #ffffff 30%, #9fb3c2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* per-letter spans for the typewriter + cursor-reactive hero name; each letter
   carries the gradient itself so it stays visible (background-clip on a parent
   does not fill child inline-blocks) */
.hero-name .hn-line { display: block; white-space: nowrap; }
.hero-name .ltr {
  display: inline-block; will-change: transform;
  background: linear-gradient(135deg, #ffffff 30%, #9fb3c2);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-name .caret {
  display: inline-block; width: 0.5ch; height: 0.72em; border-radius: 2px;
  background: var(--accent); -webkit-text-fill-color: initial;
  transform: translateY(0.05em); margin-left: 8px;
  animation: blink 1s steps(1) infinite;
}
.hero-role { font-size: 19px; margin-bottom: 18px; color: var(--text); }
.hero-lede { font-size: 19px; line-height: 1.5; color: var(--text); max-width: 520px; margin-bottom: 12px; }
.hero-blurb { color: var(--muted); max-width: 560px; margin-bottom: 30px; }

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--text); background: var(--bg-raise);
  border: 1px solid var(--line-bright); border-radius: 6px;
  padding: 11px 20px; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  text-decoration: none; border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 6px 24px rgba(61, 220, 151, 0.12);
}
.btn-primary {
  background: var(--accent); color: #042216; border-color: var(--accent); font-weight: 600;
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(61, 220, 151, 0.35); }
.btn-icon { padding: 11px 13px; }

.hero-stats {
  display: flex; gap: 38px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.hero-stats dt {
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  color: var(--accent);
}
.hero-stats dd { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* hero visual */
.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 420px; }
.portrait { position: relative; }
.portrait img {
  width: 100%; height: auto; display: block; border-radius: 10px;
  filter: saturate(0.92) contrast(1.04);
  border: 1px solid var(--line-bright);
}
.portrait-frame {
  position: absolute; inset: -14px 14px 14px -14px; z-index: -1;
  border: 1px solid var(--accent); border-radius: 10px; opacity: 0.45;
}
.portrait::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(160deg, transparent 55%, rgba(61, 220, 151, 0.12));
  pointer-events: none;
}

.terminal {
  position: absolute; left: -72px; bottom: -56px; width: 330px;
  background: rgba(8, 12, 17, 0.96); border: 1px solid var(--line-bright);
  border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
}
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-bright); }
.terminal-bar i:first-child { background: #e5534b; }
.terminal-bar i:nth-child(2) { background: var(--amber); }
.terminal-bar i:nth-child(3) { background: var(--accent); }
.terminal-bar span { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-left: 6px; }
.terminal-body {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.75;
  padding: 14px 16px 16px; color: var(--muted); height: 184px;
  overflow-y: auto; cursor: text;
  scrollbar-width: none;
}
.term-row { white-space: pre-wrap; word-break: break-word; }
.terminal-body::-webkit-scrollbar { width: 0; height: 0; }
.terminal-body .t-key { color: var(--accent); }
.terminal-body .t-str { color: #d8e3ec; }
.terminal-body .t-cmd { color: var(--amber); }
.terminal-body .t-faint { color: var(--faint); }
.terminal-body .t-err { color: #e5534b; }
.term-line { display: flex; align-items: baseline; gap: 7px; }
.t-prompt { color: var(--accent); }
.term-input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 0;
  color: var(--text); font: inherit; caret-color: var(--accent);
}
.term-input::placeholder { color: var(--faint); }
.term-sug {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.term-opt { color: var(--muted); margin-right: 14px; cursor: pointer; }
.term-opt:hover { color: var(--accent); }
.term-caret {
  display: inline-block; width: 7px; height: 13px; background: var(--accent);
  vertical-align: -2px; animation: blink 1s steps(1) infinite;
}

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 40px; padding: 13px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; gap: 28px; width: max-content;
  animation: ticker 36s linear infinite;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  letter-spacing: 0.03em; white-space: nowrap;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- system map ---------- */
.sysmap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px 14px; }
.sysmap svg { display: block; width: 100%; height: auto; }
.sysmap-readout {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--muted);
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); min-height: 44px;
}
.sysmap-readout b { color: var(--accent); }
@media (max-width: 720px) { .sysmap { overflow-x: auto; } .sysmap svg { min-width: 700px; } }

/* ---------- stat tiles ---------- */
.stat-tiles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 26px;
}
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 16px 14px; position: relative; overflow: hidden; min-width: 0;
  transition: border-color 0.2s;
}
.tile:hover { border-color: var(--accent); }
.tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: 0.6;
}
.tile strong {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.2vw, 30px); color: var(--text); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tile span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.tile em { color: var(--faint); font-style: normal; display: block; }

/* ---------- panels & charts ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 22px 16px; margin-bottom: 22px;
  min-width: 0; /* allow grid/flex children to shrink below content width */
}
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.panel-head h3 { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--muted); }
.legend { display: flex; gap: 18px; }
.lg { font-family: var(--font-mono); font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.lg::before { content: ""; width: 18px; height: 3px; border-radius: 2px; }
.lg-commits::before { background: var(--accent); }
.lg-prs::before { background: var(--amber); }

.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: fixed; z-index: 60; pointer-events: none;
  background: #0e1620; border: 1px solid var(--line-bright); border-radius: 6px;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  padding: 8px 11px; color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 0.12s;
}
.chart-tip.on { opacity: 1; }
.chart-tip .tc { color: var(--accent); }
.chart-tip .tp { color: var(--amber); }

.panel-row { display: grid; grid-template-columns: 1fr; gap: 22px; }
.panel-row .panel { margin-bottom: 0; }

.heatmap-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 6px; }
.heatmap-scroll svg { display: block; }

.langs { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }
.lang-row { display: grid; grid-template-columns: 92px 1fr 44px; gap: 12px; align-items: center; }
.lang-row .ln { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.lang-row .lp { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-align: right; }
.lang-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.lang-bar i {
  display: block; height: 100%; border-radius: 3px; width: 0;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.stamp {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  margin-top: 18px; text-align: right;
}

/* ---------- timeline ---------- */
.timeline { list-style: none; position: relative; margin-top: 14px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--line-bright), var(--line) 85%, transparent);
}
.timeline > li {
  padding: 22px 0 22px 34px; position: relative;
}
.timeline > li::after {
  content: ""; position: absolute; left: 1px; top: 30px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(61, 220, 151, 0.5);
}
.tl-meta { text-align: right; }
.tl-date { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.tl-loc { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 4px; }
.tl-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.tl-co { color: var(--accent); }
.tl-note {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--faint);
  border: 1px solid var(--line-bright); padding: 2px 8px; border-radius: 20px;
  vertical-align: 2px; margin-left: 6px; white-space: nowrap;
}
.tl-track { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.tl-body p { color: var(--muted); max-width: 660px; }
.tl-body ul { margin: 8px 0 0 18px; color: var(--muted); max-width: 660px; }
.tl-body li { margin-bottom: 5px; }
.tl-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tl-tags span {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  background: var(--accent-dim); border-radius: 20px; padding: 4px 12px;
}

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; display: flex; flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px); border-color: var(--line-bright);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.card-tag {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.05em; margin-bottom: 12px;
}
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.card-metrics { list-style: none; margin: 16px 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.card-metrics li { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.card-metrics strong { color: var(--text); font-weight: 600; }
.card-link {
  font-family: var(--font-mono); font-size: 13px; margin-top: 16px; align-self: flex-start;
}

/* ---------- writing feature (homepage) ---------- */
.writing-feature {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 28px 30px; color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;
}
.writing-feature::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform 0.25s;
}
.writing-feature:hover {
  text-decoration: none; border-color: var(--line-bright);
  transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.writing-feature:hover::before { transform: scaleY(1); }
.wf-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: 0.04em; }
.writing-feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 23px; margin: 10px 0 10px; }
.writing-feature p { color: var(--muted); font-size: 15px; max-width: 640px; }
.wf-cta { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.writing-all {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--text); background: var(--bg-raise);
  border: 1px solid var(--line-bright); border-radius: 6px; padding: 11px 22px;
  transition: border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.writing-all:hover {
  text-decoration: none; border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 6px 24px rgba(61, 220, 151, 0.12);
}

/* ---------- consulting ---------- */
.consult {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center;
  background: linear-gradient(140deg, var(--panel), #0a1410);
  border: 1px solid var(--line-bright); border-radius: 14px;
  padding: 48px; position: relative; overflow: hidden;
}
.consult::before {
  content: ""; position: absolute; top: -120px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: var(--accent); opacity: 0.07; filter: blur(60px);
}
.consult h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 12px; }
.consult-lede { color: var(--muted); margin-bottom: 22px; max-width: 480px; }
.consult-services { list-style: none; margin-bottom: 30px; }
.consult-services li {
  padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14.5px;
}
.consult-services li:last-child { border-bottom: 0; }
.consult-services strong { color: var(--text); display: block; font-size: 15px; }
.consult-mark pre {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  color: var(--accent); opacity: 0.75; text-align: center;
}

/* ---------- honors ---------- */
.honors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.honor {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px; color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.honor:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.honor-kind {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px;
}
.honor strong { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.honor p { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 120px 24px 60px; }
.footer-eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 18px; }
.footer-mail {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(18px, 4.6vw, 52px); letter-spacing: -0.01em; color: var(--text);
  margin-bottom: 30px; transition: color 0.2s;
  max-width: 100%; overflow-wrap: anywhere;
}
.footer-mail:hover { color: var(--accent); text-decoration: none; }
.footer-links { display: flex; justify-content: center; gap: 28px; margin-bottom: 44px; }
.footer-links a { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-fine { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.footer-fine a { color: var(--faint); text-decoration: underline; text-underline-offset: 3px; }
.footer-fine a:hover { color: var(--accent); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 1020px) {
  .stat-tiles { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .honors { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 120px; gap: 64px; }
  .hero-visual { justify-self: center; max-width: 360px; }
  /* terminal flows below the portrait and centers via margin (not transform, which
     the reveal animation overrides) so it never overflows the viewport */
  .terminal { position: relative; left: auto; right: auto; bottom: auto; margin: 28px auto 0; width: min(330px, 100%); }
  .consult { grid-template-columns: 1fr; padding: 32px 26px; }
  .consult-mark { display: none; }

  .timeline > li { padding-left: 28px; }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed; top: 64px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6, 9, 13, 0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 360px; }
  .nav-links a { padding: 15px 24px; border-top: 1px solid var(--line); font-size: 14px; }
  .nav-cta { border: 0; border-radius: 0; }
  .nav-burger { display: block; }

  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .honors { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
  .hero-ctas .btn-icon { flex: 0; }
  .section { padding: 70px 0 20px; }
}
