/* =========================================================================
   David Mroz — personal site
   Aesthetic: dark editorial "quant terminal" with a living aura.
   Palette: deep ink, warm cream, cardinal → violet → gold aura.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* surfaces */
  --ink:        #0a0a0d;
  --ink-2:      #101015;
  --panel:      #131318;
  --panel-2:    #17171e;
  --line:       rgba(236, 233, 227, 0.10);
  --line-soft:  rgba(236, 233, 227, 0.06);
  --nav-scrolled-bg: rgba(10, 10, 13, 0.72);
  --surface-hover: rgba(255, 255, 255, 0.015);
  --surface-highlight: rgba(255, 255, 255, 0.018);
  --ghost-bg: rgba(255, 255, 255, 0.02);

  /* text — ramp: cream (primary) → muted (secondary) → faint (meta/captions) */
  --cream:      #ece9e3;
  --muted:      #9a958c;
  --faint:      #8c867d;   /* ≥4.5:1 on ink, panel, and panel-2 */

  /* aura */
  --cardinal:   #e1213f;
  --focus-ring: var(--cardinal);
  --cardinal-deep: #c5050c;
  --violet:     #8b5cf6;
  --gold:       #f6b73c;
  --gold-soft:  #c4a574;  /* decorative units on large display type only */
  --success:    #3ad07a;
  --glow-red:   rgba(225, 33, 63, 0.55);
  --glow-violet:rgba(139, 92, 246, 0.45);
  --glow-gold:  rgba(246, 183, 60, 0.40);
  --glow-cursor-red: rgba(225, 33, 63, 0.10);
  --glow-cursor-violet: rgba(139, 92, 246, 0.06);
  --glow-project: rgba(225, 33, 63, 0.10);
  --nav-cta-hover-bg: rgba(225, 33, 63, 0.08);
  --btn-primary-shadow: rgba(225, 33, 63, 0.30);
  --btn-primary-shadow-hover: rgba(225, 33, 63, 0.45);
  --shadow-panel: rgba(0, 0, 0, 0.5);
  --shadow-card: rgba(0, 0, 0, 0.35);
  --cardinal-line: color-mix(in srgb, var(--cardinal) 55%, transparent);
  --gold-flag-bg: color-mix(in srgb, var(--gold) 14%, transparent);
  --gold-flag-border: color-mix(in srgb, var(--gold) 22%, transparent);
  --nav-cta-active-bg: rgba(225, 33, 63, 0.12);

  /* spacing */
  --section-y: 120px;
  --section-y-sm: 90px;

  /* terminal chrome */
  --terminal-close: #ff5f57;
  --terminal-minimize: #febc2e;
  --terminal-maximize: #28c840;
  --syntax-string: #6dd3a3;
  --syntax-keyword: #a78bfa; /* violet legible on --panel (aura --violet stays decorative) */

  /* type */
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

/* Anchor targets clear the fixed nav when jumping via hash links */
main,
section[id] {
  scroll-margin-top: 88px;
}

main:focus { outline: none; }

/* Keyboard focus — never remove without a replacement */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.project:focus-visible { outline-offset: 4px; }
.nav-links a:focus-visible,
.foot-links a:focus-visible { color: var(--cream); }
.nav-menu-links a:focus-visible { color: var(--cream); background: var(--surface-hover); }
.btn-ghost:focus-visible { border-color: var(--cardinal); }

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
  outline: none;
}

/* ---- a11y utilities --------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.noscript-notice {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 12px 28px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--panel);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

/* ---- background: living aura + grid + grain --------------------------- */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }

.aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.aura.a1 { width: 60vw; height: 60vw; left: -10vw; top: -15vw;
  background: radial-gradient(circle, var(--glow-red), transparent 65%);
  animation: drift1 22s var(--ease) infinite alternate; }
.aura.a2 { width: 55vw; height: 55vw; right: -12vw; top: 10vh;
  background: radial-gradient(circle, var(--glow-violet), transparent 65%);
  animation: drift2 28s var(--ease) infinite alternate; }
.aura.a3 { width: 50vw; height: 50vw; left: 20vw; bottom: -20vw;
  background: radial-gradient(circle, var(--glow-gold), transparent 65%);
  animation: drift3 25s var(--ease) infinite alternate; }

