/* ---------------------------------------------------------------------------
   arhaangupta.cc — design tokens
   Direction: "instrument panel". Deep blue-black field, LiDAR-teal accent,
   mono labels. One signature element (the hero sweep); everything else quiet.
--------------------------------------------------------------------------- */

:root {
  --bg:      #0a0d14;
  --surface: #10141f;
  --raised:  #151b29;
  --line:    #1e2534;
  --text:    #e7eaf3;
  --muted:   #8a93a8;
  --accent:  #45e0b8;   /* lidar teal */
  --focus:   #8b7cff;   /* violet, focus rings + links only */
  --radius:  10px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

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

/* Some resets/styles can defeat the browser default for [hidden];
   enforce it so elements like the empty thumbnail preview never render. */
[hidden] { display: none !important; }

/* Faint dot grid across the whole page — the "field" the instruments sit on */
.field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #232b3d 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.35;
  z-index: 0;
}

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

.mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

/* --------------------------------- hero --------------------------------- */

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 2.75rem;
}


.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 1rem;
}

.hero .sub {
  max-width: 34rem;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hero .meta { color: var(--muted); margin: 0; }
#proj-count { color: var(--accent); font-size: 0.9rem; }

/* --------------------------------- grid --------------------------------- */

main { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.section-label { margin-bottom: 1.1rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start; /* an expanded card must not stretch its neighbors */
}

.loading { color: var(--muted); }

/* --------------------------------- card --------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover { border-color: #2c3650; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-2px); }
}
.card.open { border-color: var(--accent); }

.card-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.card-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
  background:
    radial-gradient(circle at 30% 40%, #1a2233 0%, transparent 55%),
    var(--raised);
}
.thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.card-head { padding: 1rem 1.1rem; display: flex; align-items: baseline; gap: 0.6rem; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  flex: 1;
}

.chevron {
  color: var(--muted);
  transition: transform 180ms ease;
  flex: none;
}
.card.open .chevron { transform: rotate(180deg); color: var(--accent); }

.tags { padding: 0 1.1rem 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}
.tag.status-shipped     { color: var(--accent); border-color: rgba(69, 224, 184, 0.35); }
.tag.status-in-progress { color: #f0b95a; border-color: rgba(240, 185, 90, 0.35); }
.tag.status-archived    { color: var(--muted); }

/* Expandable description: grid-rows 0fr -> 1fr, no JS height math needed */
.card-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms ease;
}
.card.open .card-body { grid-template-rows: 1fr; }
@media (prefers-reduced-motion: reduce) {
  .card-body { transition: none; }
}
.card-body > div { overflow: hidden; }

.card-desc {
  margin: 0;
  padding: 0.2rem 1.1rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-line;
}

.card-visit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 1.1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(69, 224, 184, 0.35);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  transition: background 140ms ease;
}
.card-visit:hover { background: rgba(69, 224, 184, 0.08); }
.card-visit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* -------------------------------- footer -------------------------------- */

footer {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding: 1.75rem 1.5rem 2.25rem;
  text-align: center;
  color: var(--muted);
}

/* ----------------------------- admin (/arhaan) --------------------------- */

.admin main { max-width: 760px; }
.admin .hero { padding-bottom: 1.5rem; }

.admin-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.25rem;
  display: grid;
  gap: 1rem;
}

