/* ==========================================================
   Aadesh Salecha — "Playful, illustrated, personal"
   Cream paper, flax/sunflower, Stanford-ish red, sky, ink.
   ========================================================== */

:root {
  color-scheme: light;
  --cream: #fbf5e6;
  --cream-2: #f5edd6;
  --paper: #fffdf7;
  --flax: #ddd78d;
  --flax-soft: #efecc4;
  --flax-deep: #b9b25a;
  --red: #a11d22;          /* link + accent text (7.3:1 on cream) */
  --red-sticker: #b3292c;  /* fills with white text (6.4:1) */
  --red-soft: #f6d8d0;
  --sky: #9fcfe6;
  --sky-soft: #d9ecf5;
  --sky-deep: #1d5b80;
  --sage: #b9cfa4;
  --sage-soft: #e3ecd6;
  --sage-deep: #3d6738;
  --ink: #1f2a32;
  --ink-2: #3c4449;
  --muted: #5b5547;
  --line: rgba(31, 42, 50, 0.14);
  --shadow: 0 1px 0 rgba(31, 42, 50, 0.06), 0 10px 24px -14px rgba(60, 45, 20, 0.35);
  --shadow-lift: 0 2px 0 rgba(31, 42, 50, 0.06), 0 18px 34px -16px rgba(60, 45, 20, 0.45);

  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, "Bitstream Charter", "DejaVu Serif", serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", "Chalkboard SE", "Marker Felt", "Comic Neue", cursive;

  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
}

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

