/* ============================================================
   ZOEB IZZI — Global Stylesheet
   Warm, personal, sans-serif (danielsun.space-leaning).
   Type:  Bricolage Grotesque (display) · Inter (body) · JetBrains Mono (HUD)
   Color: warm cream paper · ink · amber "laser glow" accent
   Fonts load via a single @import below (keeps it one place).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..700&family=Inter:wght@400..600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Fonts */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Warm surfaces */
  --bg:        #FCF8F0;   /* warm cream */
  --bg-card:   #FFFFFF;
  --bg-soft:   #F3EAD6;   /* sand panel */
  --bg-ink:    #211C16;   /* warm near-black (buttons / rare dark moments) */

  --text:        #18130B;
  --text-muted:  #4C443A;
  --text-faint:  #82786A;
  --text-on-ink:        #F6EFE2;
  --text-on-ink-muted:  #BCB09C;

  /* Amber "laser glow" accent — the warm signature */
  --accent:        #EBA31C;   /* golden amber — glow / highlight / hover */
  --accent-2:      #D98A0C;
  --accent-strong: #8A5000;   /* readable amber-brown for link/label text on cream */
  --accent-soft:   #FBEBC6;   /* pale amber wash — highlighter + hover bg */
  --accent-glow:   rgba(235,163,28,0.22);

  /* Lines */
  --border:       #E2D6BE;
  --border-hover: #EBA31C;
  --rule:         rgba(34,29,22,0.14);
  --border-ink:   rgba(255,255,255,0.14);

  /* Type scale */
  --fs-display:  clamp(3.9rem, 8.8vw, 7.8rem);
  --fs-h1:       clamp(3rem, 5.8vw, 4.7rem);
  --fs-h2:       clamp(2.35rem, 4.5vw, 3.6rem);
  --fs-h3:       1.62rem;
  --fs-body-lg:  1.4rem;
  --fs-body:     1.18rem;   /* ~19px */
  --fs-small:    1.02rem;
  --fs-eyebrow:  0.92rem;
  --leading-tight: 1.04;
  --leading-body:  1.62;
  --measure:     62ch;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px; --space-10: 128px;

  /* Widths & shape */
  --maxw-prose:   700px;
  --maxw-content: 1080px;
  --maxw-wide:    1180px;
  --gutter:       max(24px, 6vw);
  --radius:       14px;
  --radius-sm:    8px;
  --nav-h:        70px;

  /* Shadows (warm-tinted) */
  --shadow-sm: 0 1px 2px rgba(60,45,20,0.06);
  --shadow-md: 0 8px 28px rgba(60,45,20,0.09);
  --shadow-lg: 0 20px 50px rgba(120,80,10,0.12), 0 5px 16px rgba(60,45,20,0.07);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent-soft); color: var(--text); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--text);
}
a { color: var(--accent-strong); }
img { max-width: 100%; display: block; }

/* ── Typographic helpers ───────────────────────────────────── */
.eyebrow, .section-label, .nav-grid-label {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before, .section-label::before {
  content: '';
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}
.mono { font-family: var(--font-mono); }

/* warm highlighter behind an emphasized word */
.accent-q {
  background-image: linear-gradient(transparent 56%, rgba(235,163,28,0.55) 56%, rgba(235,163,28,0.55) 94%, transparent 94%);
  padding: 0 0.04em;
}

.lead { font-size: var(--fs-body-lg); color: var(--text); line-height: 1.55; }

.rule { height: 1px; background: var(--rule); border: 0; margin: var(--space-8) 0; }
.divider { height: 1px; background: var(--rule); max-width: var(--maxw-content); margin: 0 auto; }

/* Stat strip (kept for optional use) */
.stat-strip { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-8); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--text); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ── Atom-array canvas (the warm quantum motif / game) ─────── */
#atom-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; pointer-events: none; opacity: 1; transition: opacity 0.5s ease;
}
#atom-canvas.off { opacity: 0; }