.admin-form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
}
.admin-form textarea { min-height: 6rem; resize: vertical; }
.admin-form input:focus-visible,
.admin-form select:focus-visible,
.admin-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* File input styled to match the rest of the console */
.admin-form input[type="file"] {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.admin-form input[type="file"]::file-selector-button {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  margin-right: 0.75rem;
  cursor: pointer;
  transition: border-color 140ms ease;
}
.admin-form input[type="file"]::file-selector-button:hover { border-color: var(--accent); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
}
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06251c; font-weight: 500; }
.btn.danger  { color: #ff7d7d; border-color: rgba(255, 125, 125, 0.4); background: none; }
.btn:disabled { opacity: 0.5; cursor: default; }

.thumb-preview { max-width: 220px; border-radius: 6px; border: 1px solid var(--line); display: block; }

.admin-list { display: grid; gap: 0.75rem; }
.admin-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
}
.admin-row img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.admin-row .grow { flex: 1; min-width: 0; }
.admin-row .title { font-family: var(--font-display); font-weight: 500; margin: 0; }
.admin-row .sub { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-msg { font-family: var(--font-mono); font-size: 0.78rem; min-height: 1.2em; margin: 0; }
.status-msg.ok  { color: var(--accent); }
.status-msg.err { color: #ff7d7d; }

/* ------------------------------ hero links ------------------------------- */

.hero-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.hero-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  transition: border-color 140ms ease, color 140ms ease;
}
.hero-link:hover { border-color: var(--accent); color: var(--accent); }
.hero-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* -------------------------------- about ---------------------------------- */

.about { margin-bottom: 2.5rem; max-width: 44rem; }
.about-text { color: var(--muted); margin: 0; }

/* ------------------------------ tag filter -------------------------------- */

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.25rem; }
.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.filter-pill:hover { border-color: #2c3650; color: var(--text); }
.filter-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.filter-pill[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgba(69, 224, 184, 0.5);
  background: rgba(69, 224, 184, 0.07);
}

.card.filtered-out { display: none; }

/* ---------------------------- detail page --------------------------------- */

.detail-main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem;
}
.crumb { color: inherit; text-decoration: none; }
.crumb:hover { color: var(--accent); }
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.detail-tags { padding: 0; margin-bottom: 1.75rem; }
.detail-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 1.75rem;
  display: block;
}
.detail-desc { color: var(--muted); white-space: pre-line; margin: 0 0 2rem; }
.detail .card-visit { margin: 0 0 2.5rem; }
.detail-meta { color: var(--muted); margin: 0; }

/* -------------------- admin drag-and-drop reordering ---------------------- */

.admin-row { cursor: default; }
.admin-row .drag-handle {
  font-family: var(--font-mono);
  color: var(--muted);
  cursor: grab;
  user-select: none;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  letter-spacing: -0.1em;
}
.admin-row .drag-handle:hover { color: var(--accent); }
.admin-row.dragging { opacity: 0.45; border-color: var(--accent); }
.admin-row.drop-above { box-shadow: 0 -2px 0 0 var(--accent); }
.admin-row.drop-below { box-shadow: 0 2px 0 0 var(--accent); }
.reorder-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin: 0 0 0.75rem; }

/* ------------------------------- timeline --------------------------------- */

.timeline-section { margin-bottom: 3rem; }
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.timeline-item {
  position: relative;
  padding: 0 0 1.6rem 1.75rem;
}
.timeline-item:last-child { padding-bottom: 0.25rem; }
/* node on the rail — echoes the radar's contact blips */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
}
.timeline-when { color: var(--muted); margin-bottom: 0.15rem; }
.timeline-title {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.timeline-org { color: var(--muted); font-weight: 400; }
.timeline-title .tag { align-self: center; }
.tag.kind-work      { color: var(--accent); border-color: rgba(69, 224, 184, 0.35); }
.tag.kind-education { color: #7cb8ff; border-color: rgba(124, 184, 255, 0.35); }
.tag.kind-award     { color: #f0b95a; border-color: rgba(240, 185, 90, 0.35); }
.timeline-detail { color: var(--muted); font-size: 0.92rem; margin: 0.25rem 0 0; max-width: 40rem; }

/* -------------------------------- contact --------------------------------- */

.contact { margin-top: 3.5rem; max-width: 560px; }
.contact-lead { color: var(--muted); margin: 0 0 1.25rem; }
.contact-form { display: grid; gap: 1rem; }
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
}
.contact-form textarea { min-height: 7rem; resize: vertical; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.contact-actions { display: flex; align-items: center; gap: 0.9rem; }
/* honeypot: visually removed, still in the DOM for bots */
.contact-form .hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------- admin: console sections ------------------------ */

.console-section { margin-bottom: 2.5rem; }
.msg-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  display: grid;
  gap: 0.3rem;
}
.msg-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.msg-from { font-family: var(--font-display); font-weight: 500; }
.msg-email { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); text-decoration: none; }
.msg-email:hover { text-decoration: underline; }
.msg-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-left: auto; }
.msg-body { color: var(--muted); font-size: 0.92rem; margin: 0; white-space: pre-line; }
.msg-row .btn { justify-self: start; margin-top: 0.35rem; }
.resume-controls { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }

