/* ============================================================
   HAMZA NAEEM — robotics & AI portfolio
   ============================================================ */
:root,
[data-theme="dark"] {
  --bg: #090c0e;
  --bg-soft: #0d1114;
  --card: #101519;
  --card-hover: #141a1f;
  --border: #1c2529;
  --border-bright: #2b3a40;
  --text: #e8f0ee;
  --muted: #8fa3a0;
  --acc: #00e887;
  --acc-dim: rgba(0, 232, 135, 0.14);
  --acc-line: rgba(0, 232, 135, 0.35);
  --amber: #ffb454;
  --amber-line: rgba(255, 180, 84, 0.35);
  --grid-line: rgba(255, 255, 255, 0.072);
  --grid-major: rgba(255, 255, 255, 0.115);
  --grid-tint: rgba(255, 255, 255, 0.014);
  --glow: rgba(0, 232, 135, 0.05);
  --shadow: rgba(0, 0, 0, 0.5);
  --cloud-pt: 0, 232, 135;
  --cloud-ground: 143, 163, 160;
  --nav-bg: rgba(9, 12, 14, 0.9);
  --scrim: rgba(9, 12, 14, 0.92);
}

[data-theme="light"] {
  --bg: #f2f5f4;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #f7faf9;
  --border: #dbe3e0;
  --border-bright: #b9c6c2;
  --text: #0b1512;
  --muted: #5b6b66;
  --acc: #00915a;
  --acc-dim: rgba(0, 145, 90, 0.10);
  --acc-line: rgba(0, 145, 90, 0.35);
  --amber: #9a6100;
  --amber-line: rgba(154, 97, 0, 0.35);
  --grid-line: rgba(11, 21, 18, 0.045);
  --grid-major: rgba(11, 21, 18, 0.075);
  --grid-tint: rgba(11, 21, 18, 0.014);
  --glow: rgba(0, 145, 90, 0.06);
  --shadow: rgba(11, 21, 18, 0.12);
  --cloud-pt: 0, 145, 90;
  --cloud-ground: 120, 138, 133;
  --nav-bg: rgba(242, 245, 244, 0.9);
  --scrim: rgba(255, 255, 255, 0.92);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  transition: background-color 0.25s ease, color 0.25s ease;
}

:root {
  --font-head: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-body: "Inter", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    /* fine grid */
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    /* major grid every 4th cell — blueprint feel */
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 192px 192px, 192px 192px;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(900px 500px at 75% -5%, var(--glow), transparent 60%);
  z-index: 0;
}

.strip, .nav, main, footer { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; }

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

.accent { color: var(--acc); }
.muted { color: var(--muted); font-size: 0.9rem; }
code { font-family: var(--font-mono); font-size: 0.88em; color: var(--acc); }

