/* ──────────────────────────────────────────────────────────────
   Nadezhda Ilieva: a geometer's notebook.
   Light = graph paper & pencil. Dark = chalkboard & chalk.
   Accent ink: Buttercup green.
   ────────────────────────────────────────────────────────────── */

:root {
  --paper: #fbf8f0;
  --paper-2: #f2ede0;
  --grid: rgba(60, 95, 150, 0.075);
  --grid-strong: rgba(60, 95, 150, 0.12);
  --ink: #1f2228;
  --ink-2: #474c55;
  --ink-3: #7b808a;
  --pencil: #6f747d;
  --rule: rgba(31, 34, 40, 0.13);
  --green: #2b8a3e;          /* readable Buttercup ink */
  --green-hi: #93c85b;       /* Buttercup's lime */
  --green-wash: rgba(147, 200, 91, 0.38);
  --orange: #d4573b;         /* gerbera coral */
  --blue: #2f6db3;
  --violet: #8a4fbf;
  --card: rgba(255, 255, 255, 0.55);
  --coral-wash: rgba(240, 138, 108, 0.32);
  --yellow-wash: rgba(240, 200, 80, 0.38);
  --blue-wash: rgba(47, 109, 179, 0.2);
  --violet-wash: rgba(138, 79, 191, 0.18);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 14px 32px -18px rgba(60, 40, 10, 0.35);
  --marble-mid: #cfe3d4;
  --marble-edge: #7f9a88;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: light;
}

/* chalkboard */
:root[data-theme="dark"] {
  --paper: #1d2420;
  --paper-2: #232b26;
  --grid: rgba(220, 235, 225, 0.045);
  --grid-strong: rgba(220, 235, 225, 0.08);
  --ink: #ecebe4;
  --ink-2: #c5c7bf;
  --ink-3: #8e958e;
  --pencil: #b4bab2;
  --rule: rgba(236, 235, 228, 0.16);
  --green: #9be15d;
  --green-hi: #b8f07f;
  --green-wash: rgba(155, 225, 93, 0.22);
  --orange: #ff9f84;
  --blue: #8ec5ff;
  --violet: #d2a8ff;
  --card: rgba(255, 255, 255, 0.035);
  --coral-wash: rgba(255, 159, 132, 0.3);
  --yellow-wash: rgba(255, 214, 102, 0.28);
  --blue-wash: rgba(142, 197, 255, 0.25);
  --violet-wash: rgba(210, 168, 255, 0.22);
  --shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.7);
  --marble-mid: #5f7a6a;
  --marble-edge: #a9c7b2;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d2420;
    --paper-2: #232b26;
    --grid: rgba(220, 235, 225, 0.045);
    --grid-strong: rgba(220, 235, 225, 0.08);
    --ink: #ecebe4;
    --ink-2: #c5c7bf;
    --ink-3: #8e958e;
    --pencil: #b4bab2;
    --rule: rgba(236, 235, 228, 0.16);
    --green: #9be15d;
    --green-hi: #b8f07f;
    --green-wash: rgba(155, 225, 93, 0.22);
    --orange: #ff9f84;
    --blue: #8ec5ff;
    --violet: #d2a8ff;
    --card: rgba(255, 255, 255, 0.035);
    --coral-wash: rgba(255, 159, 132, 0.3);
    --yellow-wash: rgba(255, 214, 102, 0.28);
    --blue-wash: rgba(142, 197, 255, 0.25);
    --violet-wash: rgba(210, 168, 255, 0.22);
    --shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.7);
    --marble-mid: #5f7a6a;
    --marble-edge: #a9c7b2;
    color-scheme: dark;
  }
}

/* ───────────── base ───────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -1px -1px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--green); text-decoration-style: wavy; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible + span, .vertex:focus-visible {
  outline: 2px dashed var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.hand { font-family: var(--hand); font-weight: 500; }
.mono { font-family: var(--mono); font-size: .82em; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* highlighter swipe */
.hl {
  background: linear-gradient(100deg, transparent 0 2%, var(--green-wash) 3% 96%, transparent 98%) no-repeat;
  background-size: 100% 42%;
  background-position: 0 88%;
  padding: 0 .06em;
  margin: 0 -.06em;
}