/* ------------------------- five-status system ----------------------------- */
/* live gets a pulsing indicator dot; the rest are steady, color-coded. */

.tag[class*="status-"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: 0.05em;
  background: currentColor;
}
.tag.status-live { color: var(--accent); border-color: rgba(69, 224, 184, 0.5); }
@media (prefers-reduced-motion: no-preference) {
  .tag.status-live::before { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(69, 224, 184, 0.5); }
    50%      { opacity: 0.55; box-shadow: 0 0 0 3px rgba(69, 224, 184, 0); }
  }
}
.tag.status-shipped     { color: #7cb8ff; border-color: rgba(124, 184, 255, 0.35); }
.tag.status-in-progress { color: #f0b95a; border-color: rgba(240, 185, 90, 0.35); }
.tag.status-prototype   { color: #b3a6ff; border-color: rgba(139, 124, 255, 0.4); }
.tag.status-archived    { color: var(--muted); border-color: var(--line); }
.tag.status-archived::before { opacity: 0.5; }

/* --------------------------- light theme tokens ---------------------------- */
/* Dark is the default (:root above). Light overrides the same tokens, so
   every component restyles itself. Status colors become tokens here too. */

:root {
  --dot: #232b3d;
  --st-blue:   #7cb8ff;
  --st-amber:  #f0b95a;
  --st-violet: #b3a6ff;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg:      #f3f5fa;
  --surface: #ffffff;
  --raised:  #e9edf5;
  --line:    #d7dde8;
  --text:    #16192a;
  --muted:   #5b657c;
  --accent:  #0a9c7a;
  --focus:   #5b48e8;
  --dot:     #c9d1e0;
  --st-blue:   #2764c4;
  --st-amber:  #a36f10;
  --st-violet: #6a55d8;
}

.field { background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px); }
html[data-theme="light"] .field { opacity: 0.5; }
html[data-theme="light"] .thumb { background: var(--raised); }
html[data-theme="light"] .btn.primary { color: #ffffff; }

/* Re-point status + kind colors at the tokens (overrides earlier literals) */
.tag.status-shipped     { color: var(--st-blue);   border-color: color-mix(in srgb, var(--st-blue) 40%, transparent); }
.tag.status-in-progress { color: var(--st-amber);  border-color: color-mix(in srgb, var(--st-amber) 40%, transparent); }
.tag.status-prototype   { color: var(--st-violet); border-color: color-mix(in srgb, var(--st-violet) 45%, transparent); }
.tag.kind-education     { color: var(--st-blue);   border-color: color-mix(in srgb, var(--st-blue) 40%, transparent); }
.tag.kind-award         { color: var(--st-amber);  border-color: color-mix(in srgb, var(--st-amber) 40%, transparent); }

/* ------------------------------ theme toggle ------------------------------- */

.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 10;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* --------------------------------- lab ------------------------------------ */

.lab { margin-top: 3.5rem; }
.lab-lead { color: var(--muted); margin: 0 0 1.25rem; max-width: 40rem; }
.lab-wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
#lab-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: crosshair;
  touch-action: none; /* draw on touch without scrolling the page */
  width: 168px;
  height: 168px;
}
.lab-side { flex: 1; min-width: 220px; max-width: 340px; display: grid; gap: 0.75rem; }
.lab-bar-row { display: flex; align-items: center; gap: 0.6rem; }
.lab-bar-label { width: 1ch; color: var(--muted); }
.lab-bar-track {
  flex: 1;
  height: 8px;
  background: var(--raised);
  border-radius: 999px;
  overflow: hidden;
}
.lab-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--line);
  border-radius: 999px;
  transition: width 120ms ease;
}
.lab-bar-fill.top { background: var(--accent); }
.lab-note { color: var(--muted); }
.lab-actions { display: flex; gap: 0.6rem; }

/* ------------------------------- uses page --------------------------------- */