::selection { background: var(--acc); color: var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); }
::-webkit-scrollbar-thumb:hover { background: var(--acc); }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ===== LEDs ===== */
.led {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: middle;
}
.led-green { background: var(--acc); box-shadow: 0 0 6px var(--acc); animation: pulse 2s infinite; }
.led-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.cursor { animation: blink 1.1s steps(1) infinite; color: var(--acc); }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Telemetry strip ===== */
.strip {
  display: flex;
  gap: 2rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.4rem clamp(1rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.strip-right { margin-left: auto; color: var(--acc); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 5vw, 3rem);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.nav-logo:hover { text-decoration: none; color: var(--acc); }

.nav-tabs { display: flex; gap: 0.1rem; flex: 1; flex-wrap: wrap; justify-content: center; }

.tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.65rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.tab-idx { color: var(--acc); opacity: 0.55; margin-right: 0.32rem; font-size: 0.64rem; }
.tab-btn:hover { color: var(--text); border-color: var(--border); }
.tab-btn.active { color: var(--acc); background: var(--acc-dim); border-color: var(--acc-line); }
.tab-btn.active .tab-idx { opacity: 1; }

/* theme toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
  width: 34px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.theme-toggle:hover { border-color: var(--acc); color: var(--acc); }
.theme-toggle svg { width: 15px; height: 15px; fill: currentColor; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.66rem 1.3rem;
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--acc); color: var(--acc); text-decoration: none; box-shadow: 0 0 18px var(--acc-dim); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--bg-soft); font-weight: 700; }
[data-theme="light"] .btn-primary { color: #ffffff; }
.btn-primary:hover { background: transparent; color: var(--acc); }
.btn-ghost { background: transparent; }
.btn-small { padding: 0.42rem 0.85rem; font-size: 0.7rem; white-space: nowrap; }

.inline-link {
  background: none;
  border: none;
  color: var(--acc);
  font-family: var(--font-mono);
  font-size: 0.82em;
  cursor: pointer;
  padding: 0;
}
.inline-link:hover { text-decoration: underline; }

/* ===== Layout ===== */
main { max-width: 1150px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); }

.tab-panel { display: none; animation: fadeUp 0.4s ease; }
.tab-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.sec-idx {
  color: var(--acc);
  font-size: 0.8em;
  border: 1px solid var(--acc-line);
  padding: 0.1rem 0.42rem;
  background: var(--acc-dim);
}
.title-note { font-size: 0.66rem; font-weight: 400; color: var(--muted); letter-spacing: 0.05em; }

.section-block { margin-top: 3.2rem; }

/* ===== Corner frame ===== */
.corner-frame { position: relative; }
.corner-frame::before, .corner-frame::after {
  content: "";
  position: absolute;
  width: 13px; height: 13px;
  border: 1px solid var(--acc);
  opacity: 0.7;
  pointer-events: none;
  z-index: 3;
}
.corner-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.6rem;
  align-items: center;
  padding: 2.2rem 0 1rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--acc);
  margin-bottom: 0.9rem;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 1.2rem;
}

.hero-lede {
  font-size: clamp(1rem, 1.9vw, 1.24rem);
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: 1.1rem;
  max-width: 34ch;
}

.hero-desc { color: var(--muted); max-width: 50ch; margin-bottom: 1.7rem; font-size: 0.92rem; }
.hero-desc strong { color: var(--text); }

.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ===== Rotating banner ===== */
.banner {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  max-width: 540px;
  width: 100%;
  margin-left: auto;
}
.banner-track { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1); }
.slide { min-width: 100%; height: 100%; position: relative; margin: 0; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* tall full-body shots: bias the crop upward so faces stay in frame */
.slide img.focus-top { object-position: center 10%; }
.slide figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #f2f5f4;
  padding: 1.8rem 0.8rem 0.75rem;
  background: linear-gradient(transparent, rgba(6, 8, 9, 0.92));
}

.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--scrim);
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  width: 28px; height: 38px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, border-color 0.15s, color 0.15s;
  z-index: 2;
}
.banner:hover .banner-nav, .banner:focus-within .banner-nav { opacity: 1; }
.banner-nav:hover { border-color: var(--acc); color: var(--acc); }
.banner-nav.prev { left: 0.5rem; }
.banner-nav.next { right: 0.5rem; }

.banner-dots {
  position: absolute;
  bottom: 0.7rem;
  right: 0.8rem;
  display: flex;
  gap: 0.3rem;
  z-index: 2;
}
.dot {
  width: 14px; height: 3px;
  background: rgba(242, 245, 244, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s;
}
.dot.active, .dot:hover { background: var(--acc); }

/* ===== Stats band ===== */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 2.6rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--acc);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== Audience router ===== */
.router { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.route {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.35rem;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.route:hover { border-color: var(--acc); background: var(--card-hover); transform: translateY(-3px); }
.route-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--acc); }
.route h4 { font-size: 1.06rem; }
.route p { color: var(--muted); font-size: 0.86rem; flex: 1; }
.route-go { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--acc); margin-top: 0.35rem; }