/* ───────────── top bar ───────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 46px; height: 26px; overflow: visible; animation: fly-in .9s cubic-bezier(.2, 1.4, .4, 1) both; }
.brand__streaks path { stroke: var(--green); stroke-width: 3.2; stroke-linecap: round; fill: none; transform-box: fill-box; transform-origin: right center; transition: transform .3s ease; }
.brand__heart { fill: var(--green-hi); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.brand__shine { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; opacity: .9; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .brand__heart, .brand:hover .brand__shine { transform: translateX(4px); }
.brand:hover .brand__streaks path { transform: scaleX(1.35); }
@keyframes fly-in { from { transform: translateX(-40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand__mark { animation: none; } }

.nav { display: flex; align-items: center; gap: clamp(10px, 2.6vw, 26px); font-size: 16px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--green); }
@media (max-width: 520px) {
  .brand span { display: none; }
  .nav { font-size: 15px; gap: 12px; }
}
@media (max-width: 400px) {
  .nav { font-size: 14px; gap: 10px; }
  .brand__mark { width: 38px; }
  .theme-toggle { padding: 0; width: 30px; justify-content: center; }
  .theme-toggle__label { display: none; }
  .theme-toggle::before { content: "☾"; font-size: 16px; line-height: 1; }
  .theme-toggle[data-mode="dark"]::before { content: "☀"; }
}

.theme-toggle {
  font: inherit; cursor: pointer;
  border: 1.5px solid var(--ink-3); border-radius: 999px;
  background: transparent; color: var(--ink);
  padding: 0 12px; height: 30px;
  display: inline-flex; align-items: center;
}
.theme-toggle__label { font-family: var(--hand); font-size: 19px; line-height: 1; }
.theme-toggle:hover { border-color: var(--green); color: var(--green); }

/* ───────────── hero ───────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 40px;
  padding-bottom: 24px;
  align-items: center;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr .85fr; gap: 40px; padding-top: 72px; padding-bottom: 40px; }
}

.hero__hello {
  margin: 0 0 4px;
  font-size: 28px; color: var(--green);
  transform: rotate(-3deg); transform-origin: left;
  display: inline-flex; align-items: flex-end; gap: 4px;
}
.hero__arrow { width: 46px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: translateY(14px); }

.hero__name {
  font-size: clamp(44px, 8.4vw, 82px);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.02;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  margin-bottom: 22px;
}

.lede { font-size: clamp(18px, 2.2vw, 20.5px); color: var(--ink-2); max-width: 34em; margin: 0 0 26px; }
.lede a { color: var(--ink); }

.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.links a {
  position: relative; display: inline-block;
  font-family: var(--mono); font-size: 14.5px; letter-spacing: .01em;
  text-decoration: none; color: var(--ink);
  padding: 6px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; /* wobbly hand-drawn box */
  background: var(--card);
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.links a:hover { color: var(--ink); background: var(--green-wash); border-color: var(--green); transform: rotate(-2deg) translateY(-1px); text-decoration: none; }

/* polaroid portrait */
.hero__photo { position: relative; margin: 28px auto 8px; width: min(66vw, 310px); }
@media (min-width: 860px) { .hero__photo { margin: 0 auto; } }
.polaroid {
  position: relative; background: #fff; padding: 12px 12px 52px;
  box-shadow: var(--shadow), 0 2px 6px rgba(0, 0, 0, .06);
  transform: rotate(2.5deg);
  transition: transform .45s cubic-bezier(.3, 1.4, .5, 1);
}
.polaroid:hover { transform: rotate(-1deg) scale(1.015); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.hero__photo .doodle { position: absolute; z-index: 2; }
.hero__d-heart { --w: 48px; left: -30px; top: -18px; transform: rotate(-14deg); }
.hero__d-spark { --w: 52px; right: -34px; top: -30px; }
.hero__d-star { --w: 38px; left: -38px; bottom: 90px; transform: rotate(10deg); }
.hero__d-flower { --w: 44px; left: 18px; bottom: -26px; }
@media (max-width: 520px) {
  .hero__d-heart { left: -18px; } .hero__d-spark { right: -20px; } .hero__d-star { left: -26px; }
}

/* ───────────── sections ───────────── */
.section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 56px;
  padding-bottom: 8px;
}
@media (min-width: 860px) {
  .section { grid-template-columns: 170px 1fr; gap: 32px; padding-top: 80px; }
}
.section__head { display: flex; align-items: baseline; gap: 12px; }
@media (min-width: 860px) {
  .section__head { flex-direction: column; gap: 0; position: sticky; top: 84px; align-self: start; }
}
.section__num { font-family: var(--hand); font-size: 30px; color: var(--green); font-weight: 700; line-height: 1; }
.section__head h2 { font-size: 30px; letter-spacing: -.015em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }

.section__body { min-width: 0; }
.prose p { margin: 0 0 1.05em; max-width: 38em; }
.prose strong { font-weight: 600; }

/* ───────────── tape ───────────── */
.tape {
  position: absolute; top: -12px; width: 96px; height: 26px;
  background: rgba(147, 200, 91, .55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .tape { mix-blend-mode: normal; background: rgba(155, 225, 93, .45); }
.tape--l { left: 6%; transform: rotate(-6deg); }
.tape--r { right: 7%; transform: rotate(5deg); background: rgba(240, 138, 108, .5); }
.tape--top { left: 50%; top: -14px; transform: translateX(-50%) rotate(-4deg); z-index: 1; }

/* ───────────── papers ───────────── */
.tag {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 6px;
}
.tag span { color: var(--green); font-weight: 500; margin-right: 4px; }

.paper {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}
@media (min-width: 700px) { .paper { gap: 20px; padding: 26px; } }
.paper__burst { position: absolute; --w: 74px; top: -30px; right: 10px; transform: rotate(8deg); z-index: 1; }
.paper__fig { --w: 100%; display: block; }
.paper__fig svg { max-width: 640px; margin: 0 auto; display: block; }

.paper__title { font-size: clamp(21px, 2.6vw, 25px); letter-spacing: -.01em; margin-bottom: 8px; font-variation-settings: "SOFT" 100, "opsz" 48; }
.paper__title a { text-decoration: none; background: linear-gradient(var(--green-wash), var(--green-wash)) no-repeat 0 92% / 0 38%; transition: background-size .35s ease; }
.paper__title a:hover { color: var(--ink); background-size: 100% 38%; text-decoration: none; }
.authors { font-size: 15.5px; color: var(--ink-2); margin: 0 0 12px; line-height: 1.5; }
.authors b { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--green-hi); text-decoration-thickness: 3px; text-underline-offset: 2px; }
.tldr { font-size: 16.5px; margin: 0 0 16px; color: var(--ink-2); }
.tldr b { color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono); font-size: 13px; letter-spacing: .01em;
  text-decoration: none; color: var(--ink);
  border: 1.3px solid var(--ink-3); border-radius: 999px;
  padding: 4px 12px; background: transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1.5;
}
.chip:hover { background: var(--green-wash); border-color: var(--green); color: var(--ink); text-decoration: none; }
.chip.is-done { background: var(--green-wash); border-color: var(--green); }