@keyframes drift1 { to { transform: translate(5vw, 6vh) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-4vw, 5vh) scale(1.05); } }
@keyframes drift3 { to { transform: translate(3vw, -5vh) scale(1.08); } }

.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* cursor aura — the signature touch */
.cursor-aura {
  position: fixed; top: 0; left: 0; z-index: 1; pointer-events: none;
  width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-cursor-red), var(--glow-cursor-violet) 40%, transparent 70%);
  transition: opacity 0.4s ease;
  will-change: transform; opacity: 0;
}

/* ---- layout ----------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

section { position: relative; padding: var(--section-y) 0; }

.section-stats { padding-top: 90px; padding-bottom: 0; }
.section-offset { margin-top: 40px; }
.toolkit-offset { margin-top: 46px; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); display: inline-flex;
  align-items: center; gap: 10px; margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--gold); opacity: 0.5; }
.eyebrow-center { justify-content: center; }

h2.section-title {
  font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 18px;
  text-wrap: balance;
}
.section-lead { color: var(--muted); max-width: 56ch; font-size: 1.05rem; text-wrap: pretty; }

/* ---- nav -------------------------------------------------------------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: var(--nav-scrolled-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.nav.scrolled { background: rgba(10, 10, 13, 0.94); }
}
.nav-inner {
  width: 100%; max-width: var(--maxw); padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; color: var(--cream);
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-icon { display: block; width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.5; transform: scale(0.8);} }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  transition: color 0.25s; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:active { color: var(--cream); opacity: 0.85; }
.nav-links .nav-cta {
  font-family: var(--mono); font-size: 13px; color: var(--cream);
  border: 1px solid var(--line); padding: 0 18px; border-radius: 999px;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: border-color 0.25s, background 0.25s;
}
.nav-links .nav-cta:hover { border-color: var(--cardinal); background: var(--nav-cta-hover-bg); }
.nav-links .nav-cta:active { background: var(--nav-cta-active-bg); }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--ghost-bg); color: var(--cream);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.nav-toggle:hover { border-color: var(--line); background: var(--surface-hover); }
.nav-toggle:active { background: rgba(255, 255, 255, 0.04); }
.nav-toggle-bars {
  display: flex; flex-direction: column; gap: 5px; width: 18px;
}
.nav-toggle-bars span {
  display: block; height: 1.5px; background: currentColor; border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-menu {
  padding: 0; margin: auto;
  max-width: none; max-height: none;
  width: min(320px, 100vw - 32px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--cream);
  box-shadow: 0 24px 80px var(--shadow-panel);
}
.nav-menu::backdrop {
  background: rgba(10, 10, 13, 0.72);
  backdrop-filter: blur(4px);
}
.nav-menu-inner { padding: 24px; }
.nav-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft);
}
.nav-menu-head span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
}
.nav-menu-close {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--cream); cursor: pointer; font-size: 1.25rem; line-height: 1;
  transition: background 0.25s, border-color 0.25s;
}
.nav-menu-close:hover { background: var(--surface-hover); }
.nav-menu-close:active { background: rgba(255, 255, 255, 0.04); }
.nav-menu-links { display: flex; flex-direction: column; gap: 4px; }
.nav-menu-links a {
  color: var(--muted); text-decoration: none; font-size: 1rem;
  min-height: 44px; display: flex; align-items: center; padding: 0 12px;
  border-radius: 8px; transition: color 0.25s, background 0.25s;
}
.nav-menu-links a:hover { color: var(--cream); background: var(--surface-hover); }
.nav-menu-links .nav-cta {
  margin-top: 12px; justify-content: center;
  font-family: var(--mono); font-size: 13px; color: var(--cream);
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--ghost-bg);
}
.nav-menu-links .nav-cta:hover { border-color: var(--cardinal); background: var(--nav-cta-hover-bg); }

/* ---- hero ------------------------------------------------------------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 90px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: center; width: 100%; }
.hero-copy { min-width: 0; }

.status {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.08em; line-height: 1.45; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; margin-bottom: 30px;
  width: fit-content; max-width: 100%;
}
.status .live { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 6px rgba(69, 184, 114, 0.35); animation: pulse 3.2s infinite; }
.status-text { min-width: 0; }

h1.hero-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.8rem, 7.5vw, 5.4rem); line-height: 0.98; letter-spacing: -0.015em;
  margin-bottom: 26px;
  text-wrap: balance;
}
h1.hero-title .accent {
  color: var(--cardinal);
  font-style: italic;
}
.hero-rotate { display: block; color: var(--muted); font-size: 0.42em; font-family: var(--sans);
  letter-spacing: 0.02em; margin-top: 16px; height: 1.4em; }
.hero-rotate .word { color: var(--cream); border-bottom: 1px solid var(--cardinal-line); padding-bottom: 2px; }

.hero-desc { color: var(--muted); font-size: 1.12rem; max-width: 46ch; margin-bottom: 36px; text-wrap: pretty; }
.hero-desc strong { color: var(--cream); font-weight: 500; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--sans); font-size: 0.95rem; text-decoration: none; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.25s, border-color 0.25s; border: 1px solid transparent;
}
.btn-primary { color: var(--cream); background: var(--cardinal);
  box-shadow: 0 4px 18px var(--btn-primary-shadow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--btn-primary-shadow-hover); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 12px var(--btn-primary-shadow); }
.btn-ghost { color: var(--cream); border-color: var(--line); background: var(--ghost-bg); }
.btn-ghost:hover { border-color: rgba(236, 233, 227, 0.22); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); border-color: var(--line); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* hero side card — a little terminal */
.hero-card {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 50px var(--shadow-card);
}
.hero-card .bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.hero-card .bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.hero-card .bar i:nth-child(1) { background: var(--terminal-close); }
.hero-card .bar i:nth-child(2) { background: var(--terminal-minimize); }
.hero-card .bar i:nth-child(3) { background: var(--terminal-maximize); }
.hero-card .bar span { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.hero-card .body { padding: 20px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 2; }
.hero-card .body .k { color: var(--syntax-keyword); }
.hero-card .body .s { color: var(--gold); }
.hero-card .body .n { color: var(--syntax-string); }
.hero-card .body .c { color: var(--faint); }
.hero-card .body .pos { color: var(--cream); }

/* ---- marquee strip ---------------------------------------------------- */
.strip { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: 18px 0; overflow: hidden; white-space: nowrap; }
.strip .track { display: inline-flex; gap: 48px; animation: scroll 48s linear infinite; }
.strip .track span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--faint); text-transform: uppercase; display: inline-flex; gap: 48px; opacity: 0.85; }
.strip .track span::after { content: "·"; color: var(--muted); opacity: 0.5; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---- stats ------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.stat { background: var(--ink); padding: 30px 26px; min-width: 0; }
.stat .num { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.stat .num .unit { font-size: 0.5em; color: var(--gold-soft); }
.stat .lbl {
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-top: 10px;
  overflow-wrap: break-word;
}

/* ---- about ------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-body p { color: var(--muted); font-size: 1.1rem; margin-bottom: 20px; text-wrap: pretty; }
.about-body p strong { color: var(--cream); font-weight: 500; }
.about-body .lede { font-family: var(--display); font-size: 1.5rem; line-height: 1.45; color: var(--cream); text-wrap: pretty; }

.facets { display: flex; flex-direction: column; gap: 14px; }
.facet { padding: 18px 20px; border: 1px solid var(--line-soft);
  border-radius: 12px; background: var(--surface-hover); transition: border-color 0.3s; }
.facet:hover { border-color: var(--line); }
.facet h3 { font-size: 1rem; margin-bottom: 4px; text-wrap: balance; }
.facet p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* ---- work ------------------------------------------------------------- */
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 50px; flex-wrap: wrap; }

.projects { display: flex; flex-direction: column; gap: 22px; }
.project {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 28px; align-items: start;
  padding: 34px; border: 1px solid var(--line-soft); border-radius: 18px;
  background: var(--surface-hover);
  position: relative; overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.project > div { min-width: 0; }
.project::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--glow-project), transparent 45%);
}
.project:hover { border-color: var(--line); transform: translateY(-2px); }
.project:hover::before { opacity: 0.85; }
.project:active { transform: translateY(-1px); }