/* ===== Cards ===== */
.card-grid { display: grid; gap: 1rem; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.35rem;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--border-bright); background: var(--card-hover); transform: translateY(-2px); }
.card h4 { margin-bottom: 0.45rem; font-size: 1rem; }
.card p { color: var(--muted); font-size: 0.88rem; }
.card p strong { color: var(--text); }
.card-num { font-family: var(--font-mono); color: var(--acc); font-size: 0.66rem; margin-bottom: 0.7rem; letter-spacing: 0.06em; }

a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; border-color: var(--acc); }

/* ===== Interests ===== */
.interests { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.interests span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--acc-line);
  background: var(--acc-dim);
  color: var(--acc);
  padding: 0.45rem 0.9rem;
}

/* ===== Skills ===== */
.skills { display: flex; flex-direction: column; gap: 0.8rem; }
.skill-row { display: grid; grid-template-columns: 112px 1fr; gap: 0.9rem; align-items: start; }
.skill-cat { font-family: var(--font-mono); color: var(--acc); font-size: 0.68rem; letter-spacing: 0.12em; padding-top: 0.42rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips span {
  font-family: var(--font-mono);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.25rem 0.68rem;
  font-size: 0.7rem;
  color: var(--text);
  transition: border-color 0.15s, color 0.15s;
}
.chips span:hover { border-color: var(--acc); color: var(--acc); }

/* ===== Research hero canvas ===== */
.research-hero {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  height: 240px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.research-hero canvas { width: 100%; height: 100%; display: block; }
.viz-hud {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--acc);
  opacity: 0.8;
}
.viz-hud-tl { top: 0.65rem; left: 0.75rem; }
.viz-hud-br { bottom: 0.65rem; right: 0.75rem; color: var(--muted); }

/* ===== Publications ===== */
.pub-list { display: flex; flex-direction: column; gap: 1rem; }
.pub {
  background: var(--card);
  border: 1px solid var(--acc-line);
  padding: 1.45rem 1.55rem;
  transition: border-color 0.15s;
}
.pub:hover { border-color: var(--acc); }
.pub-status { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--acc); margin-bottom: 0.6rem; }

/* paper figures are white-background; give them a light plate so they read as figures */
.pub-figure {
  margin: 1rem 0 0.2rem;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 0.75rem;
}
.pub-figure img { width: 100%; max-height: 360px; object-fit: contain; display: block; }
.pub-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: #5b6b66;
  padding-top: 0.6rem;
}
.pub h4 { font-size: 1.1rem; line-height: 1.32; margin-bottom: 0.5rem; }
.pub-authors { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); margin-bottom: 0.6rem; }
.pub-authors strong { color: var(--acc); }
.pub p { color: var(--muted); font-size: 0.89rem; }

/* ===== Timeline ===== */
.timeline { display: flex; flex-direction: column; margin-top: 1.4rem; }

.t-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1.8rem;
  padding: 1.65rem 0 1.65rem 1.9rem;
  border-left: 1px solid var(--border);
  position: relative;
  margin-left: 0.5rem;
}
.t-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 2.15rem;
  width: 9px; height: 9px;
  background: var(--bg);
  border: 1px solid var(--acc);
  transform: rotate(45deg);
}
.t-item:hover::before { background: var(--acc); box-shadow: 0 0 10px var(--acc); }

.t-meta { display: flex; flex-direction: column; gap: 0.25rem; font-family: var(--font-mono); }
.t-date { font-size: 0.75rem; font-weight: 700; color: var(--text); letter-spacing: 0.04em; }
.t-loc { color: var(--muted); font-size: 0.65rem; letter-spacing: 0.1em; }
.t-status { font-size: 0.62rem; color: var(--acc); letter-spacing: 0.1em; margin-top: 0.15rem; }

.t-body h4 { font-size: 1.06rem; }
.t-org { font-family: var(--font-mono); color: var(--acc); font-size: 0.73rem; letter-spacing: 0.03em; margin: 0.18rem 0 0.7rem; }
.t-body ul { padding-left: 1.05rem; display: flex; flex-direction: column; gap: 0.45rem; color: var(--muted); font-size: 0.89rem; }
.t-body strong { color: var(--text); }
.t-body li::marker { color: var(--acc); }