.bibtex {
  margin: 14px 0 0; padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  background: var(--paper-2); border-radius: 8px; overflow-x: auto; white-space: pre;
}

.subhead { margin: 52px 0 14px; }
.subhead .hand { font-size: 28px; color: var(--ink-2); font-weight: 700; }

.theses { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--rule); }
.theses li { padding: 18px 0; border-bottom: 1px dashed var(--rule); }
.theses__title { font-size: 19px; font-weight: 600; margin: 0 0 4px; line-height: 1.35; }
.theses__desc { font-size: 16px; color: var(--ink-2); margin: 0 0 6px; max-width: 40em; }
.theses__links { margin: 0; display: flex; gap: 16px; font-family: var(--mono); font-size: 13.5px; }

/* ───────────── news ───────────── */
.news { list-style: none; margin: 0; padding: 0; position: relative; }
.news::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; border-left: 1.5px dashed var(--ink-3); opacity: .6; }
.news li { position: relative; padding: 0 0 22px 32px; display: grid; gap: 2px; }
@media (min-width: 600px) { .news li { grid-template-columns: 96px 1fr; gap: 18px; } }
.news li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--green);
}
.news li:first-child::before { background: var(--green-hi); }
.news time { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 4px; white-space: nowrap; }
.news p { margin: 0; }

/* ───────────── footer ───────────── */
.footer { margin-top: 96px; border-top: 1px solid var(--rule); padding: 24px 0 36px; font-size: 15px; color: var(--ink-3); }
.footer p { margin: 0; }