.uses-group { margin-bottom: 1.9rem; }
.uses-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.uses-list li { color: var(--muted); }
.uses-list strong { color: var(--text); font-weight: 500; }

/* ----------------------------- awards section ----------------------------- */

.awards-section { margin-bottom: 3rem; }
.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.award-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.35rem;
  cursor: default;
}
.award-card.has-detail { cursor: pointer; }
.award-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.award-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.award-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  margin: 0;
  flex: 1;
}
.award-org { color: var(--muted); font-size: 0.88rem; margin: 0; }
.award-result {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid rgba(69, 224, 184, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  align-self: start;
  white-space: nowrap;
}
.award-meta { display: flex; align-items: center; gap: 0.5rem; }
.award-year { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

.tag.kind-competition { color: var(--accent); border-color: rgba(69, 224, 184, 0.35); }
.tag.kind-award       { color: var(--st-amber); border-color: color-mix(in srgb, var(--st-amber) 40%, transparent); }
.tag.kind-scholarship { color: var(--st-blue);  border-color: color-mix(in srgb, var(--st-blue) 40%, transparent); }

/* expandable detail */
.award-detail-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 200ms ease;
}
.award-card.open .award-detail-wrap { grid-template-rows: 1fr; }
.award-detail-wrap > div { overflow: hidden; }
.award-detail {
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 0.6rem;
  margin: 0;
  white-space: pre-line;
}
.award-chevron { color: var(--muted); transition: transform 180ms ease; font-size: 0.8rem; }
.award-card.open .award-chevron { transform: rotate(180deg); color: var(--accent); }

/* ----------------------------- awards section ----------------------------- */

.awards-section { margin-top: 3rem; margin-bottom: 3rem; }
.awards-grid { display: grid; gap: 0.85rem; }

.award-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 160ms ease;
}
.award-card.open { border-color: var(--accent); }
.award-card:hover { border-color: #2c3650; }

.award-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
}

.award-icon {
  font-size: 1.1rem;
  flex: none;
  width: 1.6rem;
  text-align: center;
}
.award-icon.kind-competition { color: var(--accent); }
.award-icon.kind-scholarship { color: var(--st-blue); }
.award-icon.kind-award       { color: var(--st-amber); }

.award-info { flex: 1; min-width: 0; }
.award-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
}
.award-meta {
  color: var(--muted);
  margin: 0;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.award-detail {
  padding: 0 1.1rem 1rem 3.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  white-space: pre-line;
}

/* ------------------- intro split: about | timeline side by side ------------- */
/* Puts work history above the fold without pushing the project grid down.
   Collapses to a single column on narrow screens. */

.intro-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}
@media (max-width: 860px) {
  .intro-split { grid-template-columns: 1fr; gap: 2rem; }
}

.intro-split .about,
.intro-split .timeline-section { margin-bottom: 0; }

/* Compact timeline inside the split — smaller type, tighter rail, and a
   scroll cap so a long history never stretches the row. */
