/* ==========================================================================
   personallyabstract.org — design system
   Tokens first; everything else reads from them so light/dark stay in sync.
   ========================================================================== */

:root {
  --bg: #f8f6f1;
  --bg-elev: #ffffff;
  --bg-sunk: #efece4;
  --text: #17171a;
  --text-2: #4a4a50;
  --muted: #74747b;
  --line: #e2ded4;
  --line-strong: #cfc9bc;
  --accent: #c2410c;          /* ember — plasma, sauna heat */
  --accent-2: #9a3412;
  --accent-soft: #fbe6da;
  --focus: #2563eb;
  --shadow: 0 1px 2px rgba(20, 16, 8, .05), 0 8px 24px -12px rgba(20, 16, 8, .18);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --narrow: 700px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111112;
    --bg-elev: #19191b;
    --bg-sunk: #0b0b0c;
    --text: #ededee;
    --text-2: #b9b9bf;
    --muted: #8a8a92;
    --line: #2a2a2e;
    --line-strong: #3a3a40;
    --accent: #fb923c;
    --accent-2: #fdba74;
    --accent-soft: #2b1a10;
    --focus: #60a5fa;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #111112;
  --bg-elev: #19191b;
  --bg-sunk: #0b0b0c;
  --text: #ededee;
  --text-2: #b9b9bf;
  --muted: #8a8a92;
  --line: #2a2a2e;
  --line-strong: #3a3a40;
  --accent: #fb923c;
  --accent-2: #fdba74;
  --accent-soft: #2b1a10;
  --focus: #60a5fa;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow {
  font: 500 .78rem/1.2 var(--font-mono);
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin: 0 0 .9rem;
}
.eyebrow a { text-decoration: none; color: inherit; }
.lede { font-size: 1.2rem; color: var(--text-2); max-width: 46ch; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.15em; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font: 500 .95rem/1 var(--font-sans); text-decoration: none;
  border: 1px solid var(--text); cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-elev); color: var(--accent); border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--text); color: var(--bg);
  font: 500 .8rem/1 var(--font-mono); letter-spacing: .02em;
}
.brand:hover .brand-mark { background: var(--accent); }
.brand-name { font-weight: 600; letter-spacing: -.01em; }
.brand:hover { color: inherit; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .45rem .8rem; border-radius: 999px;
  text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .95rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-sunk); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-sunk); }