/* Geometry Dash game — faint background on every page, overlaid on the dots */
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.16; pointer-events: none; }
#game-score { display: none; }            /* hide the score on content pages */
body.play #game-score { display: block !important; }
#game-toggle { bottom: 62px !important; left: 16px !important; right: auto !important; background: rgba(255,253,248,0.85) !important; border: 1px solid var(--border) !important; color: var(--text-muted) !important; font-family: var(--font-body) !important; letter-spacing: 0.02em !important; }
body.play #game-toggle { bottom: 18px !important; }

#atom-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,253,248,0.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  transition: color 0.18s, border-color 0.18s, box-shadow 0.18s;
}
#atom-toggle:hover { color: var(--accent-strong); border-color: var(--border-hover); box-shadow: var(--shadow-sm); }
#atom-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }
#atom-toggle[aria-pressed="false"] .dot { background: var(--text-faint); box-shadow: none; }

.atom-hud {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90;
  display: none; align-items: center; gap: 16px;
  font-family: var(--font-body); font-size: 0.82rem; color: var(--text);
  background: rgba(255,253,248,0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 999px; padding: 9px 18px; box-shadow: var(--shadow-md);
}
.atom-hud.show { display: inline-flex; }
.atom-hud b { color: var(--accent-strong); font-weight: 700; }
.atom-hud .hud-reset { font-family: var(--font-body); font-size: 0.78rem; border: 1px solid var(--border); background: none; color: var(--text-muted); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.atom-hud .hud-reset:hover { color: var(--accent-strong); border-color: var(--border-hover); }

/* ── Nav ───────────────────────────────────────────────────── */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(251,246,236,0.84);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; z-index: 100;
  display: flex; align-items: center; padding: 0 var(--gutter); gap: 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#site-nav.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 24px rgba(60,45,20,0.06); }
.nav-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; margin-right: auto; white-space: nowrap; }
.nav-logo span { color: var(--accent-strong); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  text-decoration: none; font-family: var(--font-body);
  color: var(--text-muted); font-size: 1.02rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.18s, background 0.18s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--accent-soft); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; margin-left: auto; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }

#nav-container { min-height: var(--nav-h); }
.page-wrapper { position: relative; z-index: 1; padding-top: var(--nav-h); min-height: 100vh; }

/* ── Buttons (dark ink → amber on hover, danielsun-style) ──── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: all 0.18s ease;
}
.btn-primary { background: var(--bg-ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--bg-ink); transform: translateY(-2px); box-shadow: 0 8px 22px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translate(3px, -1px); }

/* ── Section ───────────────────────────────────────────────── */
.section { padding: var(--space-10) var(--gutter); max-width: var(--maxw-content); margin: 0 auto; }
.section-header { margin-bottom: var(--space-7); }
.section-label { margin-bottom: var(--space-4); }
.section-title { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; color: var(--text); }
.section-sub { margin-top: var(--space-4); color: var(--text-muted); font-size: var(--fs-body-lg); font-weight: 400; max-width: var(--measure); line-height: 1.5; }

/* Warm full-bleed "sand" panel (used for the quantum section) */
.section--panel { max-width: none; margin: 0; background: var(--bg-soft); position: relative; }
.section--panel .section-inner { max-width: var(--maxw-content); margin: 0 auto; position: relative; z-index: 1; }

/* ── Editorial work list (Selected Work) ───────────────────── */
.work-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.work-item {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-5);
  align-items: baseline; padding: var(--space-6) var(--space-3);
  border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit;
  transition: background 0.2s, padding 0.2s, border-radius 0.2s;
}
.work-item:hover { background: var(--bg-card); padding-left: var(--space-5); padding-right: var(--space-5); border-radius: var(--radius); border-bottom-color: transparent; box-shadow: var(--shadow-sm); }
.work-main h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.015em; margin-bottom: 6px; transition: color 0.2s; }
.work-item:hover .work-main h3 { color: var(--accent-strong); }
.work-main p { color: var(--text-muted); font-size: var(--fs-small); max-width: 56ch; }
.work-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.work-tag { font-size: 0.72rem; color: var(--text-muted); background: var(--bg-soft); border-radius: 999px; padding: 3px 11px; }
.work-item:hover .work-tag { background: var(--accent-soft); }
.work-meta { font-size: 0.85rem; color: var(--text-faint); white-space: nowrap; display: flex; align-items: center; gap: 12px; }
.work-meta .arrow { color: var(--accent-strong); font-size: 1.1rem; transition: transform 0.2s; }
.work-item:hover .work-meta .arrow { transform: translate(3px,-3px); }