.project .idx { font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 6px; }
.project .flag { position: absolute; top: 0; right: 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream); background: var(--gold-flag-bg);
  border-bottom: 1px solid var(--gold-flag-border); border-left: 1px solid var(--gold-flag-border);
  padding: 5px 12px; border-bottom-left-radius: 10px; font-weight: 500; }

.project h3 { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 400; margin-bottom: 8px;
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 12px; text-wrap: balance; }
.project h3 .arrow { font-family: var(--sans); font-size: 1rem; color: var(--muted); transition: transform 0.3s, color 0.3s; }
.project:hover h3 .arrow { transform: translate(2px, -2px); color: var(--muted); }
.project .blurb { color: var(--muted); max-width: 60ch; margin-bottom: 16px; text-wrap: pretty; }
.project .blurb b { color: var(--cream); font-weight: 500; }
.project .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project .tags span { font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line-soft); border-radius: 6px; padding: 4px 10px; }
.project .meta { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.project .meta .big { display: block; font-family: var(--display); font-size: 2.2rem; color: var(--cream); line-height: 1; margin-bottom: 4px; }
.project .meta .big .unit { font-size: 0.45em; color: var(--gold-soft); }

/* ---- experience + awards (two col) ------------------------------------ */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 70px; align-items: start; }

