/* ==========================================================================
   Rahul Raoniar - site styles
   Soft, warm look: white page, cream panels, pastel pills, Fraunces + DM Sans
   ========================================================================== */
:root {
  --bg: #ffffff;
  --surface: #f9f6f3;
  --surface-2: #f1ebe4;
  --ink: #1b1624;
  --ink-2: #4b4555;
  --muted: #7b7486;
  --line: #ece5dd;
  --accent: #2a8fc4;
  --accent-ink: #1d6f9c;
  --accent-soft: #dff1fb;
  --signal: #f7c548;
  --signal-soft: #fff3cf;
  --teal: #3fa877;
  --teal-soft: #ddf3e7;
  --coral: #f5895f;
  --coral-soft: #fee7dc;
  --peach: #fd976d;
  --sky: #8fd3f4;
  --hero: #1b1624;
  --hero-ink: #ffffff;
  --panel: #f9f6f3;
  --shadow: 0 1px 2px rgba(27, 22, 36, .04), 0 10px 30px -16px rgba(27, 22, 36, .18);
  --shadow-lg: 0 2px 6px rgba(27, 22, 36, .05), 0 26px 50px -24px rgba(27, 22, 36, .28);
  --radius: 22px;
  --serif: "Fraunces", "Recoleta", Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14111a; --surface: #1f1b26; --surface-2: #29232f; --ink: #f5f1ea; --ink-2: #cfc8d6;
    --muted: #9a92a6; --line: #312b39; --accent: #7cc9ef; --accent-ink: #9ad7f5; --accent-soft: #1b2e3a;
    --signal: #f9cf5c; --signal-soft: #352c14; --teal: #6fd3a2; --teal-soft: #173126; --coral: #ff9e78; --coral-soft: #3b2219;
    --hero: #f5f1ea; --hero-ink: #14111a; --panel: #1f1b26;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 26px 50px -22px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #14111a; --surface: #1f1b26; --surface-2: #29232f; --ink: #f5f1ea; --ink-2: #cfc8d6;
    --muted: #9a92a6; --line: #312b39; --accent: #7cc9ef; --accent-ink: #9ad7f5; --accent-soft: #1b2e3a;
    --signal: #f9cf5c; --signal-soft: #352c14; --teal: #6fd3a2; --teal-soft: #173126; --coral: #ff9e78; --coral-soft: #3b2219;
    --hero: #f5f1ea; --hero-ink: #14111a; --panel: #1f1b26;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 26px 50px -22px rgba(0,0,0,.7);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; font-variation-settings: "SOFT" 100; line-height: 1.15; letter-spacing: -.015em; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
strong { font-weight: 600; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.pad { padding-top: 8px; padding-bottom: 72px; }
.i { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* brand icons from simple-icons, tinted with currentColor */
.brand-ico {
  width: 18px; height: 18px; flex: none; display: inline-block; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--surface-2); border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--signal);
}
.logo-text { font: 700 20px/1.1 var(--serif); font-variation-settings: "SOFT" 100; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.logo-text small { font: 500 12px var(--sans); color: var(--muted); }
.nav { margin-left: auto; }
.nav-list { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 8px; text-decoration: none;
  color: var(--ink-2); font: 500 15px var(--sans); background: none; border: 0; cursor: pointer;
}
.nav-link .caret { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.nav-item.open .caret { transform: rotate(180deg); }
.nav-link:hover, .nav-link[aria-current], .nav-link.current, .nav-item.open .nav-link { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current], .nav-link.current { box-shadow: inset 0 -2px 0 var(--signal); border-radius: 8px 8px 2px 2px; }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px);
  min-width: 230px; padding: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-menu::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
.nav-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.nav-menu a:hover { background: var(--surface-2); color: var(--ink); }
.nav-menu.mega { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 4px 12px; min-width: 640px; padding: 14px; left: auto; right: 0; transform: translate(0, 6px); }
.nav-item:hover .nav-menu.mega, .nav-item:focus-within .nav-menu.mega, .nav-item.open .nav-menu.mega { transform: translate(0, 0); }
.menu-group { display: flex; flex-direction: column; }
.nav-menu .menu-head { display: block; padding: 8px 12px 6px; font-weight: 600; color: var(--ink); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.nav-menu a .i { width: 12px; height: 12px; margin-left: 5px; vertical-align: -1px; color: var(--muted); }
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu, .nav-item.open .nav-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.header-tools { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.icon-btn .i { width: 19px; height: 19px; grid-area: 1 / 1; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.menu-toggle { display: none; }
.menu-toggle .shut { display: none; }

@media (max-width: 960px) {
  .menu-toggle { display: grid; }
  .header-inner { gap: 12px; }
  .header-tools { margin-left: auto; }
  .nav {
    position: fixed; inset: 68px 0 0; background: var(--bg); overflow-y: auto;
    padding: 12px 16px 40px; display: none; margin: 0;
  }
  .nav-open .nav { display: block; }
  .nav-open .menu-toggle .open { display: none; }
  .nav-open .menu-toggle .shut { display: block; }
  .nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-link { flex: 1; justify-content: space-between; padding: 14px 4px; font-size: 17px; background: none !important; box-shadow: none !important; }
  .nav-link .caret { width: 18px; height: 18px; }
  .nav-link[aria-current], .nav-link.current { color: var(--accent-ink); }
  .nav-menu {
    position: static; transform: none; opacity: 1; visibility: visible; display: none;
    width: 100%; box-shadow: none; border: 0; background: none; padding: 0 0 12px 8px; min-width: 0;
  }
  .nav-item.open .nav-menu { display: block; transform: none; }
  .nav-menu.mega { display: none; min-width: 0; padding: 0 0 12px 8px; grid-template-columns: 1fr; transform: none; }
  .nav-item.open .nav-menu.mega { display: grid; transform: none; }
  .nav-menu .menu-head { border-bottom: 0; margin: 8px 0 0; padding-bottom: 4px; color: var(--muted); font-size: 12px; }
  .menu-group a { padding-left: 20px; }
  .nav-item:hover .nav-menu { transform: none; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font: 600 15.5px/1 var(--sans); text-decoration: none; color: var(--ink);
  background: var(--surface-2); border: 0; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.btn-primary { background: var(--peach); color: #1b1624; }
.btn-primary:hover { background: #ff8a5a; color: #1b1624; }
.btn-sky { background: var(--sky); color: #1b1624; }
.btn-sky:hover { background: #7ccbf0; color: #1b1624; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { color: var(--bg); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.text-link {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.text-link:hover { color: var(--ink); }
.text-link .i { transition: transform .15s; }
.text-link:hover .i { transform: translateX(3px); }

/* hand-drawn underline for a word: <span class="scribble">word</span> */
.scribble { position: relative; white-space: nowrap; }
.scribble::after {
  content: ""; position: absolute; left: -4%; right: -4%; bottom: -.18em; height: .32em; z-index: -1;
  background: var(--sky);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 40 4, 90 3, 130 9 S 185 15, 197 6' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 40 4, 90 3, 130 9 S 185 15, 197 6' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.scribble.peach::after { background: var(--peach); }
.scribble.yellow::after { background: var(--signal); }
.circled { position: relative; white-space: nowrap; padding: 0 .12em; }
.circled::after {
  content: ""; position: absolute; inset: -.12em -.22em -.06em; z-index: -1; background: var(--sky);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'%3E%3Cpath d='M150 10 C 90 0, 20 10, 8 38 C -2 66, 80 78, 140 70 C 196 62, 200 30, 170 14 C 150 4, 120 6, 100 8' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'%3E%3Cpath d='M150 10 C 90 0, 20 10, 8 38 C -2 66, 80 78, 140 70 C 196 62, 200 30, 170 14 C 150 4, 120 6, 100 8' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.split-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; }
.split-title .light { display: block; font: 300 1em/1.05 var(--sans); letter-spacing: -.03em; }

/* ---------------------------------------------------------------- home intro */
.intro { padding: 12px 16px 0; }
.intro-panel {
  position: relative; max-width: calc(var(--wrap) + 80px); margin: 0 auto; padding: 64px 56px 72px; border-radius: 36px;
  background: var(--panel); display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; overflow: hidden;
}
.eyebrow { display: inline-block; font-size: 13.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.intro-title { font-size: clamp(46px, 7vw, 84px); line-height: 1; letter-spacing: -.03em; }
.intro-lead { font: 300 clamp(20px, 2.2vw, 26px)/1.4 var(--sans); color: var(--ink); margin: 22px 0 0; letter-spacing: -.01em; }
.intro-lead strong { font: 700 1.04em/1 var(--serif); font-variation-settings: "SOFT" 100; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.intro-about { color: var(--ink-2); margin-top: 18px; max-width: 58ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.intro-doodle { position: absolute; left: 38%; top: 34px; width: 96px; color: var(--peach); opacity: .9; transform: scaleX(-1) rotate(10deg); }
.featured { text-align: center; padding: 30px 16px 8px; }
.featured p { margin: 0 0 14px; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.featured ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }
.featured li { font: 600 14.5px/1.3 var(--serif); font-variation-settings: "SOFT" 100; color: var(--ink-2); opacity: .75; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat { padding: 22px; border-radius: var(--radius); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.stat-v { font: 700 40px/1 var(--serif); font-variation-settings: "SOFT" 100; color: var(--ink); }
.stat-l { font-size: 14.5px; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.work-card {
  display: flex; flex-direction: column; gap: 10px; padding: 30px 28px 26px; border-radius: 26px; background: var(--panel);
  text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.wc-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); margin-bottom: 8px; transform: rotate(-4deg); }
.wc-ico .i { width: 32px; height: 32px; }
.work-card h3 { font-size: 26px; }
.work-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.work-card .text-link { margin-top: auto; padding-top: 10px; }
.story { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.story-text p { color: var(--ink-2); }
.collage { position: relative; height: 460px; }
.collage img { position: absolute; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lg); border: 6px solid var(--bg); }
.collage img:nth-child(1) { width: 62%; height: 62%; right: 0; top: 0; transform: rotate(3deg); }
.collage img:nth-child(2) { width: 46%; height: 44%; left: 0; top: 18%; transform: rotate(-5deg); }
.collage img:nth-child(3) { width: 52%; height: 46%; left: 24%; bottom: 0; transform: rotate(2deg); }
.collage svg { position: absolute; width: 90px; color: var(--peach); left: 4%; bottom: 6%; }
.paper-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.paper {
  display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 24px; background: var(--panel);
  text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s;
}
.paper:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.paper-year { font-size: 13.5px; color: var(--muted); }
.paper h3 { font-size: 21px; line-height: 1.25; }
.paper-venue { font-size: 14.5px; color: var(--ink-2); font-style: italic; margin: 0; }
.paper .text-link { margin-top: auto; padding-top: 8px; }
@media (max-width: 960px) {
  .intro-panel { grid-template-columns: 1fr; padding: 44px 26px 56px; gap: 40px; border-radius: 28px; }
    .intro-doodle { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child:nth-child(odd) { grid-column: span 2; }
  .work-grid, .paper-grid { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .collage { height: 340px; }
}
@media (min-width: 961px) and (max-width: 1100px) { .work-grid, .paper-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- bands */
.band { padding: 80px 0; }
.band-alt { background: transparent; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 48px; } .band { padding: 56px 0; } }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }

.section-title { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 26px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li {
  padding: 9px 15px; border-radius: 999px; font-size: 15px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.pill-quiet li { background: var(--surface); color: var(--ink-2); border-color: var(--line); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 22px 30px; display: flex; flex-direction: column; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.band-alt .timeline li::before { background: var(--surface-2); }
.timeline li:first-child::before { background: var(--accent); }
.tl-when { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.tl-what { font: 600 18px/1.35 var(--serif); margin: 2px 0; }
.tl-where { color: var(--ink-2); font-size: 15px; }

/* ---------------------------------------------------------------- publications */
.pub-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.pub {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: start;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.pub:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.pub p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.pub-year {
  font: 600 15px/1 var(--serif); color: var(--accent-ink); background: var(--accent-soft);
  padding: 7px 0; border-radius: 8px; text-align: center;
}
.pub-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; color: var(--ink-2);
}
.pub-link:hover { border-color: var(--accent); color: var(--accent-ink); }
.pub-link .i { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .pub { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .pub-year { justify-self: start; padding: 6px 10px; }
  .pub-link { justify-self: start; }
}

/* ---------------------------------------------------------------- cards */

.link-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 860px) { .link-groups { grid-template-columns: 1fr; } }
.link-group h4, .contact-card h2 { font: 600 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.profile-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); font-weight: 500; transition: border-color .15s, transform .15s;
}
.profile-link span:not(.brand-ico) { flex: 1; }
.profile-link .i { color: var(--muted); width: 16px; height: 16px; }
.profile-link:hover { border-color: var(--accent); color: var(--ink); transform: translateX(2px); }
.profile-link .brand-ico { width: 20px; height: 20px; color: var(--ink-2); }

/* ---------------------------------------------------------------- inner pages */
.page-head { padding: 12px 16px 0; }
.page-head > .wrap {
  position: relative; max-width: calc(var(--wrap) + 80px); padding: 52px 56px 56px; border-radius: 36px; background: var(--panel); overflow: hidden;
}
.page-head > .wrap::before {
  content: ""; position: absolute; right: -70px; top: -90px; width: 300px; height: 300px; border-radius: 50%;
  background: var(--signal-soft); opacity: .9;
}
.page-head > .wrap > * { position: relative; }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.03em; display: inline-block; position: relative; z-index: 0; }
.page-head h1::after {
  content: ""; position: absolute; left: 0; width: min(220px, 70%); bottom: -.2em; height: .2em; z-index: -1; background: var(--sky);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 40 4, 90 3, 130 9 S 185 15, 197 6' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 40 4, 90 3, 130 9 S 185 15, 197 6' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.page-head .lead { font: 300 clamp(18px, 2vw, 22px)/1.5 var(--sans); color: var(--ink); max-width: 64ch; margin: 22px 0 0; }
@media (max-width: 700px) { .page-head > .wrap { padding: 36px 24px 40px; border-radius: 28px; } }
.page-head .hero-cta { margin-top: 24px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a, .crumbs .crumb { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span { opacity: .5; }
.head-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 24px; }

.search {
  display: flex; align-items: center; gap: 10px; margin-top: 24px; max-width: 460px; width: 100%;
  padding: 0 14px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow); color: var(--muted);
}
.head-tools .search { margin-top: 0; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 16px var(--sans); color: var(--ink); height: 100%; }
.search-count { font-size: 13px; white-space: nowrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; padding: 8px 12px; border-radius: 9px; font: 500 14px var(--sans); color: var(--ink-2); cursor: pointer;
}
.seg button span { color: var(--muted); font-size: 12.5px; margin-left: 2px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.doc { padding-top: 40px; padding-bottom: 80px; }
.doc.has-toc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; border-right: 1px solid var(--line); }
.toc a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; line-height: 1.35; }
.toc a:hover { color: var(--ink); background: var(--surface-2); }
.toc a.active { color: var(--accent-ink); background: var(--accent-soft); }
.toc a.toc-group { font-weight: 600; color: var(--ink-2); margin-top: 8px; }
.toc a.toc-group:first-child { margin-top: 0; }
@media (max-width: 960px) {
  .doc.has-toc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; flex-direction: row; overflow-x: auto; max-height: none; border: 0; padding: 0 0 6px; gap: 6px; scrollbar-width: thin; }
  .toc a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 6px 12px; }
  .toc a.toc-group { margin-top: 0; }
}
.doc-body { min-width: 0; }
.intro { font-size: 17px; color: var(--ink-2); margin-bottom: 28px; }
.group-title {
  font-size: 28px; margin: 48px 0 8px; padding-top: 4px; display: flex; align-items: center; gap: 14px;
}
.group-title:first-child { margin-top: 0; }
.group-title::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--signal), transparent); }
.block { margin: 0 0 36px; }
.block-title { font-size: 22px; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; }

h2.block-title { font-size: 26px; }
.count {
  font: 600 12.5px/1 var(--sans); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  padding: 4px 8px; border-radius: 999px;
}
.doc-body > .block:first-child .block-title, .doc-body > .intro + .block .block-title { margin-top: 0; }

.rich-list {
  margin: 0 0 1em; padding: 0; list-style: none; counter-reset: item;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px;
}
.rich-list > li {
  --tone: var(--accent); --tone-soft: var(--accent-soft);
  counter-increment: item; position: relative; overflow: hidden; display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px 18px 18px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(17, 26, 51, .04);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.rich-list > li:nth-child(4n+2) { --tone: var(--signal); --tone-soft: var(--signal-soft); }
.rich-list > li:nth-child(4n+3) { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.rich-list > li:nth-child(4n+4) { --tone: var(--coral); --tone-soft: var(--coral-soft); }
.rich-list > li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--tone), transparent 85%);
}
.rich-list > li:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tone) 40%, var(--line)); }
.rl-ico {
  flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--tone-soft); color: var(--tone); font: 700 13px/1 var(--sans); letter-spacing: .02em;
}
.rich-list > li:nth-child(4n+2) > .rl-ico { color: var(--ink); }
.rl-ico .i { display: none; }
.rich-list > li > .rl-ico::before { content: counter(item, decimal-leading-zero); }
.rl-body { flex: 1; min-width: 0; padding-top: 6px; }
/* nested lists: plain rows with small dots */
.rich-list .rich-list, .entry .rich-list { display: block; background: none; border: 0; box-shadow: none; padding: 0; margin: 8px 0 0; }
.rich-list .rich-list > li, .entry .rich-list > li { padding: 4px 0; border: 0; gap: 12px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.rich-list .rich-list > li::before, .entry .rich-list > li::before { display: none; }
.rich-list .rich-list > li:hover, .entry .rich-list > li:hover { transform: none; box-shadow: none; }
.rich-list .rich-list .rl-body, .entry .rich-list .rl-body { padding-top: 0; }
.rich-list .rich-list .rl-ico, .entry .rich-list .rl-ico { width: 6px; height: 6px; margin-top: 10px; border-radius: 50%; background: var(--accent); }
.rich-list .rich-list .rl-ico::before, .entry .rich-list .rl-ico::before { content: none; }
.rich-list .rich-list .rl-ico .i, .entry .rich-list .rl-ico .i { display: none; }
.entry {
  position: relative; overflow: hidden; padding: 24px 24px 22px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 26, 51, .04); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.entry::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--signal) 60%, var(--coral));
}
.entry:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.entry-title { font: 600 17.5px/1.4 var(--sans); letter-spacing: -.01em; margin-bottom: 6px; color: var(--ink); }
.entry-title.long { font: 500 16px/1.6 var(--sans); color: var(--ink-2); }
.entry .rich-list { margin: 0; }
.entry .rich-list > li { color: var(--ink-2); font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.entry-title .chips { margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font: 600 12.5px/1.4 var(--sans);
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); text-decoration: none; text-transform: capitalize;
  transition: border-color .15s, color .15s, background .15s;
}
.chip .i { width: 12px; height: 12px; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

.block-intro { color: var(--ink-2); margin: -4px 0 16px; }

/* mentorship */
.stu-section { margin-bottom: 56px; }
.stu-title {
  font-size: 30px; padding-bottom: 12px; margin-bottom: 14px; position: relative;
  border-bottom: 1px solid var(--line);
}
.stu-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 3px; background: var(--signal); border-radius: 2px; }
.stu-intro { color: var(--ink-2); font-size: 16.5px; margin: 0 0 22px; }
.stu-list { list-style: none; padding: 0; margin: 0; counter-reset: stu; }
.stu {
  counter-increment: stu; position: relative; padding: 20px 0 22px 52px; border-bottom: 1px solid var(--line);
}
.stu:last-child { border-bottom: 0; }
.stu::before {
  content: counter(stu); position: absolute; left: 0; top: 20px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 600 14px/1 var(--sans);
  background: var(--accent-soft); color: var(--accent-ink);
}
.stu-head h3 { font-size: 20px; line-height: 1.3; }
.stu-facts { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14.5px; color: var(--muted); }
.stu-facts span + span::before { content: "·"; margin: 0 8px; color: var(--line); }
.stu-text { margin: 10px 0 0; color: var(--ink-2); }
.stu-pubs { margin-top: 14px; }
.stu-pubs h4 {
  font: 600 12.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px;
}
.stu-pubs ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.stu-pubs li {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px;
}
.stu-pubs p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 640px) {
  .stu { padding-left: 0; padding-top: 18px; }
  .stu::before { position: static; margin-bottom: 10px; }
  .stu-pubs li { flex-direction: column; gap: 8px; }
}

.skill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
  --tone: var(--accent); --tone-soft: var(--accent-soft);
  display: inline-flex; flex-direction: column; gap: 2px; padding: 9px 15px; border-radius: 14px;
  background: var(--tone-soft); border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent); max-width: 100%;
}
.skill.t1 { --tone: var(--signal); --tone-soft: var(--signal-soft); }
.skill.t2 { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.skill.t3 { --tone: var(--coral); --tone-soft: var(--coral-soft); }
.skill b { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.skill span { font-size: 13px; color: var(--ink-2); }

/* shared tone helper: .t0..t3 set --tone / --tone-soft */
.t0 { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.t1 { --tone: var(--signal); --tone-soft: var(--signal-soft); }
.t2 { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.t3 { --tone: var(--coral); --tone-soft: var(--coral-soft); }

/* icon cards (interests, hobbies, achievements) */
.icon-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.icon-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px 22px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.icon-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%;
  background: var(--tone-soft); opacity: .7; z-index: 0;
}
.icon-card > * { position: relative; z-index: 1; }
.ic-ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--tone); color: #fff; box-shadow: 0 10px 20px -10px var(--tone);
}
.icon-card.t1 .ic-ico { color: #111a33; }
.ic-ico .i { width: 26px; height: 26px; }
.icon-card p { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.icon-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tone) 45%, var(--line)); }

/* did-you-know facts */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.fact {
  display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border-radius: 18px;
  background: linear-gradient(160deg, var(--tone-soft), var(--surface) 65%); border: 1px solid color-mix(in srgb, var(--tone) 30%, var(--line));
}
.fact-label { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.fact.t1 .fact-label { color: color-mix(in srgb, var(--signal) 60%, var(--ink)); }
.fact-label .i { width: 18px; height: 18px; }
.fact p { margin: 0; font: 500 17px/1.5 var(--serif); color: var(--ink); }
.fact-more .chip { margin: 0; }

/* dated timeline */
.timeline-list { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline-list::before { content: ""; position: absolute; left: 39px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--signal)); border-radius: 2px; }
.timeline-list > li { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; padding-bottom: 14px; }
.tl-year {
  position: relative; z-index: 1; justify-self: start; padding: 7px 0; width: 72px; text-align: center; border-radius: 999px;
  background: var(--ink); color: var(--bg); font: 700 13.5px/1 var(--sans); letter-spacing: .03em; box-shadow: 0 0 0 4px var(--bg);
}
.tl-card { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 640px) {
  .timeline-list::before { left: 31px; }
  .timeline-list > li { grid-template-columns: 56px 1fr; gap: 12px; }
  .tl-year { width: 56px; font-size: 12px; }
}

/* grant feature */
.grant {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: stretch; padding: 28px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.grant-role { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.grant-role .i { width: 18px; height: 18px; }
.grant h3 { font-size: 24px; margin: 12px 0 10px; line-height: 1.3; }
.grant-meta { margin: 4px 0 0; color: var(--ink-2); }
.grant-amount {
  min-width: 200px; border-radius: 20px; padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background: var(--signal-soft);
}
.grant-amount span { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.grant-amount b { font: 700 40px/1 var(--serif); font-variation-settings: "SOFT" 100; color: var(--ink); }
@media (max-width: 700px) { .grant { grid-template-columns: 1fr; } }

/* editorial reading list for long titles */
.read-list {
  list-style: none; margin: 0; padding: 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(17, 26, 51, .04);
}
.read-list.single { grid-template-columns: 1fr; }
.read-list > li { border-bottom: 1px solid var(--line); }
.read-list > li:nth-last-child(1), .read-list:not(.single) > li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.read-row {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 18px 0;
  text-decoration: none; color: var(--ink);
}
.rr-src {
  grid-column: 1; display: inline-flex; align-items: center; gap: 7px; font: 700 11px/1 var(--sans);
  letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink);
}
.rr-src .i { width: 14px; height: 14px; }
.rr-src.t1 { color: color-mix(in srgb, var(--signal) 60%, var(--ink)); }
.rr-src.t2 { color: var(--teal); }
.rr-src.t3 { color: var(--coral); }
.rr-note { grid-column: 1; font-size: 13.5px; color: var(--muted); margin-top: -2px; }
.no-link { cursor: default; }
.rr-title { grid-column: 1; font: 600 17px/1.4 var(--serif); letter-spacing: -.005em; transition: color .15s; }
.rr-go {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.rr-go .i { width: 16px; height: 16px; }
.read-row:hover .rr-title { color: var(--accent-ink); }
.read-row:hover .rr-go { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateX(3px); }
@media (max-width: 760px) {
  .read-list { grid-template-columns: 1fr; padding: 0 18px; }
  .read-list > li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
}

/* video gallery */
.video-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 22px 18px; }
.video-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.vc-thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow);
}
.vc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.vc-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35)); }
.vc-play {
  position: absolute; left: 12px; bottom: 12px; z-index: 1; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.92); color: #c4302b; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .2s;
}
.vc-play svg { width: 18px; height: 18px; margin-left: 2px; }
.vc-title { font-weight: 600; font-size: 15px; line-height: 1.4; }
.video-card:hover .vc-thumb img { transform: scale(1.05); }
.video-card:hover .vc-play { transform: scale(1.12); }
.video-card:hover .vc-title { color: var(--accent-ink); }

.link-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.link-card {
  display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(17, 26, 51, .04); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.link-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.lc-mono {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 600 17px/1 var(--serif);
}
.lc-mono.t0 { background: var(--accent-soft); color: var(--accent-ink); }
.lc-mono.t1 { background: var(--signal-soft); color: color-mix(in srgb, var(--signal) 55%, var(--ink)); }
.lc-mono.t2 { background: var(--teal-soft); color: var(--teal); }
.lc-mono.t3 { background: var(--coral-soft); color: var(--coral); }
.lc-mono .i { width: 22px; height: 22px; }
.link-card:hover .lc-mono { transform: scale(1.06) rotate(-3deg); }
.lc-mono { transition: transform .2s; }
.lc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-title { font-weight: 600; line-height: 1.35; font-size: 15px; }
.lc-host { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-go { flex: none; color: var(--muted); opacity: 0; transform: translate(-4px, 4px); transition: opacity .15s, transform .15s; }
.lc-go .i { width: 16px; height: 16px; }
.link-card:hover .lc-go { opacity: 1; transform: none; color: var(--accent-ink); }

.book-grid {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(132px, 44%), 1fr)); gap: 28px 20px;
}
.book { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* pastel covers: --c is the cover, --d the deeper tint used for the spine and motif */
.book.c0 { --c: #fde1d3; --d: #f5a07c; }
.book.c1 { --c: #d8eefb; --d: #7cc3ea; }
.book.c2 { --c: #fff0c2; --d: #f2c443; }
.book.c3 { --c: #d9f2e4; --d: #6cc497; }
.book.c4 { --c: #e8e1fb; --d: #a993ec; }
.book.c5 { --c: #fbe0e6; --d: #ee93a8; }
.book-cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 6px 16px 16px 6px; overflow: hidden;
  display: flex; align-items: flex-start; padding: 18px 14px 14px 22px; background: var(--c);
  box-shadow: inset 7px 0 0 color-mix(in srgb, var(--d) 55%, transparent), 0 14px 28px -18px rgba(27, 22, 36, .45);
  transition: transform .25s ease, box-shadow .25s ease;
}
.book-cover::before { content: ""; position: absolute; pointer-events: none; }
.book.m0 .book-cover::before { width: 120px; height: 120px; right: -36px; bottom: -36px; border-radius: 50%; background: color-mix(in srgb, var(--d) 45%, transparent); }
.book.m1 .book-cover::before { width: 150px; height: 150px; left: -50px; bottom: -70px; border-radius: 50%; border: 14px solid color-mix(in srgb, var(--d) 40%, transparent); }
.book.m2 .book-cover::before { left: 0; right: 0; bottom: 0; height: 38%; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--d) 35%, transparent) 0 2px, transparent 2px 10px); }
.bc-title {
  position: relative; font: 600 15px/1.25 var(--serif); font-variation-settings: "SOFT" 100; color: #1b1624;
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.book:hover .book-cover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: inset 7px 0 0 color-mix(in srgb, var(--d) 55%, transparent), 0 26px 36px -20px rgba(27, 22, 36, .5); }
.book-author { font-size: 13.5px; line-height: 1.35; color: var(--muted); padding-left: 4px; }
.note { color: var(--muted); font-size: 15px; margin-top: 24px; }
.no-results { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.inline-fig { margin: 24px 0 0; max-width: 520px; }
.inline-fig img { border-radius: var(--radius); box-shadow: var(--shadow); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- gallery */
.chip-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip-nav a {
  font-size: 14px; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
}
.chip-nav a:hover { border-color: var(--accent); color: var(--accent-ink); }
.gallery-group { padding-top: 48px; }
.gallery-group:last-child { padding-bottom: 80px; }
.gallery { columns: 4 240px; column-gap: 12px; }
.ph { display: block; margin: 0 0 12px; break-inside: avoid; border-radius: 12px; overflow: hidden; position: relative; background: var(--surface-2); }
.ph img { width: 100%; transition: transform .35s ease; }
.ph:hover img { transform: scale(1.03); }
.certs { columns: 3 220px; }
.ph-cap { display: block; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; }
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 12, 15, .92); display: grid; place-items: center; padding: 24px;
}
.lightbox figure { margin: 0; max-width: min(1200px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 8px; }
.lightbox figcaption { color: #dfe5e8; font-size: 15px; text-align: center; }
.lightbox button {
  position: absolute; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 48px; height: 48px; border-radius: 50%;
  font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 0 80px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: 24px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-card .profile-link:last-child { margin-bottom: 0; }
.hero-cta .btn .brand-ico { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding-bottom: 28px; }
.crosswalk { height: 10px; background: repeating-linear-gradient(90deg, var(--signal) 0 36px, transparent 36px 60px); opacity: .9; }
.footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding: 48px 0 36px; }
.footer-brand p { color: var(--muted); font-size: 15px; margin: 14px 0 18px; max-width: 36ch; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.soc {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
}
.soc:hover { color: var(--accent-ink); border-color: var(--accent); }
.footer-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.footer-cols h4 { font: 600 14px var(--sans); margin-bottom: 10px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 6px; }
.footer-cols li a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-cols a:hover { color: var(--accent-ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
@media (max-width: 960px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

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

/* ---------------------------------------------------------------- soft surfaces
   Cards sit on cream with no borders, generous radius and gentle hover lift. */
body { font-variation-settings: "SOFT" 100; }
.site-header { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 0; }
.nav-link { font-size: 15.5px; }
.nav-menu { border: 0; border-radius: 18px; }
.rich-list > li, .entry, .link-card, .read-list, .icon-card, .pub, .grant, .tl-card, .profile-link, .contact-card,
.stu-pubs li, .mentee-pubs li, .search, .toc a, .chip-nav a, .book-grid .book-cover {
  border-color: transparent;
}
.rich-list > li, .entry, .link-card, .read-list, .icon-card, .pub, .grant, .profile-link { border-radius: 24px; box-shadow: none; }
.rich-list > li::before, .entry::before { display: none; }
.rich-list > li:hover, .entry:hover, .link-card:hover, .icon-card:hover, .pub:hover, .profile-link:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.icon-card::after { opacity: 1; }
.tl-card { background: var(--surface); }
.stu-pubs li { background: var(--surface); border-left: 3px solid var(--sky); }
.fact { border: 0; background: var(--tone-soft); }
.search { background: var(--bg); box-shadow: none; border: 1.5px solid var(--line); border-radius: 999px; }
.seg { background: var(--bg); border: 0; border-radius: 999px; }
.seg button { border-radius: 999px; }
.seg button.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.seg button.on span { color: var(--bg); opacity: .7; }
.count { background: var(--surface-2); border: 0; }
.chip { background: var(--surface-2); border: 0; }
.toc a { background: transparent; }
.toc { border-right: 0; }
.toc a.active { background: var(--surface); color: var(--ink); font-weight: 600; }
.pill-list li { border: 0; }
.pill-quiet li { background: var(--surface); }
.profile-link { background: var(--surface); }
.contact-card { background: var(--surface); border-radius: 28px; }
.block-title { font-size: 26px; }
h2.block-title { font-size: 30px; }
.group-title { font-size: 34px; }
.group-title::after { background: var(--line); height: 1.5px; }
.stu-title::after { background: var(--sky); }
.site-footer { background: transparent; border-top: 0; padding: 12px 16px 24px; }
.site-footer > .wrap { max-width: calc(var(--wrap) + 80px); background: var(--panel); border-radius: 36px; padding: 8px 56px 24px; }
.crosswalk { display: none; }
.footer-bottom { border-top-color: var(--line); }
.soc { border: 0; background: var(--bg); }
@media (max-width: 700px) { .site-footer > .wrap { padding: 4px 24px 20px; border-radius: 28px; } }
.band-tight { padding: 40px 0; }
.story-first { margin-top: 28px; }
.story-sub { font-size: 20px; margin: 26px 0 12px; }
.story-more { margin-top: 26px; }
.connect-title { margin-bottom: 28px; }
.entry-meta { margin: -2px 0 12px; font-size: 14px; color: var(--muted); font-weight: 500; }
.entry .link-grid { margin-top: 14px; }
.entry .link-card { background: var(--bg); }
.ph { text-decoration: none; }
.certs { columns: 2 300px; }

/* ---------------------------------------------------------------- home portrait
   Cut-out photo rising out of a yellow speech-bubble disc. The image is masked
   to the disc below its centre line, so the head pops out above the circle. */
.portrait {
  --w: min(470px, 82vw); --d: calc(var(--w) * .86);
  position: relative; justify-self: center; width: var(--w); height: calc(var(--w) * 1.08);
}
.portrait-disc {
  position: absolute; left: 50%; bottom: 0; width: var(--d); height: var(--d); transform: translateX(-50%);
  border-radius: 50%; background: var(--signal);
}
.portrait-disc::after {
  content: ""; position: absolute; right: -9%; top: 34%; width: 26%; height: 18%;
  background: var(--signal); clip-path: polygon(0 0, 100% 10%, 0 100%); border-radius: 4px;
}
.portrait-img {
  position: absolute; left: 50%; bottom: 0; width: 76%; height: auto; transform: translateX(-50%);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--d) / 2) no-repeat,
    radial-gradient(circle calc(var(--d) / 2) at 50% calc(100% - var(--d) / 2), #000 99.5%, transparent 100%);
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--d) / 2) no-repeat,
    radial-gradient(circle calc(var(--d) / 2) at 50% calc(100% - var(--d) / 2), #000 99.5%, transparent 100%);
  filter: drop-shadow(0 18px 24px rgba(27, 22, 36, .18));
}
.portrait-arcs { position: absolute; left: 50%; bottom: 0; width: calc(var(--d) * 1.18); height: calc(var(--d) * 1.18); transform: translate(-50%, 9%); overflow: visible; }
.portrait-arcs path { stroke-width: 2.2; }
.portrait-arcs .arc-a, .portrait-arcs .arc-b { stroke: var(--signal); }
.portrait-arcs .arc-c { stroke: var(--line); stroke-width: 2.6; }
@media (max-width: 960px) { .portrait { --w: min(340px, 78vw); } }