/* ── Cards ─────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; text-decoration: none; color: inherit; display: block; }
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px; margin-bottom: 14px; }
.card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.card p { font-size: var(--fs-small); color: var(--text-muted); line-height: 1.6; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; color: var(--accent-strong); text-decoration: none; transition: gap 0.2s; }
.card-link:hover { gap: 10px; }

/* ── Range strip (breadth) ─────────────────────────────────── */
.range-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.range-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.range-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--border-hover); }
.range-item .r-label { font-size: 0.78rem; font-weight: 600; color: var(--accent-strong); margin-bottom: 8px; }
.range-item h4 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.range-item p { font-size: var(--fs-small); color: var(--text-muted); line-height: 1.5; }

/* ── Publication / research list ───────────────────────────── */
.pub-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.pub-item { padding: var(--space-6) 0; border-bottom: 1px solid var(--rule); }
.pub-meta { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.pub-item h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.pub-item p { color: var(--text-muted); max-width: var(--measure); }

/* ── Timeline ──────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.timeline-item:first-child { border-top: 1px solid var(--rule); }
.timeline-date { font-size: 0.82rem; font-weight: 600; color: var(--accent-strong); padding-top: 4px; }
.timeline-content h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.timeline-content p { font-size: var(--fs-small); color: var(--text-muted); }

/* ── Awards ────────────────────────────────────────────────── */
.awards-group { margin-bottom: var(--space-7); }
.awards-group > .awards-year { font-size: 0.85rem; font-weight: 700; color: var(--accent-strong); margin-bottom: var(--space-4); }
.awards-list { display: flex; flex-direction: column; gap: 12px; }
.award-item { background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 18px 24px; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.award-item:hover { border-color: var(--border-hover); border-left-color: var(--accent-2); box-shadow: var(--shadow-sm); transform: translateX(3px); }
.award-item h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 3px; }
.award-item p { font-size: var(--fs-small); color: var(--text-muted); }

/* ── Contact ───────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
.contact-info p { color: var(--text-muted); margin-bottom: 28px; font-size: var(--fs-body-lg); line-height: 1.6; max-width: 42ch; }
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); font-size: 0.98rem; font-weight: 500; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.2s; }
.contact-link:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(4px); }
.contact-link .ci { font-size: 0.82rem; color: var(--text-faint); width: 92px; flex-shrink: 0; font-weight: 600; }
.contact-link:hover .ci { color: var(--accent-strong); }

/* ── Footer ────────────────────────────────────────────────── */
#site-footer { border-top: 1px solid var(--border); padding: var(--space-7) var(--gutter); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; position: relative; z-index: 1; max-width: var(--maxw-wide); margin: 0 auto; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 7px 13px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.footer-links a:hover { color: var(--text); background: var(--accent-soft); }

/* ── Project / writeup pages ───────────────────────────────── */
.project-hero { padding: var(--space-8) var(--gutter) var(--space-7); max-width: var(--maxw-content); margin: 0 auto; }
.project-hero .back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 500; text-decoration: none; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; transition: gap 0.18s, color 0.18s; }
.project-hero .back-link:hover { color: var(--accent-strong); gap: 12px; }
.project-hero h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 18px; line-height: 1.04; }
.project-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.meta-pill { font-size: 0.8rem; font-weight: 500; padding: 5px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); }
.project-summary { font-size: var(--fs-body-lg); color: var(--text-muted); line-height: 1.6; border-left: 3px solid var(--accent); padding-left: 20px; max-width: var(--measure); }
.prose { max-width: var(--maxw-content); margin: 0 auto; padding: 0 var(--gutter) var(--space-9); }
.prose h2, .prose h3, .prose p, .prose ul { max-width: var(--measure); }
.prose h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: var(--space-7) 0 var(--space-4); }
.prose h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: var(--space-6) 0 var(--space-3); }
.prose p { color: var(--text-muted); margin-bottom: var(--space-4); }
.prose ul { color: var(--text-muted); margin: 0 0 var(--space-4) 1.1em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { color: var(--text); font-weight: 600; }

.blog-posts { max-width: var(--maxw-content); margin: 0 auto; padding: 0 var(--gutter) var(--space-9); }
.blog-post { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; margin-bottom: 18px; }
.blog-post h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 12px; }
.blog-post p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

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