body {
  margin: 0;
  background-color: var(--cream);
  /* faint paper grain dots */
  background-image: radial-gradient(rgba(120, 100, 60, 0.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
sub { line-height: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hand { font-family: var(--f-hand); font-weight: 700; }

/* ---------- Links: distinct color + underline ---------- */
a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(161, 29, 34, 0.45);
  border-radius: 3px;
  transition: background-color .15s ease, text-decoration-color .15s ease, color .15s ease;
}
a:hover {
  color: #7d1418;
  text-decoration-color: currentColor;
  background-color: var(--flax-soft);
  text-decoration-thickness: 3px;
}
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Doodles ---------- */
.doodle {
  width: 64px; height: 64px;
  fill: none; stroke: var(--ink); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  overflow: visible;
  color: var(--ink);
}

/* ---------- Top bar ---------- */
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { background: none; color: var(--ink); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--flax); border: 2px solid var(--ink);
  font-family: var(--f-display); font-weight: 800; font-size: 16px; letter-spacing: .02em;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-6deg);
}
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 6px 12px; border-radius: 999px;
}
.topnav a:hover { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) var(--gutter) clamp(8px, 2vw, 24px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.hello { font-size: 30px; color: var(--red); margin: 0 0 4px; display: flex; align-items: center; gap: 6px; transform: rotate(-2deg); transform-origin: left; }
.doodle-inline { width: 28px; height: 28px; }
.hero h1 {
  font-size: clamp(54px, 9vw, 112px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: .95;
  margin-bottom: 22px;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.tagline { font-size: clamp(19px, 2.1vw, 23px); color: var(--ink-2); max-width: 30ch; margin-bottom: 24px; line-height: 1.45; }
mark {
  background: linear-gradient(transparent 55%, var(--flax) 55%, var(--flax) 92%, transparent 92%);
  color: inherit; padding: 0 2px;
}
mark.m-sky { background: linear-gradient(transparent 55%, var(--sky) 55%, var(--sky) 92%, transparent 92%); }
mark.m-sage { background: linear-gradient(transparent 55%, var(--sage) 55%, var(--sage) 92%, transparent 92%); }

.stickers { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px 10px; }
.sticker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700; font-size: 14.5px; line-height: 1.3;
  border: 2px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  background: var(--paper); color: var(--ink);
}
.stickers .sticker:nth-child(1) { transform: rotate(-2deg); }
.stickers .sticker:nth-child(2) { transform: rotate(1.5deg); }
.stickers .sticker:nth-child(3) { transform: rotate(-1deg); }
.stickers .sticker:nth-child(4) { transform: rotate(2deg); }
.stickers .sticker:nth-child(5) { transform: rotate(-1.5deg); }
.s-red { background: var(--red-sticker); color: #fff; }
.s-flax { background: var(--flax); }
.s-sky { background: var(--sky); }
.s-paper { background: var(--paper); }
.s-sage { background: var(--sage); }
/* clickable highlight stickers */
.stickers .sticker { padding: 0; }
.stickers .sticker > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  color: inherit; text-decoration: none;
}
.stickers .sticker > a::after { content: "\2197"; font-size: .85em; opacity: .7; }
.stickers .sticker > a[href^="#"]::after { content: "\2193"; }
.stickers .sticker > a:hover { background: rgba(255, 255, 255, .28); color: inherit; }
.stickers .sticker > a:focus-visible { outline-offset: 2px; }
.stickers .sticker:has(a:hover) { box-shadow: 4px 5px 0 var(--ink); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15.5px; text-decoration: none;
  border: 2px solid var(--ink);
}
.btn-ink { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--flax-deep); }
.btn-ink:hover { background: #0f171c; color: #fff; }
.btn-ghost { color: var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.btn-ghost:hover { background: var(--flax-soft); color: var(--ink); }

/* hero art */
.hero-art { position: relative; display: grid; place-items: center; min-height: 580px; }
.hero-scene { position: absolute; inset: 0; pointer-events: none; }
.hero-scene.has-illustration img { width: 100%; height: 100%; object-fit: contain; }
.blob { position: absolute; border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; }
.blob-sky { width: 82%; height: 76%; left: 8%; top: 12%; background: var(--sky-soft); border: 2px dashed rgba(29, 91, 128, .35); }
.blob-flax { width: 34%; height: 30%; right: 0; bottom: 2%; background: var(--flax-soft); border-radius: 50%; }
.hero-scene .doodle { position: absolute; }
.d-pos-sun { width: 96px !important; height: 96px !important; top: 0; right: 2%; }
.d-pos-sat { width: 80px !important; height: 80px !important; top: 8%; left: 2%; }
.d-pos-leaf { width: 72px !important; height: 72px !important; bottom: 10%; left: 3%; }
.d-pos-panel { width: 92px !important; height: 92px !important; bottom: 4%; right: 3%; }
.d-pos-spark { width: 34px !important; height: 34px !important; top: 46%; right: 4%; }
.orbit { position: absolute; top: 0; left: 8%; width: 70%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 3 7; stroke-linecap: round; opacity: .55; }

.polaroid {
  position: relative; z-index: 1;
  margin: 0;
  width: min(320px, 66%);
  background: #fff;
  padding: 14px 14px 10px;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 22px 40px -18px rgba(50, 35, 10, .5);
  transform: rotate(-3.5deg);
  transition: transform .35s cubic-bezier(.2,.8,.2,1.2);
}
.polaroid img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; width: 100%; }
.polaroid figcaption { text-align: center; font-size: 26px; color: var(--ink); padding: 8px 0 2px; line-height: 1.1; }
.tape {
  position: absolute; z-index: 2;
  width: 110px; height: 30px;
  background: rgba(221, 215, 141, 0.78);
  border-left: 2px dotted rgba(255,255,255,.6); border-right: 2px dotted rgba(255,255,255,.6);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.tape-top { top: -14px; left: 50%; transform: translateX(-50%) rotate(4deg); }

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) var(--gutter) 0;
  scroll-margin-top: 12px;
}
.section-head { margin-bottom: clamp(22px, 3vw, 34px); }
.eyebrow { font-size: 25px; color: var(--red); margin: 0 0 2px; transform: rotate(-1.5deg); transform-origin: left; display: inline-block; }
.section h2 { font-size: clamp(36px, 5vw, 54px); font-weight: 800; letter-spacing: -0.015em; }
.hl {
  background: linear-gradient(transparent 58%, var(--flax) 58%, var(--flax) 90%, transparent 90%);
  padding: 0 6px; margin-left: -6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-sky { background-image: linear-gradient(transparent 58%, var(--sky) 58%, var(--sky) 90%, transparent 90%); }
.hl-sage { background-image: linear-gradient(transparent 58%, var(--sage) 58%, var(--sage) 90%, transparent 90%); }
.hl-red { background-image: linear-gradient(transparent 58%, var(--red-soft) 58%, var(--red-soft) 90%, transparent 90%); }
.section-intro { max-width: 70ch; color: var(--ink-2); margin-top: 14px; }

.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 6px 0 rgba(31, 42, 50, .9);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.bio-card { padding: clamp(22px, 3.2vw, 38px); }
.bio-toggle {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--cream-2); border: 2px solid var(--ink); border-radius: 999px;
  margin-bottom: 20px;
}
.toggle-btn {
  font: inherit; font-weight: 700; font-size: 15px;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 7px 20px; min-height: 40px;
  background: transparent; color: var(--ink);
  transition: background-color .2s ease, color .2s ease;
}
.toggle-btn:hover { background: var(--flax-soft); }
.toggle-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bio p { color: var(--ink-2); }
.bio .lead { font-size: 1.1em; color: var(--ink); }

.offline {
  margin-top: 8px; padding-top: 18px;
  border-top: 2px dashed var(--line);
}
.offline-label { color: var(--muted); margin-bottom: 10px; }
.hobbies { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.hobbies li { display: flex; align-items: center; gap: 4px; }
.hobby-art { display: inline-grid; place-items: center; width: 46px; height: 46px; }
.hobby-art .doodle, .hobby-art img { width: 40px; height: 40px; }
.hobbies .hand { font-size: 22px; color: var(--ink); }

.icon-row {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: flex; justify-content: center; gap: clamp(14px, 3vw, 26px);
}
.icon-row a {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  color: var(--ink); text-decoration: none;
}
.icon-row a:hover { color: var(--red); background: var(--flax-soft); }
.icon-row svg { width: 30px; height: 30px; fill: currentColor; }

/* sticky note */
.sticky-note {
  position: relative;
  background: var(--flax);
  background-image: linear-gradient(180deg, rgba(255,255,255,.18), transparent 30%);
  padding: 34px 26px 26px;
  border-radius: 4px 4px 4px 28px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 24px 34px -20px rgba(60, 45, 10, .55);
  transform: rotate(2deg);
  margin-top: 14px;
}
.pin { position: absolute; top: -26px; left: 50%; width: 52px; height: 52px; transform: translateX(-50%); fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; overflow: visible; }
.note-kicker { font-size: 30px; margin: 0 0 6px; color: var(--ink); transform: rotate(-2deg); }
.note-logo { display: inline-block; padding: 4px 6px; margin: 0 0 8px -6px; }
.note-logo img { height: 34px; width: auto; }
.note-logo:hover { background: rgba(255,255,255,.45); }
.note-role { margin-bottom: 10px; line-height: 1.45; color: var(--ink); }
.note-list { margin: 0 0 12px; padding-left: 18px; color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.note-list li { margin-bottom: 6px; }
.note-list li::marker { color: var(--red); }
.note-link { margin: 0; font-weight: 700; }
.sticky-note a { color: #7d1418; text-decoration-color: rgba(125, 20, 24, .6); }
.sticky-note a:hover { background: rgba(255,255,255,.5); }
.note-art { position: absolute; right: 14px; bottom: 10px; width: 64px; height: 64px; opacity: .9; }
.note-art .doodle, .note-art img { width: 64px; height: 64px; }

/* ---------- Gantt (path at a glance) ---------- */
.gantt { margin: 0 0 clamp(30px, 4vw, 44px); padding: 20px clamp(16px, 3vw, 30px) 16px; }
.gantt-cap { font-family: var(--f-hand); font-weight: 700; font-size: 24px; margin-bottom: 8px; }
.gantt-body { --label: 150px; }
.gantt-rows { list-style: none; margin: 0; padding: 0; }
.gantt-rows li { display: grid; grid-template-columns: var(--label) 1fr; align-items: center; gap: 12px; min-height: 30px; }
.g-label { font-size: 14.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.g-track {
  position: relative; height: 30px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 9));
}
.g-bar {
  position: absolute; top: 7px; height: 16px;
  left: calc(var(--s) / 9 * 100%);
  width: calc((var(--e) - var(--s)) / 9 * 100%);
  min-width: 10px;
  border: 2px solid var(--ink);
  border-radius: 9px 6px 10px 5px;
  transform-origin: left;
}
.g-now::after {
  content: ""; position: absolute; right: -11px; top: 1px;
  border: 5px solid transparent; border-left: 7px solid var(--ink);
}
.g-red .g-bar { background: var(--red-sticker); }
.g-sky .g-bar { background: var(--sky); }
.g-flax .g-bar { background: var(--flax); }
.g-sage .g-bar { background: var(--sage); }
.g-ink .g-bar { background: var(--ink-2); }
.g-paper .g-bar { background: var(--paper); background-image: repeating-linear-gradient(45deg, transparent 0 4px, var(--flax) 4px 7px); }
.gantt-axis { position: relative; margin-left: calc(var(--label) + 12px); height: 22px; margin-top: 4px; }
.gantt-axis span { position: absolute; left: calc(var(--y) / 9 * 100%); transform: translateX(-50%); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Scrapbook cards ---------- */
.scrapbook {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3.5vw, 40px) clamp(20px, 3vw, 34px);
}
.scrap {
  position: relative;
  background: var(--paper);
  padding: 30px 22px 22px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(31, 42, 50, .08);
  transition: transform .3s cubic-bezier(.2,.8,.2,1.2), box-shadow .3s ease;
}
.scrap:nth-child(3n+1) { transform: rotate(-1.2deg); }
.scrap:nth-child(3n+2) { transform: rotate(.9deg); }
.scrap:nth-child(3n) { transform: rotate(-.5deg); }
.scrap .tape { top: -13px; left: 50%; transform: translateX(-50%) rotate(-3deg); width: 96px; height: 26px; }
.scrap:nth-child(even) .tape { background: rgba(159, 207, 230, .75); transform: translateX(-50%) rotate(3deg); }
.scrap-now { background: #fffef0; box-shadow: var(--shadow), inset 0 0 0 2px var(--red-sticker); }
.scrap-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--red-sticker); color: #fff;
  font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; transform: rotate(6deg);
}
.scrap-logo {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; margin: 0 0 12px -6px; padding: 4px 6px;
  text-decoration: none; color: var(--ink);
}
.scrap-logo:hover { background: var(--flax-soft); color: var(--ink); }
.logo-hyfin { height: 30px; width: auto; }
.logo-stanford { height: 26px; width: auto; }
.logo-amazon { height: 32px; width: auto; margin-top: 6px; }
.logo-tree { height: 44px; width: auto; }
.logo-crown { width: 36px; height: 36px; }
.logo-umn { height: 34px; width: auto; }
.logo-lockup .lockup-umn { font-size: 19px; line-height: 1.15; text-align: left; }
.lockup-text { font-family: var(--f-body); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; color: var(--ink); }
.logo-lockup .lockup-text { border-left: 2px solid var(--line); padding-left: 10px; }
.logo-text { font-family: var(--f-display); font-weight: 700; font-size: 21px; line-height: 1.15; }
.scrap-role { font-family: var(--f-body); font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.scrap-date {
  display: table; font-size: 13.5px; font-weight: 500; color: var(--sky-deep);
  background: var(--sky-soft); border-radius: 6px; padding: 1px 8px; margin-bottom: 10px;
}
.scrap-date:has(+ .scrap-date) { margin-bottom: 6px; }
.scrap-desc { font-size: 15.5px; color: var(--ink-2); line-height: 1.55; margin: 0; }

/* honors */
.honors { margin-top: clamp(36px, 5vw, 56px); }
.honors-h { font-size: 30px; margin: 0 0 14px; transform: rotate(-1deg); transform-origin: left; }
.honor-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.honor {
  font-size: 15px; font-weight: 500; line-height: 1.4;
  padding: 8px 14px; border-radius: 14px;
  border: 2px solid var(--ink); box-shadow: 2px 3px 0 var(--ink);
  background: var(--paper);
}
.honor:nth-child(odd) { transform: rotate(-.8deg); }
.honor:nth-child(even) { transform: rotate(.7deg); }
.h-flax { background: var(--flax); }
.h-sky { background: var(--sky-soft); }
.h-sage { background: var(--sage-soft); }
.h-red { background: var(--red-soft); }
.h-flax a { color: #7d1418; }

/* press clippings */
.clippings {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 64px); align-items: start;
  max-width: 980px; margin: 8px auto 40px;
}
.clipping { position: relative; margin: 0; }
.clipping > a { display: block; background: none; }
.clipping > a:hover { background: none; }
.clipping img { display: block; width: 100%; height: auto; }
.clip-left { transform: rotate(-1.8deg); }
.clip-right { transform: rotate(1.4deg); margin-top: 28px; }
.clipping .tape { top: 0; left: 50%; transform: translateX(-50%) rotate(-4deg); }
.clip-right .tape { background: rgba(159, 207, 230, .75); transform: translateX(-50%) rotate(5deg); }
.clipping figcaption { text-align: center; font-size: 22px; margin-top: 2px; line-height: 1.2; }
@media (max-width: 720px) {
  .clippings { grid-template-columns: 1fr; max-width: 460px; }
  .clip-right { margin-top: 0; }
}

/* ---------- Research ---------- */
.metrics-wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.metrics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; justify-items: center; }
.metric {
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.metric-num { display: block; font-family: var(--f-display); font-weight: 800; font-size: 42px; line-height: 1; }
.metric-label { display: block; font-size: 14px; font-weight: 700; margin-top: 4px; }
.m1 { background: var(--flax); transform: rotate(-4deg); grid-column: 1 / -1; width: 156px; height: 156px; }
.m1 .metric-num { font-size: 52px; }
.m2 { background: var(--sky); transform: rotate(5deg); }
.m3 { background: var(--red-soft); transform: rotate(-3deg); }
.metric-art { display: none; }

.chart { margin: 0; padding: clamp(18px, 2.6vw, 28px); }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; }
.chart-title { font-family: var(--f-display); font-weight: 700; font-size: 22px; }
.chart-sub { font-size: 14px; color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ytd-key { display: inline-flex; align-items: center; gap: 6px; }
.ytd-swatch {
  width: 16px; height: 12px; border: 1.5px dashed var(--ink); border-radius: 3px;
  background: repeating-linear-gradient(45deg, var(--flax-soft) 0 3px, var(--flax-deep) 3px 5px);
}
.chart-box { position: relative; }
.cite-svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--f-body); }
.cite-svg .grid { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.cite-svg .baseline { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.cite-svg .ylab { font-size: 13px; fill: var(--muted); }
.cite-svg .xlab { font-size: 14px; fill: var(--ink-2); font-weight: 500; }
.cite-svg .vlab { font-size: 15px; fill: var(--ink); font-weight: 700; }
.cite-svg .hit { fill: transparent; }
.cite-svg .shape { fill: var(--flax); stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; filter: url(#rough); transition: fill .15s ease; }
.cite-svg .ytd .shape { fill: url(#hatch); stroke-dasharray: 5 4; }
.cite-svg .bar { cursor: default; outline: none; }
.cite-svg .bar:hover .shape, .cite-svg .bar:focus-visible .shape { fill: var(--sky); }
.cite-svg .bar:focus-visible .hit { stroke: var(--sky-deep); stroke-width: 2.5; rx: 8; }
.cite-svg .annot path { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cite-svg .annot .hand { font-size: 22px; fill: var(--red); font-family: var(--f-hand); font-weight: 700; }
.chart-tip {
  position: absolute; z-index: 3; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  transform: translate(-50%, -100%);
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.5);
}
.chart-data { margin-top: 10px; font-size: 14.5px; }
.chart-data summary { cursor: pointer; color: var(--sky-deep); font-weight: 700; width: max-content; border-radius: 6px; }
.chart-data table { border-collapse: collapse; margin-top: 8px; min-width: 240px; }
.chart-data th, .chart-data td { text-align: left; padding: 4px 18px 4px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.chart-data td:last-child, .chart-data th:last-child { text-align: right; padding-right: 0; }

/* ---------- Publications ---------- */
.paper {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(31, 42, 50, .12);
  border-radius: 14px;
  padding: 20px 22px 18px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.paper.featured {
  border: 2px solid var(--ink);
  box-shadow: 6px 7px 0 var(--ink);
  background: #fffef2;
  padding: clamp(26px, 3.5vw, 40px);
  margin-bottom: clamp(26px, 3.5vw, 36px);
}
.paper.featured .tape { top: -14px; left: 34px; transform: rotate(-4deg); }
.featured-flag { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.featured-flag .sticker { font-size: 13.5px; padding: 3px 12px; }
.featured-flag .sticker:first-child { transform: rotate(-2deg); }
.featured-flag .sticker:last-child { transform: rotate(1.5deg); }
.paper.featured .paper-title { font-size: clamp(22px, 2.8vw, 31px); }
.paper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.paper-venue { font-size: 14px; color: var(--muted); margin: 0 0 8px; line-height: 1.45; }
.paper-venue em { font-style: italic; }
.year {
  display: inline-block; font-style: normal; font-weight: 700; font-size: 12.5px;
  background: var(--flax); color: var(--ink); border-radius: 999px; padding: 1px 9px; margin-right: 6px;
  vertical-align: 1px;
}
.year-review { background: var(--sky-soft); color: var(--sky-deep); }
.paper-title { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.paper-title a { color: #7d1418; text-decoration-color: rgba(125, 20, 24, .45); }
.paper-title a:hover { color: #5e0f12; text-decoration-color: currentColor; }
.paper-authors { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 10px; }
.paper-authors a { text-decoration-thickness: 1.5px; }
.paper-authors strong { color: var(--ink); }
.paper-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid currentColor; color: var(--red);
}
.pill:hover { background: var(--red-sticker); color: #fff; text-decoration-color: #fff; }

.paper-more {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--ink);
  background: var(--flax-soft);
  border: 2px dashed rgba(31, 42, 50, .35);
  box-shadow: none;
}
.paper-more:hover { background: var(--flax); color: var(--ink); }
.paper-more .doodle { flex: none; width: 60px; height: 60px; }
.more-kicker { display: block; font-size: 22px; color: var(--red); line-height: 1.1; }
.more-link { display: inline; font-family: var(--f-display); font-weight: 700; font-size: 19px; text-decoration: underline; text-decoration-color: rgba(161,29,34,.5); text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: clamp(56px, 8vw, 96px) auto 0;
  padding: 30px var(--gutter) 24px;
  text-align: center;
  border-top: 2px dashed var(--line);
}
.footer-art { display: flex; justify-content: center; gap: 18px; margin-bottom: 14px; }
.footer-art .doodle { width: 44px; height: 44px; }
.footer-art.has-illustration img { max-width: 640px; width: 100%; height: auto; }
.footer-hello { font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); margin-bottom: 8px; }
.footer-credit { font-size: 14px; color: var(--muted); }

/* ---------- Version switcher ---------- */

/* ---------- Motion (only when allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .polaroid:hover { transform: rotate(-1deg) scale(1.015); }
  .scrap:hover { transform: rotate(0deg) translateY(-6px); box-shadow: var(--shadow-lift); }
  .paper:not(.featured):hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(31, 42, 50, .28); }
  .sticker, .honor, .metric { transition: transform .25s cubic-bezier(.2,.8,.2,1.4); }
  .stickers .sticker:hover, .honor:hover { transform: rotate(0deg) scale(1.05); }
  .stickers .sticker:hover { transform: rotate(0deg) translateY(-2px) scale(1.05); }
  .clipping { transition: transform .3s cubic-bezier(.2,.8,.2,1.2); }
  .clipping:hover { transform: rotate(0deg) scale(1.02); }
  .metric:hover { transform: rotate(0deg) scale(1.05); }
  .btn { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
  .btn:hover { transform: translate(-1px, -2px); }
  .icon-row a { transition: transform .2s ease, color .2s ease, background-color .2s ease; }
  .icon-row a:hover { transform: translateY(-3px) rotate(-4deg); }
  .d-pos-sun { animation: spin 40s linear infinite; }
  .d-pos-sat { animation: bob 6s ease-in-out infinite; }
  .hobbies li:hover .doodle { animation: wiggle .5s ease; }
  .sticky-note { transition: transform .3s cubic-bezier(.2,.8,.2,1.3); }
  .sticky-note:hover { transform: rotate(.5deg) translateY(-3px); }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
  @keyframes wiggle { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .scrapbook { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scrap:nth-child(n) { transform: rotate(-.8deg); }
  .scrap:nth-child(even) { transform: rotate(.8deg); }
  .metrics-wrap { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(3, auto); justify-content: center; gap: 22px; }
  .m1 { grid-column: auto; width: 140px; height: 140px; }
  .m1 .metric-num { font-size: 46px; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 440px; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .sticky-note { max-width: 460px; margin: 18px auto 0; }
  .paper-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .brand-name { display: none; }
  .topnav a { padding: 6px 9px; font-size: 14.5px; }
  .hero { padding-top: 22px; gap: 22px; }
  .hero-art { min-height: 360px; }
  .polaroid { width: min(270px, 74%); padding: 10px 10px 8px; }
  .polaroid figcaption { font-size: 22px; }
  .d-pos-sun { width: 70px !important; height: 70px !important; }
  .d-pos-sat { width: 60px !important; height: 60px !important; }
  .d-pos-panel { width: 66px !important; height: 66px !important; right: 4%; }
  .d-pos-leaf { width: 54px !important; height: 54px !important; left: 0; }
  .hero h1 { font-size: clamp(50px, 15vw, 64px); }
  .hello { font-size: 26px; }
  .sticker { font-size: 13.5px; padding: 5px 12px; }
  .scrapbook { grid-template-columns: 1fr; }
  .gantt-body { --label: 96px; }
  .g-label { font-size: 12.5px; white-space: normal; line-height: 1.15; }
  .gantt-rows li { gap: 8px; min-height: 34px; }
  .gantt-axis { margin-left: calc(var(--label) + 8px); }
  .gantt-axis span { font-size: 11.5px; }
  .metrics { gap: 12px; }
  .metric { width: 98px; height: 98px; box-shadow: 3px 3px 0 var(--ink); }
  .m1 { width: 108px; height: 108px; }
  .metric-num { font-size: 32px; }
  .m1 .metric-num { font-size: 36px; }
  .metric-label { font-size: 12.5px; }
  .cite-svg .ylab { font-size: 22px; }
  .cite-svg .xlab { font-size: 22px; }
  .cite-svg .vlab { font-size: 25px; }
  .cite-svg .annot .hand { font-size: 32px; }
  .sticky-note { transform: rotate(1deg); }
  .paper { padding: 18px 16px 16px; }
  .icon-row a { width: 48px; height: 48px; }
}

@media (forced-colors: active) {
  .cite-svg .shape { stroke: CanvasText; }
  .sticker, .card, .metric { border-color: CanvasText; }
}

@media print {
  .topbar, .hero-scene, .skip { display: none; }
  body { background: #fff; padding: 0; }
  .bio[hidden] { display: block !important; }
}