.timeline { position: relative; }
.tl-item { position: relative; padding: 0 0 36px 30px; border-left: 1px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cardinal); box-shadow: none; }
.tl-item .when { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.tl-item h3 { font-size: 1.12rem; margin-bottom: 2px; text-wrap: balance; }
.tl-item .org { color: var(--muted); font-size: 0.95rem; margin-bottom: 8px; }
.tl-item p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

.awards { display: flex; flex-direction: column; gap: 14px; }
.award { padding: 20px 22px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--surface-hover); position: relative; overflow: hidden; transition: border-color 0.3s; }
.award:hover { border-color: var(--line); }
.award .medal { font-size: 1.4rem; margin-bottom: 10px; display: block; }
.award h3 { font-size: 1.02rem; margin-bottom: 4px; text-wrap: balance; }
.award p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ---- toolkit ---------------------------------------------------------- */
.toolkit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool-col h3 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.tool-col ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tool-col li { font-family: var(--mono); font-size: 13px; color: var(--muted);
  border: 1px solid var(--line-soft); border-radius: 7px; padding: 7px 12px;
  transition: color 0.25s, border-color 0.25s, transform 0.25s; }
.tool-col li:hover { color: var(--cream); border-color: var(--line); }

/* ---- contact ---------------------------------------------------------- */
.contact { text-align: center; }
.contact h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02; margin-bottom: 24px; text-wrap: balance; }
.contact h2 .accent {
  color: var(--cardinal);
  font-style: italic;
}
.contact p { color: var(--muted); font-size: 1.1rem; max-width: 50ch; margin: 0 auto 38px; text-wrap: pretty; }
.contact .links { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }


/* ---- footer ----------------------------------------------------------- */
footer { border-top: 1px solid var(--line-soft); padding: 40px 0; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-inner .copy { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a {
  color: var(--muted); text-decoration: none; font-size: 13px; transition: color 0.25s;
  min-height: 44px; display: inline-flex; align-items: center;
}
.foot-links a:hover { color: var(--cream); }
.foot-links a:active { color: var(--cream); opacity: 0.85; }

/* ---- reveal animation ------------------------------------------------- */
/* Guarded by .js so content is fully visible if JavaScript fails to run. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay: 0.08s; }
.reveal[data-d="2"]{ transition-delay: 0.16s; }
.reveal[data-d="3"]{ transition-delay: 0.24s; }
.reveal[data-d="4"]{ transition-delay: 0.32s; }

/* ---- responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { display: none; }
  .about-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toolkit { grid-template-columns: 1fr; gap: 30px; }
  .project { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 26px; }
  .project .idx { display: none; }
  .project .meta { text-align: left; white-space: normal; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  section { padding: var(--section-y-sm) 0; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  .status {
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    gap: 8px;
  }
}