/* ───────────── doodles ───────────── */
.doodle { display: inline-block; width: var(--w, 44px); line-height: 0; vertical-align: middle; }
.doodle svg { width: 100%; height: auto; overflow: visible; display: block; }
.doodle svg * { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.doodle svg tspan { fill: inherit; stroke: none; }
.doodle .k { stroke: var(--ink-2); }
.doodle .g { stroke: var(--green); }
.doodle .c { stroke: var(--orange); }
.doodle .bk { stroke: #1b1b1b; }
.doodle .dash { stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 3 4; }
.doodle .fp { fill: var(--paper); }
.doodle .fp2 { fill: var(--paper-2); }
.doodle .fg { fill: var(--green-wash); }
.doodle .fl { fill: var(--green-hi); }
.doodle .fc { fill: var(--coral-wash); }
.doodle .fcd { fill: var(--orange); }
.doodle .fk { fill: var(--ink-2); }
.doodle .fy { fill: var(--yellow-wash); }
.doodle .fb { fill: var(--blue-wash); }
.doodle .fv { fill: var(--violet-wash); }
.doodle .fpeach { fill: var(--coral-wash); fill-opacity: .45; stroke: var(--orange); stroke-opacity: .35; stroke-width: 1.4; }
.doodle .fs { fill: #fad2c8; }
.doodle .fbg { fill: #8cc63f; }
.doodle .fbk { fill: #1b1b1b; }
.doodle .fw { fill: #fff; }
.doodle .t { font-family: var(--hand); font-weight: 600; fill: var(--ink-2); stroke: none; }
.doodle .ti { font-family: var(--hand); font-weight: 500; fill: var(--ink-3); stroke: none; }
.doodle .g-t { fill: var(--green); }
.doodle .c-t { fill: var(--orange); font-weight: 700; }
.doodle .math { font-family: var(--serif); font-style: italic; fill: var(--ink); stroke: none; font-size: 15px; }
.doodle .math.dim { fill: var(--ink-3); }
.doodle .mono-t { font-family: var(--mono); font-size: 11px; fill: var(--ink); stroke: none; }

/* strokes draw themselves in, fills follow */
.doodle [pathLength] { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
.doodle.in-view [pathLength] { animation: draw .9s ease forwards; animation-delay: var(--d, 0s); }
.doodle svg > *, .doodle svg g > * { fill-opacity: 0; transition: fill-opacity .6s ease .5s; }
.doodle.in-view svg > *, .doodle.in-view svg g > * { fill-opacity: 1; }
.doodle .fpeach { transition: none; }
.doodle.in-view .fpeach { fill-opacity: .45; }
.doodle .dash, .doodle text { opacity: 0; transition: opacity .6s ease .6s; }
.doodle.in-view .dash, .doodle.in-view text { opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .doodle [pathLength] { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* a little wiggle on hover */
.doodle:not(.paper__fig):not(.map__sketch):hover svg { animation: wiggle .55s ease; }
@keyframes wiggle { 25% { transform: rotate(-8deg) scale(1.08); } 60% { transform: rotate(6deg) scale(1.04); } }

/* placements */
.head-doodles { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 860px) { .head-doodles { margin: 18px 0 0; gap: 12px; } }
.d-sm { --w: 30px; } .d-md { --w: 56px; } .d-xs { --w: 44px; }
@media (min-width: 860px) { .d-sm { --w: 38px; } .d-md { --w: 96px; } }
.d-tilt { transform: rotate(12deg); }
.subhead .d-xs { --w: 42px; transform: translateY(8px); margin-left: 6px; }

.section { position: relative; }
.gutter { position: absolute; display: none; }
@media (min-width: 1240px) { .gutter { display: inline-block; } }
.gutter--r { right: -86px; } .gutter--l { left: -96px; }
.news__d-qed { --w: 80px; top: 92px; right: -100px; transform: rotate(-8deg); }



/* ───────────── archive page ───────────── */
.nav a[aria-current="page"] { color: var(--green); text-decoration: underline wavy var(--green-hi); text-underline-offset: 6px; }

.archive-head { position: relative; padding-top: 48px; padding-bottom: 8px; display: grid; gap: 4px 40px; align-items: start; }
@media (min-width: 860px) { .archive-head { grid-template-columns: 1fr 300px; padding-top: 72px; } }
.archive-title {
  grid-column: 1; font-size: clamp(56px, 10vw, 96px); font-weight: 650; letter-spacing: -.03em; line-height: 1;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.archive-title .chi { color: var(--green); font-style: italic; font-weight: 500; display: inline-block; transform: translateY(.06em) rotate(-6deg); margin: 0 .02em; }
.archive-sub { grid-column: 1; margin: 6px 0 18px; font-size: 26px; color: var(--orange); transform: rotate(-1.5deg); transform-origin: left; }
.archive-intro { grid-column: 1; max-width: 36em; }
.archive-intro p { margin: 0; }

.clipping {
  position: relative; display: block; text-decoration: none; color: #2a2a2a;
  background: #f4efe1; padding: 22px 20px 18px; margin-top: 28px;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  clip-path: polygon(0 3%, 6% 0, 14% 2%, 25% 0, 38% 3%, 52% 0, 66% 2%, 80% 0, 92% 3%, 100% 1%, 99% 30%, 100% 62%, 98% 100%, 84% 97%, 70% 100%, 55% 97%, 40% 100%, 26% 97%, 12% 100%, 0 97%, 2% 64%, 0 30%);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}
@media (min-width: 860px) { .clipping { grid-column: 2; grid-row: 1 / span 3; margin-top: 12px; } }
.clipping:hover { color: #2a2a2a; transform: rotate(0deg) scale(1.02); text-decoration: none; }
.clipping .tape { top: 2px; }
.clipping__meta { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #6b6458; margin-bottom: 6px; }
.clipping__title { display: block; font-size: 22px; font-weight: 650; line-height: 1.2; font-variation-settings: "SOFT" 0, "opsz" 72; border-bottom: 1px solid #b8ae98; padding-bottom: 8px; margin-bottom: 8px; }
.clipping__note { display: block; font-size: 14px; font-style: italic; color: #6b6458; }

.archive__d-star { --w: 60px; margin-left: 8px; transform: translateY(-12px); vertical-align: top; }
.archive__d-heart { position: absolute; --w: 40px; right: 6px; bottom: -30px; transform: rotate(-10deg); }
@media (max-width: 859px) { .archive__d-heart { display: none; } }

/* the wall: a loose masonry of polaroids */
.wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 48px 34px; align-items: start; padding-top: 72px; padding-bottom: 24px;
}
.wall .pola:nth-child(3n+2) { margin-top: 26px; }
.wall .pola:nth-child(3n) { margin-top: 8px; }
@media (max-width: 560px) {
  .wall { grid-template-columns: 1fr 1fr; gap: 30px 18px; padding-top: 56px; }
  .pola { padding: 7px 7px 0; }
  .pola:nth-child(3n) { margin-top: 0; }
  .pola:nth-child(2n) { margin-top: 22px; }
  .pola figcaption { font-size: 16px; min-height: 34px; padding: 5px 2px 8px; }
  .pola::before { width: 56px; height: 18px; top: -9px; }
  .pola__ph span { font-size: 15px; }
}
.pola {
  --r: -2deg;
  position: relative; display: block;
  margin: 0; background: #fff; padding: 11px 11px 0;
  box-shadow: var(--shadow), 0 2px 6px rgba(0, 0, 0, .06);
  transform: rotate(var(--r));
  transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
  cursor: zoom-in;
}
.pola:nth-child(3n+1) { --r: -2.5deg; }
.pola:nth-child(3n+2) { --r: 1.8deg; }
.pola:nth-child(3n)   { --r: -1deg; }
.pola:nth-child(4n)   { --r: 3deg; }
.pola:nth-child(5n)   { --r: -3.4deg; }
.pola:hover { transform: rotate(0deg) scale(1.03); z-index: 2; box-shadow: 0 24px 40px -20px rgba(40, 30, 10, .45); }
.pola img, .pola__ph { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.pola--tall img, .pola--tall .pola__ph { aspect-ratio: 3 / 4; }
.pola--wide img, .pola--wide .pola__ph { aspect-ratio: 4 / 3; }
.pola figcaption { font-family: var(--hand); font-size: 22px; color: #4a4f58; text-align: center; padding: 8px 4px 12px; line-height: 1.2; min-height: 44px; }

/* tape on every polaroid, a push-pin on some */
.pola::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 84px; height: 24px;
  transform: translateX(-50%) rotate(calc(var(--r) * -2));
  background: rgba(147, 200, 91, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.pola:nth-child(3n+2)::before { background: rgba(240, 138, 108, .5); }
.pola:nth-child(3n)::before { background: rgba(240, 200, 80, .55); }
.pola.pin::before {
  width: 16px; height: 16px; top: -6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffb3a1, #d4573b 60%, #9c3a22);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .3);
}

/* placeholder until the real photo arrives */
.pola--empty { cursor: default; }
.pola__ph {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(60, 95, 150, .09) 9px 10px),
    #f6f3ec;
  outline: 1.5px dashed #c9c3b5; outline-offset: -8px;
}
.pola__ph span { font-family: var(--hand); font-size: 20px; color: #9a9384; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(20, 22, 20, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.lightbox[hidden] { display: none; }
.lightbox__pola { margin: 0; width: min(92vw, 720px); cursor: default; transform: rotate(-1deg); }
.lightbox__pola:hover { transform: rotate(-1deg); }
.lightbox__pola::before { display: none; }
.lightbox__pola img { aspect-ratio: auto; max-height: 76vh; object-fit: contain; background: #111; }
.lightbox__close {
  position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #fff; color: #222; font-size: 28px; line-height: 1; cursor: pointer;
}

/* competitions: a stack of polaroids you can flip through */
.comp { padding-top: 64px; padding-bottom: 16px; text-align: center; }
.comp__title { font-size: 34px; font-weight: 700; color: var(--ink); margin-bottom: 28px; }
.comp__d { --w: 34px; transform: translateY(-10px); }
.stack {
  display: grid; width: min(84vw, 520px); margin: 0 auto; outline: none;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.stack:focus-visible { outline: 2px dashed var(--orange); outline-offset: 18px; border-radius: 6px; }
.stack__card {
  grid-area: 1 / 1; cursor: grab;
  transition: transform .5s cubic-bezier(.3, 1.2, .4, 1), opacity .4s ease, box-shadow .3s;
  will-change: transform;
}
.stack__card.is-dragging { transition: none; cursor: grabbing; }
.stack__card:not(.is-top)::before { opacity: 0; }
.stack__card img { aspect-ratio: 4 / 3; object-position: var(--pos, 50% 50%); pointer-events: none; }
.stack__card figcaption { font-size: 24px; }
.stack__card:not(.is-top) { cursor: default; }
@media (prefers-reduced-motion: reduce) { .stack__card { transition: opacity .2s ease; } }

.stack__ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 50px; }
.stack__btn {
  width: 52px; height: 42px; display: grid; place-items: center; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1.6px solid var(--ink-2);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  transition: transform .2s, background .2s, border-color .2s;
}
.stack__btn:hover { background: var(--green-wash); border-color: var(--green); transform: rotate(-4deg); }
.stack__btn svg { width: 30px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.stack__count { font-size: 24px; min-width: 3.2em; color: var(--ink-2); }
.stack__hint { margin: 10px 0 0; font-size: 19px; color: var(--ink-3); }

/* lightbox arrows */
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 56px; height: 46px; display: grid; place-items: center; cursor: pointer;
  background: #fff; color: #222; border: 0;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .2s, background .2s;
}
.lightbox__nav[hidden] { display: none; }
.lightbox__nav:hover { background: #e6f5d6; transform: translateY(-50%) rotate(-4deg) scale(1.05); }
.lightbox__nav svg { width: 30px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__nav--prev { left: max(12px, calc(50% - 440px)); }
.lightbox__nav--next { right: max(12px, calc(50% - 440px)); }
@media (max-width: 640px) {
  .lightbox__nav { top: auto; bottom: 18px; transform: none; }
  .lightbox__nav:hover { transform: none; }
  .lightbox__nav--prev { left: calc(50% - 70px); }
  .lightbox__nav--next { right: calc(50% - 70px); }
  .lightbox { padding-bottom: 80px; }
}
.lightbox__pola.slide-l { animation: lb-in-l .32s ease; }
.lightbox__pola.slide-r { animation: lb-in-r .32s ease; }
@keyframes lb-in-l { from { opacity: 0; transform: translateX(40px) rotate(1deg); } }
@keyframes lb-in-r { from { opacity: 0; transform: translateX(-40px) rotate(-3deg); } }

/* the email, handwritten into the notebook */
.email-note { display: flex; align-items: center; gap: 10px; margin-top: -.4em !important; }
.email-doodle { display: inline-block; color: var(--ink); transform: rotate(-2deg); }
.email-doodle__text { font-family: var(--hand); font-weight: 600; font-size: clamp(25px, 4.2vw, 31px); line-height: 1.2; letter-spacing: .01em; }
.email-doodle__env { --w: 44px; transform: rotate(-6deg) translateY(-2px); flex: none; }
.doodle .thin { stroke-width: 1.4; opacity: .55; }
.authors__note { font-size: 13.5px; color: var(--ink-3); margin: -8px 0 12px; font-style: italic; }

/* ───────────── scrapbook page ───────────── */
.scrap-head { padding-bottom: 0; }
.scrap-tabs { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 23px; margin-top: 14px; }
.scrap-tabs a { text-decoration: none; color: var(--ink-2); border-bottom: 2px dashed var(--ink-3); line-height: 1.2; }
.scrap-tabs a:hover { color: var(--green); border-color: var(--green); text-decoration: none; }

.spread { padding-top: 76px; }
.spread__title {
  display: inline-block; font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-bottom: 10px;
  background: linear-gradient(100deg, transparent 0 2%, var(--green-wash) 3% 96%, transparent 98%) no-repeat 0 85% / 100% 40%;
  padding: 0 6px; transform: rotate(-1.5deg);
}
.spread__title + * { margin-top: 24px; }

.spread__olympiad { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) { .spread__olympiad { grid-template-columns: 1fr 290px; gap: 56px; } }
.spread .comp { padding-top: 0; padding-bottom: 0; }
.clippings { display: grid; gap: 34px; }
@media (min-width: 560px) and (max-width: 899px) { .clippings { grid-template-columns: 1fr 1fr; } }
.clippings .clipping { margin-top: 0; grid-column: auto; grid-row: auto; }
.clipping--2 { transform: rotate(1.8deg); background: #f1ead6; }

/* the teaching chalkboard (it's a chalkboard in both themes) */
.board {
  --pad: clamp(20px, 4vw, 44px);
  position: relative; margin: 8px 0 40px;
  padding: 34px var(--pad) 40px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, .05), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, .04), transparent 55%),
    #2d3b33;
  border: 14px solid #a87b55;
  border-radius: 6px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .35), 0 18px 34px -18px rgba(40, 25, 10, .5);
  color: #f1efe6;
}
.board__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; max-width: 600px; position: relative; z-index: 1; }
.board h3 { font-family: var(--hand); font-size: clamp(28px, 4vw, 34px); font-weight: 700; line-height: 1.1; color: #fbfaf5; text-shadow: 0 0 1px rgba(255, 255, 255, .5); }
.board h3 a { color: inherit; text-decoration: underline wavy rgba(184, 240, 127, .75); text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.board h3 a:hover { color: #b8f07f; }
.board p { margin: 2px 0 0; font-family: var(--hand); font-size: 21px; line-height: 1.3; color: rgba(241, 239, 230, .85); }
.board .board__note { font-size: 18px; color: rgba(241, 239, 230, .58); }
.board__now { display: inline-block; font-family: var(--hand); font-size: 21px; font-weight: 700; color: #b8f07f; transform: rotate(-5deg); margin-bottom: 2px; }
.board__ledge { position: absolute; left: -14px; right: -14px; bottom: -28px; height: 14px; background: #946a47; border-radius: 0 0 4px 4px; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .4); }

/* graduations wall */
.wall--grads { padding-top: 28px; grid-template-columns: repeat(2, 1fr); gap: 52px 44px; max-width: 820px; }
.wall--grads .pola figcaption { font-size: 24px; }
@media (max-width: 560px) { .wall--grads { gap: 30px 18px; } .wall--grads .pola figcaption { font-size: 16px; } }

/* ───────── the writable chalkboard ───────── */
.board__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  pointer-events: none; transition: opacity .45s ease;
}
.board__canvas.is-wiping { opacity: 0; }
.board.is-drawing .board__canvas { pointer-events: auto; touch-action: none; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='12' y='2' width='8' height='26' rx='2' fill='%23f4f2ea' stroke='%23555' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") 7 25, crosshair; }
.board.is-drawing[data-chalk="green"] .board__canvas { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='12' y='2' width='8' height='26' rx='2' fill='%23b8f07f' stroke='%23555' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") 7 25, crosshair; }

.board__hint {
  position: absolute; right: 26px; bottom: 10px; z-index: 1; margin: 0;
  font-family: var(--hand); font-size: 19px !important; color: rgba(241, 239, 230, .45) !important;
  transform: rotate(-3deg); transition: opacity .4s ease; pointer-events: none;
}
.board.has-drawn .board__hint, .board.is-drawing .board__hint { opacity: 0; }

.board__chalk, .board__eraser {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer;
}
.board__chalk { top: -20px; width: 50px; height: 28px; left: 18%; }
.board__chalk--green { left: calc(18% + 54px); }
.board__chalk span {
  position: absolute; left: 8px; bottom: 6px; width: 34px; height: 8px; border-radius: 3px;
  background: var(--chalk-colour, #f4f2ea); box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  transform: rotate(-6deg); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), opacity .25s;
}
.board__chalk--green span { --chalk-colour: #b8f07f; transform: rotate(4deg); width: 26px; }
.board__chalk:hover span { transform: translateY(-3px) rotate(-10deg); }
.board__chalk[aria-pressed="true"] span { transform: translateY(-14px) rotate(-28deg); opacity: .35; }
.board__eraser { top: -24px; width: 76px; height: 30px; right: 16%; }
.board__eraser span {
  position: absolute; left: 7px; bottom: 6px; width: 62px; height: 15px; border-radius: 3px;
  background: linear-gradient(#c9b48d 0 55%, #3a3a3a 55%); box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  transition: transform .2s;
}
.board__eraser:hover span { transform: translateY(-3px); }
.board__eraser.is-wiping span { animation: wipe .45s ease; }
@keyframes wipe { 25% { transform: translate(-10px, -6px) rotate(-4deg); } 50% { transform: translate(10px, -6px) rotate(4deg); } 75% { transform: translate(-6px, -4px); } }
.board__chalk:focus-visible, .board__eraser:focus-visible { outline: 2px dashed #b8f07f; outline-offset: 2px; border-radius: 6px; }

/* ───────── in chalkboard mode, the chalkboard turns into a sheet of paper ───────── */
.board__hint .on-paper { display: none; }
.board.is-flipping { animation: board-flip .6s cubic-bezier(.3, 1.2, .4, 1); }
@keyframes board-flip { from { transform: perspective(1200px) rotateX(70deg); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .board.is-flipping { animation: none; } }

:root[data-theme="dark"] .board {
  background:
    linear-gradient(90deg, transparent 0 var(--pad), rgba(214, 76, 76, .5) var(--pad) calc(var(--pad) + 2px), transparent calc(var(--pad) + 2px)),
    repeating-linear-gradient(transparent 0 33px, rgba(90, 130, 200, .28) 33px 34px),
    #fbf8ef;
  background-position: 0 0, 0 18px, 0 0;
  border-color: transparent; border-radius: 2px;
  background-origin: border-box;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 22px 40px -20px rgba(0, 0, 0, .7);
  color: #1f2228;
}
:root[data-theme="dark"] .board::before, :root[data-theme="dark"] .board::after {
  content: ""; position: absolute; top: -12px; width: 96px; height: 26px; z-index: 3;
  background: rgba(155, 225, 93, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
:root[data-theme="dark"] .board::before { left: 10%; transform: rotate(-4deg); }
:root[data-theme="dark"] .board::after { right: 12%; transform: rotate(3deg); background: rgba(255, 159, 132, .55); }
:root[data-theme="dark"] .board h3 { color: #1f2228; text-shadow: none; }
:root[data-theme="dark"] .board h3 a { text-decoration-color: rgba(43, 138, 62, .8); }
:root[data-theme="dark"] .board h3 a:hover { color: #2b8a3e; }
:root[data-theme="dark"] .board p { color: #474c55; }
:root[data-theme="dark"] .board__now { color: #2b8a3e; }
:root[data-theme="dark"] .board__hint { color: rgba(31, 34, 40, .42) !important; }
:root[data-theme="dark"] .board__hint .on-board { display: none; }
:root[data-theme="dark"] .board__hint .on-paper { display: inline; }
:root[data-theme="dark"] .board__ledge { background: transparent; box-shadow: none; }
:root[data-theme="dark"] .board__chalk span {
  width: 50px; height: 7px; border-radius: 1px 2px 2px 1px;
  background: linear-gradient(90deg, #333 0 3px, #e8c28a 3px 10px, #f2c94c 10px 92%, #e98aa0 92%);
}
:root[data-theme="dark"] .board__chalk--green span { width: 44px; background: linear-gradient(90deg, #333 0 3px, #e8c28a 3px 10px, #5cb85c 10px 92%, #e98aa0 92%); }
:root[data-theme="dark"] .board__chalk--green { left: calc(18% + 64px); }
:root[data-theme="dark"] .board__eraser span { width: 40px; height: 16px; border-radius: 4px; background: #f4a7b1; left: 18px; }
:root[data-theme="dark"] .board.is-drawing .board__canvas { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='12' y='2' width='8' height='20' fill='%23f2c94c' stroke='%23555'/%3E%3Cpath d='M12 22 L16 30 L20 22 Z' fill='%23e8c28a' stroke='%23555'/%3E%3Cpath d='M14.8 27.6 L16 30 L17.2 27.6Z' fill='%23333'/%3E%3C/g%3E%3C/svg%3E") 6 26, crosshair; }
:root[data-theme="dark"] .board.is-drawing[data-chalk="green"] .board__canvas { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='12' y='2' width='8' height='20' fill='%235cb85c' stroke='%23555'/%3E%3Cpath d='M12 22 L16 30 L20 22 Z' fill='%23e8c28a' stroke='%23555'/%3E%3Cpath d='M14.8 27.6 L16 30 L17.2 27.6Z' fill='%23333'/%3E%3C/g%3E%3C/svg%3E") 6 26, crosshair; }

@media (prefers-color-scheme: dark) {

:root:not([data-theme="light"]) .board {
  background:
    linear-gradient(90deg, transparent 0 var(--pad), rgba(214, 76, 76, .5) var(--pad) calc(var(--pad) + 2px), transparent calc(var(--pad) + 2px)),
    repeating-linear-gradient(transparent 0 33px, rgba(90, 130, 200, .28) 33px 34px),
    #fbf8ef;
  background-position: 0 0, 0 18px, 0 0;
  border-color: transparent; border-radius: 2px;
  background-origin: border-box;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 22px 40px -20px rgba(0, 0, 0, .7);
  color: #1f2228;
}
:root:not([data-theme="light"]) .board::before, :root:not([data-theme="light"]) .board::after {
  content: ""; position: absolute; top: -12px; width: 96px; height: 26px; z-index: 3;
  background: rgba(155, 225, 93, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
:root:not([data-theme="light"]) .board::before { left: 10%; transform: rotate(-4deg); }
:root:not([data-theme="light"]) .board::after { right: 12%; transform: rotate(3deg); background: rgba(255, 159, 132, .55); }
:root:not([data-theme="light"]) .board h3 { color: #1f2228; text-shadow: none; }
:root:not([data-theme="light"]) .board h3 a { text-decoration-color: rgba(43, 138, 62, .8); }
:root:not([data-theme="light"]) .board h3 a:hover { color: #2b8a3e; }
:root:not([data-theme="light"]) .board p { color: #474c55; }
:root:not([data-theme="light"]) .board__now { color: #2b8a3e; }
:root:not([data-theme="light"]) .board__hint { color: rgba(31, 34, 40, .42) !important; }
:root:not([data-theme="light"]) .board__hint .on-board { display: none; }
:root:not([data-theme="light"]) .board__hint .on-paper { display: inline; }
:root:not([data-theme="light"]) .board__ledge { background: transparent; box-shadow: none; }
:root:not([data-theme="light"]) .board__chalk span {
  width: 50px; height: 7px; border-radius: 1px 2px 2px 1px;
  background: linear-gradient(90deg, #333 0 3px, #e8c28a 3px 10px, #f2c94c 10px 92%, #e98aa0 92%);
}
:root:not([data-theme="light"]) .board__chalk--green span { width: 44px; background: linear-gradient(90deg, #333 0 3px, #e8c28a 3px 10px, #5cb85c 10px 92%, #e98aa0 92%); }
:root:not([data-theme="light"]) .board__chalk--green { left: calc(18% + 64px); }
:root:not([data-theme="light"]) .board__eraser span { width: 40px; height: 16px; border-radius: 4px; background: #f4a7b1; left: 18px; }
:root:not([data-theme="light"]) .board.is-drawing .board__canvas { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='12' y='2' width='8' height='20' fill='%23f2c94c' stroke='%23555'/%3E%3Cpath d='M12 22 L16 30 L20 22 Z' fill='%23e8c28a' stroke='%23555'/%3E%3Cpath d='M14.8 27.6 L16 30 L17.2 27.6Z' fill='%23333'/%3E%3C/g%3E%3C/svg%3E") 6 26, crosshair; }
:root:not([data-theme="light"]) .board.is-drawing[data-chalk="green"] .board__canvas { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='12' y='2' width='8' height='20' fill='%235cb85c' stroke='%23555'/%3E%3Cpath d='M12 22 L16 30 L20 22 Z' fill='%23e8c28a' stroke='%23555'/%3E%3Cpath d='M14.8 27.6 L16 30 L17.2 27.6Z' fill='%23333'/%3E%3C/g%3E%3C/svg%3E") 6 26, crosshair; }
}

/* ───────── research journey: a folded paper map + lanyard badges ───────── */
.doodle .bl { stroke: var(--blue); stroke-width: 2.4; }
.doodle .bl-t { fill: var(--blue); }
.doodle .br { stroke: #a07a45; stroke-width: 1.8; }
.doodle .br.thin { stroke-width: 1.2; opacity: .8; }
.doodle .route { stroke-width: 2.6; }
.doodle .lake { fill: var(--blue-wash); stroke-width: 1.8; }
.doodle .pin-t { font-size: 17px !important; }
.doodle .pin-t { font-family: var(--mono); font-size: 10.5px; font-weight: 500; fill: #fff; stroke: none; }

.journey { display: grid; gap: 34px; align-items: start; }
@media (min-width: 900px) { .journey { grid-template-columns: 1fr 300px; gap: 36px; align-items: stretch; } }

.map { position: relative; }   /* drawn straight onto the notebook page */
.map__sketch { --w: 100%; display: block; }
.map__sketch svg {
  max-width: 640px; margin: 0 auto;
}

.badges { list-style: none; margin: 0; padding: 14px 0 0; display: grid; gap: 26px; }
@media (min-width: 900px) { .badges { align-content: space-between; gap: 18px; padding: 14px 0 4px; } }
@media (min-width: 560px) and (max-width: 899px) { .badges { grid-template-columns: 1fr 1fr; } }
.badge {
  position: relative; background: #fff; color: #1f2228;
  display: flex; align-items: center; gap: 12px;
  border-radius: 8px; padding: 12px 14px 10px 18px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 12px 24px -14px rgba(40, 30, 10, .45);
  transform: rotate(var(--r, -1.2deg));
  transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
}
.badge:nth-child(even) { --r: 1.4deg; }
.badge:hover { transform: rotate(0deg) translateY(-3px) scale(1.03); z-index: 2; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 22px 34px -18px rgba(40, 30, 10, .5); }
@media (prefers-reduced-motion: reduce) { .badge { transition: none; } }
.badge::before {   /* a strip of washi tape, like on the polaroids */
  content: ""; position: absolute; left: 50%; top: -12px; width: 78px; height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--strap, rgba(147, 200, 91, .55)); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.badge:nth-child(even)::before { transform: translateX(-50%) rotate(4deg); }
.badge p { margin: 0; line-height: 1.3; }
.badge__text { flex: 1; min-width: 0; }
.badge__org { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #6b7078; }
.badge__role { font-weight: 600; font-size: 15.5px; margin: 1px 0 !important; }
.badge__meta { font-family: var(--hand); font-size: 18px; color: #474c55; }

/* ───────── talks & conferences (coming soon) ───────── */
.coming-soon { margin: 6px 0 0; font-family: var(--hand); font-size: 26px; color: var(--ink-3); transform: rotate(-1.5deg); transform-origin: left; }

/* ───────── the map's colours (ink on the page; chalk on the chalkboard) ───────── */
.doodle .land { fill: none; stroke: var(--ink-3); stroke-width: 1.6; }
.doodle .land-ch, .doodle .land-de { stroke: var(--ink-2); stroke-width: 2; }
.doodle .wash-ch { fill: var(--green-wash); stroke: none; }
.doodle .wash-de { fill: var(--coral-wash); stroke: none; }
.doodle .hatch-fill { stroke: none; }
.doodle .hatch-fill-ch { fill: url(#hatch-ch); }
.doodle .hatch-fill-de { fill: url(#hatch-de); }
.doodle .hatch { stroke-width: 1.4; opacity: .5; }
.doodle .hatch-g { stroke: var(--green); }
.doodle .hatch-c { stroke: var(--orange); }
.doodle .map-t { font-family: var(--hand); font-weight: 600; fill: var(--ink-3); stroke: none; letter-spacing: .04em; }
.doodle .river { stroke-width: 3; }
.doodle .ref-ring { stroke: var(--ink-3); stroke-width: 1.8; }
.doodle .ref-t { fill: var(--ink-3); font-weight: 500; }
.doodle .map-frame { stroke: var(--ink); stroke-width: 3.2; }
.doodle .map-frame--2 { stroke-width: 1.6; opacity: .45; }

/* small logo on the right of each badge (official logos from Wikimedia Commons) */
.badge__logo { flex: none; width: 74px; height: 30px; object-fit: contain; object-position: right center; opacity: .9; }
.badge__logos { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: -8px; }
.badge--now .badge__meta { font-size: 16.5px; }
.badge__logos .badge__logo { height: 24px; }
.badge__logo--ellis { height: 12px !important; }

/* doodled push-pins on the map */
.doodle .pin-coral { fill: #ec7a5c; }
.doodle .pin-green { fill: #8fcf5c; }
.doodle .pin-ring { stroke: var(--ink); stroke-width: 2.4; }
.doodle .pin-needle { stroke: var(--ink); stroke-width: 2.4; }
.doodle .pin-shine { stroke: #fff; stroke-width: 2.6; opacity: .85; }
.doodle .pin-tick { stroke: var(--ink-3); stroke-width: 1.8; }
