/* Shared styles for prithviraj97.github.io (home, notes, posts) */

:root {
  --paper: #FAFAF7;
  --paper-2: #F3F2ED;
  --card: #FFFFFF;
  --ink: #16181D;
  --text: #24272D;
  --body: #3F444C;
  --muted: #4B5059;
  --faint: #646A73;
  --rule: #E4E2DC;
  --rule-soft: #EEECE6;
  --rule-strong: #D6D4CC;
  --accent: #2B47C7;
  --accent-ink: #1F3797;
  --accent-hover: #1A2F8F;
  --accent-tint: #ECEFFB;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.plain { text-decoration: none; }
.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.mark { width: 36px; height: 36px; display: block; flex: none; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; font-size: 15px; }
.nav-links a { color: var(--body); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { font-weight: 500; }
.nav-cv {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border: 1px solid var(--rule-strong); border-radius: 999px; font-weight: 500; color: var(--ink) !important;
}
.nav-cv:hover { background: var(--card); }

/* ---------- Shared bits ---------- */
.kicker {
  margin: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}
.display { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font: 500 15.5px var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { background: var(--card); border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { border-color: #B9BDC8; background: #F6F5F1; color: var(--ink); }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 6px; background: #F1F0EB;
  color: var(--body); font-size: 12.5px; font-weight: 500; line-height: 1.6;
}
.chip-accent { background: var(--accent-tint); color: var(--accent-ink); }
.chip-round { border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px;
  transition: border-color .15s, box-shadow .15s;
}
a.card { color: var(--ink); text-decoration: none; }
.card.lift:hover { border-color: #C9CCD6; box-shadow: 0 10px 30px -18px rgba(22, 24, 29, .35); }
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; font-size: 15px; }

/* ---------- Home: hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px 64px; padding-top: 88px; padding-bottom: 80px; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.eyebrow {
  margin: 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(42px, 6vw, 68px);
  line-height: 1.02; letter-spacing: -0.025em;
}
.hero h1 em { color: var(--accent); }
.lead { margin: 0; max-width: 580px; font-size: 19px; line-height: 1.65; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.socials { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--body); font-size: 14.5px; text-decoration: none;
}
.socials a:hover { background: #F1F0EB; color: var(--ink); }
.portrait { flex: 0 1 420px; min-width: 0; position: relative; padding: 36px; }
.portrait .trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait .frame { position: relative; border-radius: 24px; overflow: hidden; background: #ECEAE3; aspect-ratio: 4 / 5; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.focus-card {
  position: relative; margin: -28px 0 0 20px; display: inline-flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule);
  box-shadow: 0 12px 30px -20px rgba(22, 24, 29, .5); font-size: 13.5px; line-height: 1.4;
}
.focus-card .label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.focus-card strong { font-weight: 500; }

/* ---------- Home: sections ---------- */
.section { border-top: 1px solid var(--rule); }
.section.alt { background: var(--paper-2); }
.section > .wrap { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 44px; }
.sec-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.sec-head .display { font-size: clamp(32px, 4vw, 44px); }
.sec-head p.intro { margin: 0; font-size: 18px; line-height: 1.65; color: var(--muted); }
.sec-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-head-row .sec-head { max-width: none; }

.about { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.about-head { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.about-head .display { font-size: 40px; }
.about-body { flex: 2 1 520px; min-width: 0; font-family: var(--serif); font-size: 20px; line-height: 1.7; color: var(--text); }
.about-body p { margin: 0 0 20px; }
.about-body p:last-child { margin-bottom: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.research-card { display: flex; flex-direction: column; gap: 14px; }
.icon-tile {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.icon-tile .icon { width: 22px; height: 22px; }
.research-card h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.research-card p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 8px 14px; border-radius: 999px; border: 1px solid #DAD8D0; background: var(--paper); font-size: 14px; color: var(--body); }

.pubs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pub { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 32px 0; border-bottom: 1px solid var(--rule); }
.pub-year { margin: 0; flex: 0 0 72px; font-family: var(--mono); font-size: 14px; color: var(--faint); padding-top: 4px; }
.pub-body { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pub-body .chips { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pub h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.25; letter-spacing: -0.01em; }
.pub h3 a { color: var(--ink); text-decoration: none; }
.pub h3 a:hover { color: var(--accent); }
.pub .authors { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.pub .authors strong { color: var(--ink); font-weight: 600; }
.pub .blurb { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }
.pub .links { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14.5px; font-weight: 500; }

.note-card { display: flex; flex-direction: column; gap: 14px; }
.note-card .meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.note-card .meta.accent { color: var(--accent); }
.note-card .title { font-family: var(--serif); font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.note-card .desc { font-size: 15px; line-height: 1.6; color: var(--muted); }
.note-card .go { margin-top: auto; padding-top: 8px; font-size: 14.5px; font-weight: 500; color: var(--accent); }

.exp { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; }
.timeline { flex: 1 1 520px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 20px; }
.timeline .rail { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.timeline .node { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #9EA3AC; }
.timeline li.now .node { border: 0; background: var(--accent); }
.timeline .line { flex: 1; width: 1px; background: #DAD8D0; margin-top: 6px; }
.timeline li:last-child .line { display: none; }
.timeline .item { padding-bottom: 36px; display: flex; flex-direction: column; gap: 6px; }
.timeline li:last-child .item { padding-bottom: 0; }
.timeline .when { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.timeline h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.timeline .org { margin: 0; font-size: 15.5px; color: var(--muted); }
.timeline .desc { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--body); }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.side .card { display: flex; flex-direction: column; gap: 14px; }
.side h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.side p { margin: 0; }
.side .strong { font-size: 16px; font-weight: 600; }
.side .sub { font-size: 15px; line-height: 1.6; color: var(--muted); }
.courses { list-style: none; margin: 0; padding: 0; }
.courses li { display: flex; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); font-size: 15.5px; }
.courses li:last-child { border-bottom: 0; }
.courses .code { flex: 0 0 60px; font-family: var(--mono); font-size: 13.5px; color: var(--accent-ink); padding-top: 2px; }

.contact { padding-top: 24px; padding-bottom: 88px; }
.contact-panel {
  background: var(--ink); color: var(--paper); border-radius: 28px; padding: 64px 48px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.contact-panel .text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-panel .kicker { color: #A9AEB8; }
.contact-panel h2 { color: #fff; font-size: clamp(32px, 4vw, 46px); }
.contact-panel .email { font-size: 22px; overflow-wrap: anywhere; text-underline-offset: 6px; color: #C3CEFF; }
.contact-panel .email:hover { color: #fff; }
.contact-panel .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-outline-light {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1px solid #3A3E47; color: var(--paper); font-size: 14.5px; font-weight: 500; text-decoration: none;
}
.btn-outline-light:hover { border-color: #6B707A; color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 28px; padding-bottom: 40px; font-size: 14px; color: var(--faint);
}
.site-footer p { margin: 0; display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

/* ---------- Post (paper explainer) ---------- */
.paper-head {
  max-width: 920px; margin: 0 auto; padding: 72px 24px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
}
.crumbs { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.crumbs a { color: var(--faint); }
.paper-head .chips { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.paper-head h1 {
  margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08; letter-spacing: -0.025em;
}
.deck { margin: 0; max-width: 700px; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5; color: var(--muted); }
.byline { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 6px; }
.authors-list { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: 17px; line-height: 1.5; }
.authors-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.authors-list sup, .affils sup { color: var(--accent); }
.affils { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; font-size: 14.5px; color: var(--muted); }
.paper-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.paper-actions .btn { min-height: 46px; padding: 0 20px; font-size: 15px; gap: 8px; }
.post-meta { margin: 4px 0 0; font-size: 14px; color: var(--faint); }

.teaser { padding-bottom: 64px; margin-top: 0; margin-bottom: 0; display: flex; flex-direction: column; gap: 16px; }
.pipeline {
  background: var(--card); border: 1px solid var(--rule); border-radius: 24px; padding: 40px 32px;
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 12px;
}
.stage {
  flex: 1 1 150px; min-width: 0; border: 1px solid var(--rule); border-radius: 16px; padding: 18px;
  background: var(--paper); display: flex; flex-direction: column; gap: 6px;
}
.stage .step { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.stage .name { font-weight: 600; font-size: 15.5px; }
.stage .what { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.stage.core { flex-basis: 170px; border: 1.5px solid var(--accent); background: var(--accent-tint); }
.stage.core .step { color: var(--accent-ink); }
.stage.core .what { color: #2A3566; }
.stage.out { border: 0; background: var(--ink); color: var(--paper); }
.stage.out .step { color: #A9AEB8; }
.stage.out .what { color: #C9CDD4; }
.arrow { display: flex; align-items: center; color: #9EA3AC; font-size: 20px; }
figcaption { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
figcaption strong { color: var(--ink); font-weight: 600; }
.teaser figcaption { max-width: 760px; margin: 0 auto; text-align: center; }

.summary { padding-bottom: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tldr {
  grid-column: 1 / -1; background: var(--ink); color: var(--paper); border-radius: 20px; padding: 28px 32px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline;
}
.tldr .label { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; color: #A9AEB8; }
.tldr p { margin: 0; flex: 1 1 520px; font-family: var(--serif); font-size: 22px; line-height: 1.5; color: #fff; }
.fact { padding: 24px 28px; display: flex; flex-direction: column; gap: 6px; }
.fact .num { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 500; color: var(--accent); }
.fact .txt { font-size: 15px; line-height: 1.5; color: var(--body); }

.post-layout { padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 40px 72px; align-items: flex-start; }
.post-aside { flex: 1 1 220px; max-width: 260px; min-width: 0; display: flex; flex-direction: column; gap: 32px; position: sticky; top: 96px; }
.toc { display: flex; flex-direction: column; gap: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; line-height: 1.4; }
.toc .sub { padding-left: 14px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--ink); }
.toc a.active { font-weight: 500; }
.resources { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14.5px; }

.article { flex: 999 1 560px; max-width: 700px; min-width: 0; font-family: var(--serif); font-size: 20px; line-height: 1.75; color: var(--text); }
.article p { margin: 0 0 22px; }
.article section { margin: 0 0 48px; }
.article h2 { margin: 0 0 18px; font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
.article h2 .num { color: var(--accent); font-family: var(--mono); font-size: 18px; vertical-align: middle; margin-right: 12px; }
.article h3 { margin: 28px 0 12px; font-family: var(--sans); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.abstract { padding: 28px 32px; background: var(--paper-2); border-radius: 18px; }
.abstract h2 { margin: 0 0 10px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.abstract p { margin: 0; font-size: 18px; line-height: 1.7; }
.eq {
  margin: 0 0 12px; padding: 20px 24px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card);
  display: flex; align-items: center; gap: 16px; overflow-x: auto;
}
.eq:last-of-type { margin-bottom: 20px; }
.eq::before { content: ""; flex: 1; }
.eq .math { font-family: var(--serif); font-size: 23px; white-space: nowrap; }
.eq .math sub, .eq .math sup { font-size: 14px; }
.eq .no { flex: 1; text-align: right; font-family: var(--sans); font-size: 14px; color: var(--faint); }
.article figure { margin: 0 0 28px; display: flex; flex-direction: column; gap: 12px; }
.article figcaption { font-family: var(--sans); }
.article figure img { display: block; width: 100%; border-radius: 16px; border: 1px solid var(--rule); }
.figure-ph {
  aspect-ratio: 16 / 9; border-radius: 16px; border: 1.5px dashed #C9CCD6; background: var(--paper-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--faint); font-family: var(--sans); text-align: center; padding: 24px; font-size: 13.5px;
}
.figure-ph strong { font-size: 15px; font-weight: 500; color: var(--body); }
.table-box { overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.table-box table { width: 100%; min-width: 480px; border-collapse: collapse; font-family: var(--sans); font-size: 15px; line-height: 1.4; }
.table-box th { padding: 14px 18px; font-weight: 600; color: var(--body); background: #F6F5F1; border-bottom: 1px solid var(--rule); text-align: left; }
.table-box td { padding: 14px 18px; border-bottom: 1px solid var(--rule-soft); }
.table-box tr:last-child td { border-bottom: 0; }
.table-box .r { text-align: right; }
.table-box .n { font-family: var(--mono); font-size: 14px; }
.table-box .ours td { background: var(--accent-tint); font-weight: 600; color: var(--ink); }
.table-box .ours .gain { color: var(--accent-ink); }
.pull { margin: 0; padding: 8px 0; font-family: var(--serif); font-style: italic; font-size: 27px; line-height: 1.4; color: var(--ink); text-align: center; }
.pull::before { content: ""; display: block; width: 40px; height: 2px; background: var(--accent); margin: 0 auto 18px; }
.todo { color: var(--faint); font-style: italic; }
.cite { font-family: var(--sans); }
.cite-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cite-head h2 { margin: 0; font-size: 30px; }
.copy-btn { min-height: 44px; padding: 0 18px; font-size: 14.5px; gap: 8px; }
.bib {
  margin: 0; padding: 22px 24px; border-radius: 16px; background: var(--ink); color: #E6E8EE;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7; white-space: pre; overflow-x: auto;
}
.refs { font-family: var(--sans); padding-top: 28px; border-top: 1px solid var(--rule); }
.refs h2 { margin: 0 0 14px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.refs ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--body); }
.refs li { display: flex; gap: 12px; }
.refs .k { flex: 0 0 28px; color: var(--faint); }
.author-box { border-top: 1px solid var(--rule); background: var(--paper-2); }
.author-box .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.author { display: flex; align-items: center; gap: 20px; flex: 1 1 420px; min-width: 0; }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author p { margin: 0; }
.author .who { font-weight: 600; font-size: 17px; }
.author .bio { font-size: 15px; line-height: 1.55; color: var(--muted); }
.author-box .btn { min-height: 46px; padding: 0 20px; font-size: 15px; }

/* ---------- Notes index ---------- */
.notes-main { padding-top: 72px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 48px; }
.notes-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.notes-head .text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.notes-head h1 { font-size: clamp(40px, 5.5vw, 60px); line-height: 1.05; letter-spacing: -0.025em; }
.notes-head .lead { font-size: 18px; max-width: 600px; }
.search { flex: 0 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.search label { font-size: 13.5px; font-weight: 500; color: var(--body); }
.search input {
  min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--rule-strong);
  background: var(--card); font: 400 15px var(--sans); color: var(--ink); width: 100%;
}
.feat {
  display: flex; flex-wrap: wrap; border-radius: 28px; overflow: hidden; border: 1px solid var(--rule);
  background: var(--card); color: var(--ink); text-decoration: none; transition: box-shadow .15s;
}
.feat:hover { color: var(--ink); box-shadow: 0 18px 40px -24px rgba(22, 24, 29, .45); }
.feat-art { flex: 1 1 420px; min-width: 0; min-height: 300px; background: var(--ink); position: relative; display: flex; align-items: flex-end; padding: 28px; }
.feat-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.feat-art span { position: relative; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: #C9CDD4; }
.feat-body { flex: 1 1 420px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.feat-body .row { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.feat-body .date { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.feat-body h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.15; }
.feat-body p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.feat-body .go { font-size: 15px; font-weight: 500; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; font: 500 14.5px var(--sans);
  background: var(--card); color: var(--body); border: 1px solid var(--rule-strong);
}
.filter:hover { border-color: #B9BDC8; }
.filter[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.note-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.note-list li { border-bottom: 1px solid var(--rule); }
.note-list li[hidden] { display: none; }
.note-row { display: flex; flex-wrap: wrap; gap: 10px 40px; padding: 28px 0; color: var(--ink); text-decoration: none; }
.note-row:hover { color: var(--ink); }
.note-row:hover .title { color: var(--accent); }
.note-row .date { flex: 0 0 96px; font-family: var(--mono); font-size: 13.5px; color: var(--faint); padding-top: 6px; }
.note-row .body { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.note-row .tagline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--faint); }
.note-row .title { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; transition: color .15s; }
.note-row .desc { font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.note-row .go { flex: 0 0 auto; align-self: center; font-size: 14.5px; font-weight: 500; color: var(--accent); }
.empty { margin: 0; padding: 32px 0; text-align: center; font-size: 16px; color: var(--faint); }

/* ---------- Hobbies ---------- */
.hero-text .tags li { background: var(--card); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding-bottom: 56px; }
.quote {
  margin: 0; padding: 32px; border-radius: var(--radius); background: var(--paper-2);
  display: flex; flex-direction: column; gap: 14px;
}
.quote p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.4; color: var(--ink); }
.quote cite { font-style: normal; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.quote cite::before { content: "— "; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 56px; }
.jump a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--card); color: var(--body); font-size: 14.5px; text-decoration: none;
}
.jump a:hover { border-color: #B9BDC8; color: var(--ink); }
.story { max-width: 720px; font-family: var(--serif); font-size: 20px; line-height: 1.75; color: var(--text); }
.story p { margin: 0 0 20px; }
.story p:last-child { margin-bottom: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-flow: dense; gap: 20px; }
.photo { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.photo a { display: block; border-radius: 18px; overflow: hidden; background: #ECEAE3; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.photo a:hover img { transform: scale(1.03); }
.photo figcaption { font-size: 14px; color: var(--muted); }
.split { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-start; }
.split .story { flex: 2 1 520px; min-width: 0; }
.fact-stack { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fact-stack .fact { padding: 20px 24px; gap: 4px; }
.fact-stack .label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.fact-stack .val { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); }
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; border-top: 1px solid var(--rule); }
.books li { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.books .title { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--ink); }
.books .by { font-size: 14.5px; color: var(--muted); }
.interest { display: flex; flex-direction: column; gap: 16px; }
.interest h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.interest .tags li { padding: 6px 12px; font-size: 13.5px; }
.langs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.langs li {
  padding: 14px 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--rule);
  font-family: var(--serif); font-size: 24px; font-weight: 500;
}
@media (min-width: 720px) {
  .gallery .wide { grid-column: span 2; }
  .gallery .wide img { aspect-ratio: 8 / 3; }
}
@media (min-width: 900px) {
  .photos.grid-2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .post-aside { position: static; max-width: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 48px; padding-bottom: 48px; }
  .portrait { padding: 20px; }
  .section > .wrap { padding-top: 64px; padding-bottom: 64px; }
  .about-body, .article, .story { font-size: 18px; }
  .quote { padding: 24px; }
  .quote p { font-size: 21px; }
  .contact-panel { padding: 40px 24px; }
  .paper-head { padding-top: 48px; }
  .pipeline { padding: 24px 16px; }
  .arrow { width: 100%; justify-content: center; transform: rotate(90deg); }
  .abstract { padding: 22px 20px; }
  .feat-body { padding: 28px 24px; }
  .eq .math { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