.intro-split .timeline {
  max-height: 20rem;
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.intro-split .timeline::-webkit-scrollbar { width: 6px; }
.intro-split .timeline::-webkit-scrollbar-track { background: transparent; }
.intro-split .timeline::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}
.intro-split .timeline::-webkit-scrollbar-thumb:hover { background: #2c3650; }

.intro-split .timeline-item { padding-bottom: 1.15rem; }
.intro-split .timeline-title { font-size: 0.95rem; }
.intro-split .timeline-detail { font-size: 0.86rem; }
.intro-split .timeline-when { font-size: 0.72rem; }

/* --------------------- lab: winning bar glow ------------------------------- */
/* The top-probability bar lights up so the inference reads at a glance. */

.lab-bar-fill.top {
  background: var(--accent);
  box-shadow:
    0 0 8px color-mix(in srgb, var(--accent) 70%, transparent),
    0 0 16px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 0 4px color-mix(in srgb, #ffffff 45%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .lab-bar-fill.top { animation: lab-pulse 1.6s ease-in-out infinite; }
  @keyframes lab-pulse {
    0%, 100% {
      box-shadow:
        0 0 8px color-mix(in srgb, var(--accent) 70%, transparent),
        0 0 16px color-mix(in srgb, var(--accent) 30%, transparent),
        inset 0 0 4px color-mix(in srgb, #ffffff 45%, transparent);
    }
    50% {
      box-shadow:
        0 0 12px color-mix(in srgb, var(--accent) 90%, transparent),
        0 0 26px color-mix(in srgb, var(--accent) 45%, transparent),
        inset 0 0 6px color-mix(in srgb, #ffffff 60%, transparent);
    }
  }
}
/* the winning row's digit label lights up too */
.lab-bar-row.top-row .lab-bar-label { color: var(--accent); }
.lab-note.reading { color: var(--accent); }

/* ============================ radar (page level) ===========================
   Lives outside .hero so the arc is never clipped mid-sweep. It spans the
   hero *and* the intro split, so the beam passes over the work-experience
   column — the timeline nodes light up in sequence as it goes by.
   ========================================================================= */

body { overflow-x: clip; }           /* the oversized arc must not add scroll */

.radar {
  position: absolute;
  top: -180px;
  right: -220px;
  width: 1100px;
  height: 1100px;
  pointer-events: none;
  z-index: 0;
  /* fade the whole instrument out toward the bottom so it dissolves into the
     page instead of ending at a hard edge */
  mask-image: linear-gradient(to bottom, black 0%, black 52%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 52%, transparent 88%);
}
@media (max-width: 860px) {
  .radar { width: 720px; height: 720px; top: -140px; right: -260px; opacity: 0.75; }
}

/* static rings — the instrument reads even between sweeps */
.radar-rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle,
    transparent 27%, rgba(69, 224, 184, 0.10) 27.4%, transparent 28.2%,
    transparent 41%, rgba(69, 224, 184, 0.085) 41.4%, transparent 42.2%,
    transparent 55%, rgba(69, 224, 184, 0.07) 55.4%, transparent 56.2%,
    transparent 69%, rgba(69, 224, 184, 0.055) 69.4%, transparent 70.2%);
}

.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    rgba(69, 224, 184, 0.26) 22deg,
    rgba(69, 224, 184, 0.07) 52deg,
    transparent 72deg);
  mask: radial-gradient(circle, transparent 26%, black 27%, black 70%, transparent 71%);
  -webkit-mask: radial-gradient(circle, transparent 26%, black 27%, black 70%, transparent 71%);
}

@media (prefers-reduced-motion: no-preference) {
  .sweep { animation: sweep 14s linear infinite; }
  @keyframes sweep { to { transform: rotate(360deg); } }
}

html[data-theme="light"] .radar { opacity: 0.55; }

/* --- spotlight: timeline nodes catch the beam as it passes -------------- */
/* Same 14s period as the sweep, staggered down the rail so the highlight
   travels with the arc rather than blinking all at once. */
@media (prefers-reduced-motion: no-preference) {
  .intro-split .timeline-item::before { animation: node-ping 14s ease-in-out infinite; }
  .intro-split .timeline-item:nth-child(1)::before { animation-delay: 0s; }
  .intro-split .timeline-item:nth-child(2)::before { animation-delay: 0.45s; }
  .intro-split .timeline-item:nth-child(3)::before { animation-delay: 0.9s; }
  .intro-split .timeline-item:nth-child(4)::before { animation-delay: 1.35s; }
  .intro-split .timeline-item:nth-child(5)::before { animation-delay: 1.8s; }
  .intro-split .timeline-item:nth-child(n+6)::before { animation-delay: 2.25s; }

  @keyframes node-ping {
    0%, 62%, 100% { box-shadow: 0 0 0 0 rgba(69, 224, 184, 0); background: var(--bg); }
    68% {
      box-shadow: 0 0 9px 2px color-mix(in srgb, var(--accent) 55%, transparent);
      background: var(--accent);
    }
    80% { box-shadow: 0 0 0 0 rgba(69, 224, 184, 0); background: var(--bg); }
  }
}

/* ========================= awards, redesigned ============================= */