/* ===== Projects ===== */
.project-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
/* Projects tab: cards differ a lot in height, so flow them in columns instead of rows to avoid empty space */
#projects .project-list { display: block; columns: 2; column-gap: 1rem; }
#projects .project-list > .project { break-inside: avoid; margin-bottom: 1rem; }

.group-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--acc);
  margin: 2.4rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.group-label:first-of-type { margin-top: 0.5rem; }

.project {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.project:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.project.featured { border-color: var(--acc-line); }
.project.featured:hover { border-color: var(--acc); }

.feature-wide { margin-bottom: 1rem; }

.project-media {
  margin: -1.35rem -1.35rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.project:hover .project-media img { transform: scale(1.03); }

/* diagrams: show the whole figure rather than cropping it */
.project-media.is-figure { aspect-ratio: 16 / 9; background: #ffffff; }
.project-media.is-figure img { object-fit: contain; }
.project:hover .project-media.is-figure img { transform: none; }

/* portrait phone video */
.video-portrait video { max-height: 420px; width: auto; max-width: 100%; margin: 0 auto; }

.video-wrap { margin: 1.1rem 0 0.2rem; }
.feature-wide .video-wrap { max-width: 720px; margin-left: auto; margin-right: auto; }
.video-wrap video {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  background: #000;
}
.media-cap {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 0.5rem;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.p-status { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--acc); }
.p-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  border: 1px solid var(--amber-line);
  padding: 0.1rem 0.45rem;
}
.project h4 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.project p { color: var(--muted); font-size: 0.88rem; flex: 1; }
.project strong { color: var(--text); }
.project em { color: var(--muted); }

.project-links { display: flex; gap: 1.25rem; margin-top: 1rem; flex-wrap: wrap; }
.project-links a { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; }

/* ===== Repos ===== */
.repo-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.55rem; }
.repo-head h4 { margin: 0; word-break: break-word; }
.repo-icon { color: var(--acc); font-size: 1rem; }
.repo-lang { display: inline-block; margin-top: 0.85rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--acc); }

/* ===== Awards ===== */
.award-list { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1.4rem; }
.award {
  display: flex;
  gap: 1.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.2rem 1.45rem;
  align-items: flex-start;
  transition: border-color 0.15s;
}
.award:hover { border-color: var(--acc); }
.award-idx {
  font-family: var(--font-mono);
  color: var(--acc);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--acc-line);
  padding: 0.12rem 0.45rem;
  margin-top: 0.2rem;
  white-space: nowrap;
}
.award h4 { margin-bottom: 0.25rem; font-size: 1rem; }
.award p { color: var(--muted); font-size: 0.88rem; }
.award p strong { color: var(--text); }

/* ===== Terminal (contact) ===== */
.terminal { background: var(--bg-soft); border: 1px solid var(--border); max-width: 740px; font-family: var(--font-mono); }
.term-bar { display: flex; align-items: center; gap: 0.35rem; border-bottom: 1px solid var(--border); padding: 0.55rem 0.85rem; }
.term-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-bright); }
.term-title { margin-left: 0.55rem; font-size: 0.66rem; color: var(--muted); letter-spacing: 0.05em; }
.term-body { padding: 1.2rem 1.3rem 1.4rem; font-size: 0.81rem; display: flex; flex-direction: column; gap: 0.5rem; }
.term-prompt { color: var(--acc); font-weight: 700; margin-right: 0.45rem; }
.term-out { color: var(--muted); padding-left: 1rem; line-height: 1.9; }
.term-out a { display: inline-block; }

.mega-mail {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 2.6rem;
  line-height: 1.05;
  transition: color 0.15s;
}
.mega-mail:hover { color: var(--acc); text-decoration: none; }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  margin-top: 2.8rem;
}

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1050px) {
  .nav-tabs { justify-content: flex-start; }
  .router { grid-template-columns: 1fr; }
}

@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-lede { max-width: none; }
  .banner { margin-left: 0; max-width: 560px; }
  .card-grid.three { grid-template-columns: 1fr; }
  .project-list { grid-template-columns: 1fr; }
  #projects .project-list { columns: 1; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .t-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .banner-nav { opacity: 1; }
}