.header-actions { display: flex; gap: .25rem; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: none; border: 1px solid transparent; border-radius: 10px;
  color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--bg-sunk); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .brand-name { display: none; }
  .menu-toggle { display: grid; }
  .site-nav { position: absolute; top: 64px; left: 0; right: 0; }
  .site-nav ul {
    display: none; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
  }
  .site-nav ul.open { display: flex; }
  .site-nav a { padding: .8rem .6rem; border-radius: 8px; font-size: 1.05rem; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 6rem; padding: 2.5rem 0 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-name { font-family: var(--font-serif); font-size: 1.25rem; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; list-style: none; padding: 0; margin: 0; align-items: center; }
.footer-links a { text-decoration: none; color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }

/* ---------- Home ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1; margin-bottom: 1.2rem; letter-spacing: -.025em; }
.roles { display: flex; flex-wrap: wrap; gap: .35rem .6rem; list-style: none; padding: 0; margin: 0 0 1.5rem; font: 500 1rem/1.4 var(--font-mono); }
.roles li { display: flex; align-items: center; gap: .6rem; }
.roles li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.hero .lede { margin-bottom: 2rem; max-width: 40ch; }
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-photo { padding: 10px; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  border: 1.5px solid var(--accent); border-radius: calc(var(--radius) + 8px); pointer-events: none;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 360px; }
  .hero-photo img { aspect-ratio: 1 / 1; }
}

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--text-2); font-weight: 500; text-decoration: none; }
.section-head a:hover { color: var(--accent); }

.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.now-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .4rem;
}
.now-card .org { font: 500 .78rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.now-card h3 { margin: 0; font-size: 1.25rem; }
.now-card p { color: var(--text-2); margin: 0; font-size: .95rem; }
.now-card a.card-link { margin-top: auto; padding-top: .6rem; font-weight: 500; font-size: .92rem; text-decoration: none; color: var(--text); }
.now-card a.card-link:hover { color: var(--accent); }
@media (max-width: 900px) { .now-grid { grid-template-columns: 1fr; } }

/* ---------- Cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-media { aspect-ratio: 16 / 10; background: var(--bg-sunk); overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media.contain img { object-fit: contain; padding: 1.5rem; }
.card-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.25rem; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card-body p { margin: 0; color: var(--text-2); font-size: .95rem; }
.card-meta { font: 500 .75rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .6rem; list-style: none; padding-left: 0; }
.tag {
  font: 500 .72rem/1 var(--font-mono); padding: .4em .65em; border-radius: 999px;
  background: var(--bg-sunk); color: var(--text-2); border: 1px solid var(--line);
}
.card-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding-top: .6rem; margin-top: auto; position: relative; z-index: 1; }
.card-links a { font-size: .9rem; font-weight: 500; text-decoration: none; color: var(--accent); }
.card-links a:hover { text-decoration: underline; }

/* ---------- Post lists ---------- */
.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a {
  display: grid; grid-template-columns: 8rem 1fr auto; gap: .3rem 1.5rem; align-items: baseline;
  padding: 1.4rem .25rem; text-decoration: none;
}
.post-list a:hover .post-title { color: var(--accent); }
.post-date { font: 400 .85rem/1.4 var(--font-mono); color: var(--muted); }
.post-title { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.2; transition: color .15s; }
.post-sub { grid-column: 2; color: var(--text-2); font-size: .97rem; }
.post-kind { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); grid-row: 1; grid-column: 3; }
.post-list.compact a { grid-template-columns: 1fr; padding: 1rem .25rem; }
.post-list.compact .post-sub { grid-column: 1; }
.post-list.compact .post-title { font-size: 1.2rem; }
@media (max-width: 640px) {
  .post-list a { grid-template-columns: 1fr; }
  .post-sub, .post-kind { grid-column: 1; grid-row: auto; }
}

/* ---------- Page ---------- */
.page { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.page-head { margin-bottom: clamp(2rem, 5vw, 3rem); max-width: 760px; }
.page-head h1 { margin-bottom: .6rem; }

/* ---------- Article ---------- */
.article-head { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: 2rem; }
.article-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); letter-spacing: -.02em; }
.article-head .lede { font-family: var(--font-serif); font-size: 1.35rem; font-style: italic; max-width: none; margin-bottom: 1.2rem; }
.meta { font: 400 .85rem/1.4 var(--font-mono); color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; }
.article-hero { margin-bottom: 2.5rem; }
.article-hero img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }

.prose { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.7; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: 1.8rem; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.35rem; margin: 1.8em 0 .5em; }
.prose a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 2em 0; padding: .2em 0 .2em 1.4em; border-left: 3px solid var(--accent);
  font-size: 1.4rem; font-style: italic; color: var(--text-2);
}
.prose blockquote p + p { margin-top: .5em; }
.prose hr { border: 0; text-align: center; margin: 2.5em 0; }
.prose hr::before { content: "· · ·"; color: var(--muted); letter-spacing: .5em; }
.prose code { font-family: var(--font-mono); font-size: .82em; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 5px; padding: .1em .35em; }
.prose pre { font-size: .85rem; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose figure { margin: 2.2em 0; }
.prose figure img { border-radius: var(--radius-sm); width: 100%; }
.prose figcaption { font: 400 .85rem/1.5 var(--font-sans); color: var(--muted); margin-top: .7em; text-align: center; }
.prose table { width: 100%; border-collapse: collapse; font: 400 .95rem/1.5 var(--font-sans); }
.prose th, .prose td { text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
.prose h2#references, .prose h2#references ~ * { font-family: var(--font-sans); }
.prose h2#references { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prose h2#references ~ ul, .prose h2#references ~ ol, .prose h2#references ~ p { font-size: .88rem; color: var(--text-2); line-height: 1.55; }
@media (max-width: 640px) { .prose { font-size: 1.12rem; } }

.article-foot { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.article-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.5rem; }
.small-head { font: 600 .8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .8rem; }
.back { text-decoration: none; font-weight: 500; color: var(--text-2); display: inline-block; margin-top: 2rem; }

/* ---------- Resume ---------- */
.resume-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.resume-top h1 { margin-bottom: .2rem; }
.resume-title { font: 500 1.05rem/1.4 var(--font-mono); color: var(--accent); margin: 0 0 1rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; list-style: none; padding: 0; margin: 0; color: var(--text-2); font-size: .95rem; }
.contact-row a { text-decoration: none; }
.filter-bar {
  position: sticky; top: 64px; z-index: 10;
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  padding: .8rem 0; margin-bottom: 2rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.filter-bar .label { font: 500 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-right: .4rem; }
.chip {
  font: 500 .9rem/1 var(--font-sans); padding: .55em 1em; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text-2); cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.resume-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 900px) { .resume-grid { grid-template-columns: 1fr; } }
.r-section { margin-bottom: 3rem; }
.r-section > h2 { font: 600 .8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 1.4rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.summary { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.55; color: var(--text); }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.highlight { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--bg-elev); }
.highlight strong { display: block; font: 500 1.45rem/1.15 var(--font-serif); color: var(--accent); margin-bottom: .3rem; white-space: nowrap; letter-spacing: -.01em; }
.highlight span { display: block; font-size: .84rem; line-height: 1.45; color: var(--text-2); }
@media (max-width: 640px) { .highlights { grid-template-columns: 1fr; } }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.job { position: relative; padding: 0 0 2.2rem 1.6rem; border-left: 1px solid var(--line); }
.job:last-child { padding-bottom: .5rem; }
.job::before {
  content: ""; position: absolute; left: -6px; top: .45rem; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.job.current::before { background: var(--accent); }
.job-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline; }
.job h3 { font-size: 1.3rem; margin: 0; }
.job-dates { font: 400 .82rem/1.4 var(--font-mono); color: var(--muted); white-space: nowrap; }
.job-org { color: var(--text-2); font-weight: 500; margin: .2rem 0 .7rem; font-size: .97rem; }
.job-org .loc { color: var(--muted); font-weight: 400; }
.job ul { margin: 0; padding-left: 1.1rem; color: var(--text-2); font-size: .97rem; }
.job li + li { margin-top: .35rem; }
.job li::marker { color: var(--line-strong); }
.badge { display: inline-block; font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: .35em .55em; border-radius: 5px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; margin-left: .4rem; }

.side-block { margin-bottom: 2.2rem; }
.side-block h2 { font: 600 .8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.side-block h3 { font: 600 .92rem/1.3 var(--font-sans); margin: 1rem 0 .5rem; }
.side-block ul { list-style: none; padding: 0; margin: 0; }
.side-block li { font-size: .93rem; color: var(--text-2); padding: .3rem 0; }
.side-block li strong { color: var(--text); font-weight: 600; display: block; }
.side-block li small { color: var(--muted); font-size: .82rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.skill-tags li { padding: 0; }
.skill-tags .tag { display: inline-block; font-size: .78rem; }

/* filter visibility: items carry data-tracks="science data ..." */
[data-filter="science"] [data-tracks]:not([data-tracks~="science"]),
[data-filter="engineering"] [data-tracks]:not([data-tracks~="engineering"]),
[data-filter="data"] [data-tracks]:not([data-tracks~="data"]),
[data-filter="fitness"] [data-tracks]:not([data-tracks~="fitness"]) { display: none !important; }

/* ---------- Print (resume → clean PDF) ---------- */
@media print {
  :root { --bg: #fff; --bg-elev: #fff; --text: #000; --text-2: #222; --muted: #555; --line: #ccc; --accent: #9a3412; }
  body { font-size: 10.5pt; background: #fff; }
  .site-header, .site-footer, .filter-bar, .no-print, .skip-link { display: none !important; }
  .page { padding-top: 0; }
  .wrap { max-width: none; padding: 0; }
  .resume-grid { grid-template-columns: 1fr 210px; gap: 24px; }
  .highlights { display: none; }
  .summary { font-size: 11.5pt; }
  .job { padding-bottom: 12px; break-inside: avoid; }
  .r-section { margin-bottom: 16px; }
  a { text-decoration: none; }
  @page { margin: 14mm; }
}

/* ---------- Misc ---------- */
.notice { padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.center { text-align: center; }
.not-found { text-align: center; padding: 6rem 0 2rem; }
.not-found .big { font: 500 clamp(5rem, 18vw, 9rem)/1 var(--font-serif); color: var(--accent); margin: 0; }

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

/* ---------- Epistemion nav item + page ---------- */
.site-nav a.nav-venture { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); margin-left: .35rem; }
.site-nav a.nav-venture::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: .45rem; vertical-align: middle; box-shadow: 0 0 0 3px var(--accent-soft); }
.site-nav a.nav-venture:hover, .site-nav a.nav-venture[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { .site-nav a.nav-venture { margin: .4rem 0 0; } }

.venture-hero {
  position: relative; overflow: hidden; border-radius: calc(var(--radius) * 1.4);
  background: #0e0e10; color: #f1f1f2; padding: clamp(2rem, 6vw, 4.5rem);
  margin-top: clamp(1.5rem, 4vw, 3rem);
}
.venture-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(251,146,60,.28), transparent 60%),
    radial-gradient(40% 60% at 0% 100%, rgba(96,165,250,.14), transparent 60%),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 32px 100%;
}
.venture-hero > * { position: relative; }
.venture-hero .eyebrow { color: #fb923c; }
.venture-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 16ch; color: #fff; }
.venture-hero .lede { color: #c9c9cf; max-width: 52ch; margin-bottom: 2rem; }
.venture-hero .btn { background: #fb923c; border-color: #fb923c; color: #111; }
.venture-hero .btn:hover { background: #fff; border-color: #fff; color: #111; }
.venture-hero .btn-ghost { background: transparent; color: #f1f1f2; border-color: rgba(255,255,255,.3); }
.venture-hero .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: #fff; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.service { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.service .num { font: 500 .78rem/1 var(--font-mono); color: var(--accent); }
.service h3 { margin: .6rem 0 .4rem; font-size: 1.2rem; }
.service p { margin: 0; color: var(--text-2); font-size: .94rem; }
.founders { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .founders { grid-template-columns: 1fr; } }
.founder { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: var(--bg-elev); }
.founder h3 { margin: 0 0 .2rem; }
.founder .role { font: 500 .78rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: .8rem; }
.founder p { color: var(--text-2); font-size: .95rem; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 2rem; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.cta-band h2 { margin: 0 0 .3rem; }
.cta-band p { margin: 0; color: var(--text-2); }
.venture-promo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 820px) { .venture-promo { grid-template-columns: 1fr; } }
.venture-promo ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.venture-promo li { display: flex; gap: .7rem; align-items: baseline; color: var(--text-2); }
.venture-promo li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); }

/* Résumé view-specific summaries & highlight count */
[data-resume] [data-view] { display: none; }
[data-filter="all"] [data-view="all"],
[data-filter="science"] [data-view="science"],
[data-filter="engineering"] [data-view="engineering"],
[data-filter="data"] [data-view="data"],
[data-filter="fitness"] [data-view="fitness"] { display: block; }
/* highlights: shown only in the views they're tagged for */
[data-filter="all"] .highlight:not([data-hl~="all"]),
[data-filter="science"] .highlight:not([data-hl~="science"]),
[data-filter="engineering"] .highlight:not([data-hl~="engineering"]),
[data-filter="data"] .highlight:not([data-hl~="data"]),
[data-filter="fitness"] .highlight:not([data-hl~="fitness"]) { display: none; }

/* Guard against decorative elements causing sideways scroll on small phones */
.hero { overflow-x: clip; }

/* Quick answers (FAQ) */
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem 2.5rem; margin: 0; }
.faq-item { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.faq dt { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: .4rem; }
.faq dd { margin: 0; color: var(--text-2); font-size: .97rem; }
@media (max-width: 400px) { .faq { grid-template-columns: 1fr; } }
.service h3 a { text-decoration: none; }
.card-media.wide { aspect-ratio: 1200 / 630; }