/* ── Hero (homepage) ───────────────────────────────────────── */
.hero { max-width: var(--maxw-wide); margin: 0 auto; padding: clamp(40px, 9vh, 110px) var(--gutter) var(--space-8); min-height: calc(100vh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow { margin-bottom: var(--space-5); }
.hero h1 {
  /* Change from --fs-display to a more reasonable header size */
  font-size: var(--fs-h1, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;

  /* Bump this up so the lines don't overlap when the text wraps */
  line-height: 1.15;

  /* Increased from 16ch so "Building a quantum computer. As a high schooler." */
  /* doesn't break into awkward, tiny 1-2 word lines. */
  max-width: 22ch;

  margin-bottom: var(--space-5);
}.hero-bio { font-size: var(--fs-body-lg); color: var(--text-muted); max-width: 56ch; line-height: 1.55; margin-bottom: var(--space-6); }
.hero-bio strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: var(--space-7); }
.hero-play { display: inline-flex; align-items: flex-start; gap: 8px; margin-bottom: var(--space-8); font-family: var(--font-body); font-size: 0.9rem; color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 4px 0; max-width: 100%; text-align: left; }
.hero-play:hover { color: var(--accent-strong); }
.hero-play .tri { color: var(--accent); }

/* ── Quantum panel content ─────────────────────────────────── */
.q-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); align-items: start; }
.q-grid p { color: var(--text-muted); margin-bottom: var(--space-4); max-width: 54ch; }
.q-grid p.lead { color: var(--text); }
.q-points { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); }
.q-points li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--text-muted); font-size: 0.98rem; line-height: 1.5; }
.q-points .qi { color: var(--accent); font-size: 1rem; padding-top: 1px; }
.q-points b { color: var(--text); font-weight: 600; }
.q-tools { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: 8px; }
.q-tool { font-size: 0.78rem; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; }
.on-ink-link { color: var(--accent-strong); font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; margin-top: var(--space-6); }
.on-ink-link:hover { gap: 12px; }

/* ── About ─────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-8); align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: var(--space-4); }
.about-text p strong { color: var(--text); font-weight: 600; }
.about-aside { display: flex; flex-direction: column; gap: var(--space-5); position: sticky; top: calc(var(--nav-h) + 24px); }
.headshot { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); display: block; }
.headshot-ph { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px dashed var(--border); background: linear-gradient(135deg, var(--bg-soft), var(--bg-card)); display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 0.82rem; text-align: center; padding: 20px; }
.quick-facts { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.quick-facts h3 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 14px; }
.fact-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.fact-row:last-child { border-bottom: none; }
.fact-label { font-size: 0.72rem; color: var(--accent-strong); font-weight: 600; }
.fact-value { color: var(--text); font-weight: 500; font-size: 0.92rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .q-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .about-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .about-aside { position: static; }
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
@media (max-width: 780px) {
  :root { --nav-h: 62px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: rgba(251,246,236,0.98); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; padding: 11px 14px; }
  .nav-hamburger { display: flex; }
  .section { padding: var(--space-8) var(--gutter); }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .work-item { grid-template-columns: 1fr; }
  .work-meta { margin-top: 12px; }
  .hero { min-height: calc(100vh - var(--nav-h)); padding-top: var(--space-7); }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.9rem); max-width: 100%; overflow-wrap: break-word; }
  .hero-bio { font-size: 1.18rem; }
}

/* ── Superposition (site-wide "measure me") ────────────────── */
/* hidden states live in this layer: above the dot-grid canvas, behind page content */
.sp-layer { position: absolute; top: 0; left: 0; width: 100%; z-index: 0; pointer-events: none; }
.sp-mark { position: absolute; transform: translate(-50%, -50%); width: 92px; height: 92px; display: grid; place-items: center; text-align: center; }
.sp-ghost { grid-area: 1 / 1; font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; color: var(--accent); opacity: .18; animation: spghost 2.8s ease-in-out infinite; }
@keyframes spghost { 0%,100% { opacity: .08; } 50% { opacity: .34; } }
.sp-mark.near .sp-ghost { opacity: .5; }
.sp-icon { grid-area: 1 / 1; width: 50px; height: 50px; color: var(--accent-strong); opacity: 0; transform: scale(.4); filter: blur(4px); transition: opacity .45s, transform .45s, filter .45s; }
.sp-icon svg { width: 100%; height: 100%; }
.sp-label { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .88rem; font-weight: 600; color: var(--text); opacity: 0; transition: opacity .4s .15s; }
.sp-mark.measured .sp-ghost { opacity: 0; animation: none; }
.sp-mark.measured .sp-icon { opacity: 1; transform: scale(1); filter: blur(0); }
.sp-mark.measured .sp-label { opacity: 1; }