@media (max-width: 720px) {
  .hide-sm { display: none; }
  .nav { flex-wrap: wrap; }
  .nav-tabs {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    order: 4;
    padding-top: 0.5rem;
  }
  .nav-tabs.open { display: flex; }
  .hamburger { display: block; }
  .nav-logo { margin-right: auto; }
  .card-grid.two { grid-template-columns: 1fr; }
  .skill-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .award { flex-direction: column; gap: 0.6rem; }
  .research-hero { height: 180px; }
  .banner { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .banner-track { transition: none !important; }
}

/* ============================================================
   POLISH PASS — ticker, banner HUD, latest feed, spotlight
   ============================================================ */

/* telemetry ticker */
.ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: inline-flex; gap: 3rem; white-space: nowrap; animation: ticker 48s linear infinite; }
.ticker-track span { color: var(--text); opacity: 0.75; }
.strip:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.strip-right { margin-left: 0; }

/* banner camera HUD */
.led-red { background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; animation: pulse 1.4s infinite; }
.banner-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: #f2f5f4;
}
.hud-rec, .hud-cam {
  position: absolute;
  top: 0.7rem;
  background: rgba(6, 8, 9, 0.55);
  padding: 0.18rem 0.5rem;
  backdrop-filter: blur(4px);
}
.hud-rec { left: 0.8rem; }
.hud-cam { right: 0.8rem; }
.hud-scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
  box-shadow: 0 0 12px var(--acc);
  opacity: 0.55;
  animation: scan 6s ease-in-out infinite;
}
@keyframes scan { 0% { top: 0; } 50% { top: calc(100% - 2px); } 100% { top: 0; } }

/* hero name: slow light sweep across the letters */
.hero-name {
  background: linear-gradient(100deg, var(--text) 0%, var(--text) 40%, var(--acc) 50%, var(--text) 60%, var(--text) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sweep 7s ease-in-out infinite;
}
.hero-name .accent { -webkit-text-fill-color: var(--acc); text-shadow: 0 0 24px var(--acc-line); }
@keyframes sweep { 0%, 15% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }

/* section titles trail off into a hairline */
.section-title::after {
  content: "";
  flex: 1;
  min-width: 2rem;
  height: 1px;
  align-self: center;
  background: linear-gradient(90deg, var(--border-bright), transparent);
}

/* stat tiles: accent bar fills in on reveal */
.stat { overflow: hidden; }
.stat-band .stat { background-image: linear-gradient(var(--acc), var(--acc)); background-repeat: no-repeat; background-size: 0% 2px; background-position: left bottom; transition: background-size 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.15s, opacity 0.5s ease, transform 0.5s ease; }
.stat-band .stat.visible { background-size: 100% 2px; }

/* latest feed */
.feed { list-style: none; display: flex; flex-direction: column; border-left: 1px solid var(--border); margin-left: 0.4rem; }
.feed li {
  display: grid;
  grid-template-columns: 70px 108px 1fr;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.75rem 0 0.75rem 1.3rem;
  position: relative;
  border-bottom: 1px dashed var(--border);
}
.feed li:last-child { border-bottom: none; }
.feed li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 1.15rem;
  width: 7px; height: 7px;
  background: var(--acc);
  box-shadow: 0 0 8px var(--acc);
}
.feed li:not(:first-child)::before { background: var(--bg); border: 1px solid var(--acc); box-shadow: none; }
.feed-date { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--text); }
.feed-tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--amber); border: 1px solid var(--amber-line); padding: 0.08rem 0.4rem; justify-self: start; }
.feed p { color: var(--muted); font-size: 0.9rem; }
.feed p strong { color: var(--text); }

/* cursor spotlight on interactive surfaces */
.card, .project, .route, .pub, .award { background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--acc-dim), transparent 45%); }
.stat-band .stat { background-color: var(--card); }

@media (max-width: 720px) {
  .feed li { grid-template-columns: 1fr; gap: 0.3rem; }
}