.awards-grid { display: grid; gap: 0.9rem; }
@media (min-width: 900px) {
  .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.award-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: border-color 160ms ease;
}
.award-card:hover { border-color: #2c3650; }
.award-card.open { border-color: var(--accent); }

.award-media {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--raised);
  border: 1px solid var(--line);
  display: block;
}
.award-glyph {
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
}
.award-glyph.kind-competition { color: var(--accent); }
.award-glyph.kind-scholarship { color: var(--st-violet); }
.award-glyph.kind-award       { color: var(--st-amber); }

.award-body { min-width: 0; }
.award-topline {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.award-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  margin: 0;
}
.award-meta { color: var(--muted); margin: 0; }

.award-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.award-toggle,
.award-link {
  font-size: 0.74rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease;
}
.award-toggle:hover,
.award-link:hover { color: var(--accent); border-color: rgba(69, 224, 184, 0.45); }
.award-toggle:focus-visible,
.award-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.award-card.open .award-toggle { color: var(--accent); border-color: rgba(69, 224, 184, 0.45); }

.award-detail-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms ease;
}
.award-card.open .award-detail-wrap { grid-template-rows: 1fr; }
@media (prefers-reduced-motion: reduce) { .award-detail-wrap { transition: none; } }
.award-detail-wrap > div { overflow: hidden; }
.award-detail {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
  white-space: pre-line;
}

/* ======================= surface & lighting polish =========================
   Three additions, all decorative and all pointer-transparent:
   1. grain   — kills gradient banding, gives the page a tactile surface
   2. bloom   — one soft light source opposite the radar (bottom-left)
   3. card glow — cursor-tracked sheen, the radar's logic at hand scale
   ========================================================================= */

/* --- 1. grain overlay (every page, via body::before) --------------------- */
body::before {
  content: "";
  position: fixed;
  inset: -50%;                 /* oversized so the drift never reveals an edge */
  z-index: 9999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}
/* an almost imperceptible drift stops the grain looking like a dead texture */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: grain-drift 8s steps(6) infinite; }
  @keyframes grain-drift {
    0%   { transform: translate(0, 0); }
    16%  { transform: translate(-6px, 4px); }
    33%  { transform: translate(4px, -6px); }
    50%  { transform: translate(-4px, -4px); }
    66%  { transform: translate(6px, 3px); }
    83%  { transform: translate(-3px, 6px); }
    100% { transform: translate(0, 0); }
  }
}
html[data-theme="light"] body::before { opacity: 0.045; }

/* --- 2. ambient bloom: one soft bounce light, opposite the radar --------- */
body::after {
  content: "";
  position: fixed;
  left: -18vw;
  bottom: -22vh;
  width: 68vw;
  height: 68vw;
  max-width: 900px;
  max-height: 900px;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 13%, transparent) 0%,
    color-mix(in srgb, var(--accent) 5%, transparent) 42%,
    transparent 68%);
  filter: blur(30px);
}
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: bloom-drift 38s ease-in-out infinite; }
  @keyframes bloom-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    50%      { transform: translate(6vw, -5vh) scale(1.12); opacity: 0.78; }
  }
}
html[data-theme="light"] body::after { opacity: 0.55; }

/* --- 3. cursor-tracked glow on cards ------------------------------------ */
/* --gx/--gy are written by app.js on pointermove; screen blending means the
   sheen only ever adds light, so nothing underneath is muddied. */
.card,
.award-card { position: relative; }

.card::after,
.award-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 220ms ease;
  background: radial-gradient(
    220px circle at var(--gx, 50%) var(--gy, 50%),
    color-mix(in srgb, var(--accent) 18%, transparent) 0%,
    color-mix(in srgb, var(--accent) 7%, transparent) 38%,
    transparent 66%
  );
}
.card.lit::after,
.award-card.lit::after { opacity: 1; }

/* light mode: screen blending washes out on white, so darken instead */
html[data-theme="light"] .card::after,
html[data-theme="light"] .award-card::after {
  mix-blend-mode: multiply;
  background: radial-gradient(
    220px circle at var(--gx, 50%) var(--gy, 50%),
    color-mix(in srgb, var(--accent) 12%, transparent) 0%,
    transparent 62%
  );
}

@media (hover: none) {
  /* no cursor to track — skip it entirely on touch */
  .card::after, .award-card::after { display: none; }
}