/* the magnifying glass — on top, follows the cursor, never blocks clicks */
.sp-lens { position: fixed; left: -300px; top: 0; width: 112px; height: 112px; transform: translate(-50%, -50%); pointer-events: none; z-index: 70; opacity: 0; transition: opacity .25s; }
.sp-lens.show { opacity: 1; }
.sp-glass { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent-strong); background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.42), rgba(235,163,28,.08) 60%, rgba(235,163,28,.015)); box-shadow: 0 10px 26px rgba(120,80,10,.26), inset 0 0 18px rgba(255,255,255,.45); }
.sp-handle { position: absolute; width: 11px; height: 32px; border-radius: 7px; background: var(--accent-strong); bottom: -20px; right: 8px; transform: rotate(-45deg); transform-origin: top center; }
@media (prefers-reduced-motion: reduce) { .sp-ghost { animation: none; } }

/* ── Schrodinger's music box — bottom-right corner widget ──── */
.mbox { position: fixed; right: 0; bottom: 0; z-index: 85; pointer-events: none; }
.mbox-panel {
  pointer-events: auto; position: relative;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border); border-right: 0; border-bottom: 0;
  border-top-left-radius: 72px;
  padding: 14px 16px 14px 26px;
  box-shadow: var(--shadow-lg);
  max-width: 70px; overflow: hidden;
  transition: max-width .5s ease, padding .5s ease;
}
.mbox.on .mbox-panel { max-width: 390px; padding-left: 30px; }
.mbox-btn {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg); color: var(--accent-strong);
  cursor: pointer; display: grid; place-items: center; font-size: 1.2rem; line-height: 1;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.mbox-btn:hover { transform: scale(1.07); border-color: var(--border-hover); }
.mbox.on .mbox-btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.mbox-now { white-space: nowrap; opacity: 0; transition: opacity .4s .12s; }
.mbox.on .mbox-now { opacity: 1; }
.mbox-cap { display: block; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.mbox-by { display: block; font-size: .76rem; color: var(--accent-strong); font-weight: 600; }
.mbox-name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; color: var(--text); line-height: 1.15; }
.mbox-notes { position: absolute; right: 30px; bottom: 46px; width: 0; height: 0; }
.mbox-note { position: absolute; right: 0; bottom: 0; color: var(--accent-strong); will-change: transform, opacity; animation: mbflow 3s ease-out forwards; }
@keyframes mbflow {
  0%   { opacity: 0; transform: translate(0,0) rotate(0deg); }
  14%  { opacity: .85; }
  100% { opacity: 0; transform: translate(var(--dx, -120px), var(--dy, -220px)) rotate(-22deg); }
}
@media (prefers-reduced-motion: reduce) { .mbox-note { display: none; } }
@media (max-width: 600px) { .mbox.on .mbox-panel { max-width: 270px; } }
