@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@200;300;400;500;600&display=swap");

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.ad-container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-8); }
.ad-eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.ad-eyebrow--accent { color: var(--accent); }
.ad-muted { color: var(--ink-muted); }
@media (max-width: 640px) { .ad-container { padding: 0 var(--space-4); } }

/* ---------- top navigation ---------- */
.ad-nav { position: sticky; top: 0; z-index: 10; height: var(--nav-height); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.ad-nav__inner { height: 100%; display: flex; align-items: center; gap: var(--space-8); }
.ad-nav__brand { font-weight: 600; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 10px; }
.ad-nav__brand:hover { color: var(--ink); text-decoration: none; }
.ad-nav__mark { width: 22px; height: 14px; color: var(--accent); }
.ad-nav__links { display: flex; gap: var(--space-6); margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.ad-nav__links a { color: var(--ink-muted); font-size: 15px; padding: 6px 0; position: relative; }
.ad-nav__links a:hover { color: var(--ink); text-decoration: none; }
.ad-nav__links a[aria-current="page"] { color: var(--ink); }
.ad-nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); border-radius: 2px; }
.ad-theme { width: 36px; height: 36px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.ad-theme:hover { background: var(--surface-sunken); }
.ad-nav__menu { display: none; }
@media (max-width: 760px) {
  .ad-nav__links { display: none; }
  .ad-nav__menu { display: inline-grid; margin-left: auto; }
}

/* ---------- buttons ---------- */
.ad-btn { display: inline-flex; align-items: center; gap: var(--space-2); height: 44px; padding: 0 18px; border-radius: var(--radius-md); font: 500 15px/1 var(--font-sans); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.ad-btn:hover { text-decoration: none; }
.ad-btn--primary { background: var(--accent); color: var(--on-accent); }
.ad-btn--primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.ad-btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.ad-btn--secondary:hover { background: var(--surface-sunken); color: var(--ink); }
.ad-btn--ghost { background: transparent; color: var(--accent); padding: 0 6px; }
.ad-btn--ghost:hover { color: var(--accent-strong); }
.ad-btn svg { width: 16px; height: 16px; }

/* ---------- tags and filter chips ---------- */
.ad-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-muted); font: 400 12.5px/1 var(--font-mono); }
.ad-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 400 14px/1 var(--font-sans); cursor: pointer; }
.ad-chip:hover { background: var(--surface-sunken); }
.ad-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.ad-chip__count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }
.ad-chip[aria-pressed="true"] .ad-chip__count { color: var(--accent); }

/* ---------- stat / highlight ---------- */
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line); }
.ad-stat { padding: var(--space-6) var(--space-6) var(--space-6) 0; }
.ad-stat + .ad-stat { padding-left: var(--space-6); border-left: 1px solid var(--line); }
.ad-stat__value { font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ad-stat__value small { font-size: 20px; color: var(--accent); margin-left: 2px; }
.ad-stat__label { margin-top: var(--space-2); font-size: 14px; line-height: 21px; color: var(--ink-muted); max-width: 22ch; }
@media (max-width: 640px) { .ad-stat + .ad-stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

/* ---------- cards ---------- */
.ad-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.ad-card:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.ad-card__meta { display: flex; justify-content: space-between; align-items: center; }
.ad-card__title { margin: 0; font-size: 19px; line-height: 28px; font-weight: 600; }
.ad-card__subtitle { margin: -6px 0 0; font-size: 14px; color: var(--accent); }
.ad-card__body { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.ad-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: var(--space-2); }
.ad-card__more { font-size: 14px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
a.ad-card:hover .ad-card__more { color: var(--accent-strong); }
.ad-card__fig { height: 72px; margin: -4px 0 4px; border-bottom: 1px solid var(--line); }
.ad-card__fig svg { width: 100%; height: 100%; display: block; }

/* ---------- publication item ---------- */
.ad-pub { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-6); padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.ad-pub__date { font: 400 13px/22px var(--font-mono); color: var(--ink-subtle); }
.ad-pub__title { margin: 0; font-size: 17px; line-height: 26px; font-weight: 500; }
.ad-pub__authors { margin: 4px 0 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.ad-pub__authors strong { color: var(--ink); font-weight: 600; }
.ad-pub__venue { font-style: italic; }
.ad-pub__links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); align-items: center; }
.ad-pub__link { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); font: 500 12.5px/1 var(--font-mono); color: var(--ink); }
.ad-pub__link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
@media (max-width: 640px) { .ad-pub { grid-template-columns: 1fr; gap: var(--space-1); } }

/* ---------- timeline ---------- */
.ad-timeline { list-style: none; margin: 0; padding: 0; }
.ad-tl { display: grid; grid-template-columns: 148px 20px 1fr; column-gap: var(--space-4); }
.ad-tl__date { font: 400 13px/26px var(--font-mono); color: var(--ink-subtle); text-align: right; }
.ad-tl__rail { position: relative; }
.ad-tl__rail::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.ad-tl:first-child .ad-tl__rail::before { top: 9px; }
.ad-tl:last-child .ad-tl__rail::before { bottom: auto; height: 9px; }
.ad-tl__dot { position: absolute; left: 4px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.ad-tl--current .ad-tl__dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ad-tl__body { padding-bottom: var(--space-12); }
.ad-tl__role { margin: 0; font-size: 19px; line-height: 26px; font-weight: 600; }
.ad-tl__org { margin: 2px 0 0; color: var(--ink-muted); font-size: 15px; }
.ad-tl__org b { color: var(--ink); font-weight: 500; }
.ad-tl__points { margin: var(--space-3) 0 0; padding-left: 18px; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.ad-tl__points li { margin-bottom: 6px; }
.ad-tl__points li::marker { color: var(--line-strong); }
@media (max-width: 640px) {
  .ad-tl { grid-template-columns: 20px 1fr; }
  .ad-tl__date { grid-column: 2; grid-row: 1; text-align: left; }
  .ad-tl__rail { grid-column: 1; grid-row: 1 / span 2; }
  .ad-tl__body { grid-column: 2; }
}

/* ---------- section header ---------- */
.ad-section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-8); }
.ad-section-head h2 { margin: 6px 0 0; font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- hero graphic panel ---------- */
.ad-hero-panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.ad-hero-panel canvas { display: block; width: 100%; height: 100%; }
.ad-hero-panel__cap { position: absolute; left: 18px; bottom: 12px; font: 400 11px/1 var(--font-mono); color: var(--ink-subtle); }

/* ---------- footer ---------- */
.ad-footer { border-top: 1px solid var(--line); padding: var(--space-8) 0; font-size: 14px; color: var(--ink-muted); }
.ad-footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-6); justify-content: space-between; align-items: center; }
.ad-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.ad-footer a { color: var(--ink-muted); }
.ad-footer a:hover { color: var(--accent); }


/* ---------- page background: spectrogram fixed behind the whole page ---------- */
.ad-page-bg { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }
.ad-hero-bg { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(560px, calc(100vh - var(--nav-height)), 880px); padding: var(--space-20) 0; }
.ad-hero-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 90%, transparent) 30%, color-mix(in srgb, var(--bg) 45%, transparent) 58%, transparent 82%); }
.ad-hero-bg__content { position: relative; max-width: 620px; }
.ad-after-hero { position: relative; background: linear-gradient(180deg, transparent 0, color-mix(in srgb, var(--bg) 86%, transparent) 180px); }
@media (max-width: 760px) {
  .ad-hero-bg::before { background: color-mix(in srgb, var(--bg) 80%, transparent); }
}

/* ---------- project image slot ---------- */
.ad-card__media { aspect-ratio: 2 / 1; margin: -8px -8px 4px; border-radius: calc(var(--radius-lg) - 6px); background: var(--surface-sunken); border: 1px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-subtle); font: 400 12px/1 var(--font-mono); overflow: hidden; }
.ad-card__media svg { width: 28px; height: 28px; }
.ad-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-card__media:has(img) { border: 0; }
.ad-pub__link svg { width: 12px; height: 12px; margin-left: 4px; }

/* ---------- floating pill navigation (one-page, scroll-aware) ---------- */
.ad-pill-nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid color-mix(in srgb, var(--line-strong) 55%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 6px 24px rgba(0,0,0,.08); max-width: calc(100vw - 24px); }
.ad-pill-nav__list { position: relative; display: flex; list-style: none; margin: 0; padding: 0; }
.ad-pill-nav__blob { position: absolute; left: 0; top: 0; height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .6s cubic-bezier(.34,1.45,.64,1), width .6s cubic-bezier(.34,1.45,.64,1); pointer-events: none; }
.ad-pill-nav__list a { position: relative; display: block; padding: 8px 16px; border-radius: var(--radius-pill); font-size: 14.5px; line-height: 20px; color: var(--ink-muted); white-space: nowrap; transition: color .3s; }
.ad-pill-nav__list a:hover { color: var(--ink); text-decoration: none; }
.ad-pill-nav__list a[aria-current="true"] { color: var(--ink); }
.ad-pill-nav .ad-theme { width: 34px; height: 34px; border-color: transparent; }
@media (max-width: 640px) { .ad-pill-nav__list a { padding: 8px 10px; font-size: 13px; } .ad-pill-nav { top: 10px; } }

/* ---------- home: hero with portrait ---------- */
.ad-hero-bg--split .ad-container { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 32px; }
.ad-hero-bg--split { align-items: stretch; padding: 0; }
.ad-hero-bg--split .ad-hero-bg__content { align-self: center; padding: 120px 0 80px; }
.ad-portrait { align-self: end; justify-self: end; width: min(100%, 560px); aspect-ratio: 1090 / 900; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.ad-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; }
@media (max-width: 900px) {
  .ad-hero-bg--split .ad-container { grid-template-columns: 1fr; }
  .ad-hero-bg--split .ad-hero-bg__content { padding: 96px 0 0; }
  .ad-portrait { justify-self: center; width: min(78%, 380px); order: -1; margin-top: 80px; -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent); mask-image: radial-gradient(closest-side, #000 82%, transparent); }
}

/* ---------- experience list (bigger, no dates) ---------- */
.ad-xp { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ad-xp li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.ad-xp__org { margin: 0; font-size: 30px; line-height: 38px; font-weight: 500; letter-spacing: -0.015em; }
.ad-xp__kind { display: block; margin-top: 6px; font: 500 12px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); }
.ad-xp__role { margin: 4px 0 0; font-size: 19px; line-height: 28px; font-weight: 500; }
.ad-xp__line { margin: 6px 0 0; font-size: 16px; line-height: 26px; color: var(--ink-muted); max-width: 560px; }
@media (max-width: 760px) { .ad-xp li { grid-template-columns: 1fr; gap: 8px; } .ad-xp__org { font-size: 24px; line-height: 30px; } }

/* ---------- compact publication (venue line above title, DOI only) ---------- */
.ad-pubc { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); }
.ad-pubc__meta { font: 500 12px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); }
.ad-pubc__title { margin: 8px 0 0; font-size: 18px; line-height: 27px; font-weight: 500; max-width: 820px; }
@media (max-width: 640px) { .ad-pubc { grid-template-columns: 1fr; gap: 12px; } }
.ad-card__more { margin-top: auto; padding-top: var(--space-2); }
.ad-card__more svg { width: 16px; height: 16px; flex: none; }
@media (min-width: 901px) {
  .ad-hero-bg--split .ad-container { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ad-portrait { width: min(100%, 640px); }
}
.ad-pill-nav__list { overflow-x: auto; scrollbar-width: none; }
.ad-pill-nav__list::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .ad-portrait { aspect-ratio: 1; width: min(64%, 260px); border-radius: 50%; overflow: hidden; background: var(--surface-sunken); -webkit-mask-image: none; mask-image: none; box-shadow: 0 0 0 1px var(--line-strong); }
  .ad-portrait img { object-fit: cover; object-position: 50% 15%; transform: scale(1.35); transform-origin: 50% 20%; }
}
@media (max-width: 480px) {
  .ad-pill-nav { padding: 4px; gap: 2px; }
  .ad-pill-nav__list a { padding: 7px 8px; font-size: 12.5px; }
  .ad-pill-nav .ad-theme { width: 30px; height: 30px; }
}

/* ---------- hero v7: photo card on the left, text on the right ---------- */
.ad-photo { width: 100%; max-width: 420px; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.ad-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 901px) {
  .ad-hero-bg--split .ad-container { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 72px; }
  .ad-hero-bg--split .ad-hero-bg__content { padding: 120px 0 96px; }
  .ad-hero-bg--split .ad-photo { margin-top: 40px; }
}
.ad-hero-bg--split::before { background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 35%, transparent) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 38%, color-mix(in srgb, var(--bg) 82%, transparent) 72%, color-mix(in srgb, var(--bg) 30%, transparent) 100%); }
@media (max-width: 900px) {
  .ad-hero-bg--split .ad-photo { max-width: 240px; margin: 96px 0 0; }
  .ad-hero-bg--split .ad-hero-bg__content { padding: 32px 0 0; }
}

/* ================= liquid glass (v8) ================= */
:root { --glass-tint: rgba(255,255,255,.42); --glass-tint-2: rgba(255,255,255,.18); --glass-rim: rgba(255,255,255,.75); --glass-rim-2: rgba(255,255,255,.25); --glass-hi: rgba(255,255,255,.85); --glass-shadow: 0 12px 32px rgba(17,22,20,.12), 0 2px 6px rgba(17,22,20,.06); --bead: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.55)); --spring: cubic-bezier(.32,1.45,.55,1); }
[data-theme="dark"] { --glass-tint: rgba(255,255,255,.09); --glass-tint-2: rgba(255,255,255,.03); --glass-rim: rgba(255,255,255,.30); --glass-rim-2: rgba(255,255,255,.06); --glass-hi: rgba(255,255,255,.28); --glass-shadow: 0 14px 36px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3); --bead: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.07)); }

.ad-glass { position: relative; }
.ad-glass, .ad-pill-nav { background: linear-gradient(180deg, var(--glass-tint), var(--glass-tint-2)); border: 0; backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 -1px 1px rgba(0,0,0,.05); }
.ad-glass::before, .ad-pill-nav::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(140deg, var(--glass-rim), var(--glass-rim-2) 35%, transparent 55%, var(--glass-rim-2) 75%, var(--glass-rim)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.ad-pill-nav { transition: padding .45s var(--spring), top .45s var(--spring), transform .45s var(--spring); }
.ad-pill-nav.is-compact { top: 10px; padding: 4px; transform: translateX(-50%) scale(.96); }
.ad-pill-nav__blob { background: var(--bead); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 4px rgba(0,0,0,.06), 0 3px 10px rgba(0,0,0,.10), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .5s var(--spring), width .5s var(--spring), top .3s ease, bottom .3s ease, height .3s ease; }
[data-theme="dark"] .ad-pill-nav__blob { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.25), 0 3px 12px rgba(0,0,0,.35), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.ad-pill-nav__blob.is-stretch { transition: transform .19s ease-out, width .19s ease-out; top: 3px; height: calc(100% - 6px); }
.ad-pill-nav__list a { transition: color .3s, transform .4s var(--spring); }
.ad-pill-nav__list a:active { transform: scale(.94); }
.ad-pill-nav__list a[aria-current="true"] { color: var(--ink); font-weight: 500; }
.ad-pill-nav .ad-theme { background: transparent; transition: transform .4s var(--spring), background .2s; }
.ad-pill-nav .ad-theme:hover { background: var(--glass-tint); transform: rotate(-12deg) scale(1.06); }

/* liquid buttons */
.ad-btn { transition: transform .45s var(--spring), box-shadow .3s, background .2s, color .2s; }
.ad-btn:hover { transform: translateY(-1px) scale(1.02); }
.ad-btn:active { transform: scale(.97); }
.ad-btn--primary { background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.ad-btn--secondary { position: relative; border-color: transparent; background: linear-gradient(180deg, var(--glass-tint), var(--glass-tint-2)); backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); box-shadow: 0 4px 14px rgba(0,0,0,.08), inset 0 1px 0 var(--glass-hi), inset 0 0 0 1px var(--glass-rim-2); }
.ad-btn--secondary:hover { background: linear-gradient(180deg, var(--glass-tint), var(--glass-tint)); }

/* cards: soft glass rim and a springy lift */
a.ad-card { transition: transform .55s var(--spring), box-shadow .35s, border-color .2s; box-shadow: inset 0 1px 0 var(--glass-hi); }
a.ad-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow); }
.hp-contact { box-shadow: inset 0 1px 0 var(--glass-hi); }

/* first screen = hero only */
.ad-hero-bg--split { min-height: 100vh; min-height: 100svh; }
.ad-scroll-cue.ad-glass { position: absolute; }
.ad-scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); z-index: 2; transition: transform .45s var(--spring); }
.ad-scroll-cue svg { width: 18px; height: 18px; animation: ad-cue 2.4s ease-in-out 4.5s 3; }
.ad-scroll-cue:hover { transform: translateY(3px) scale(1.06); text-decoration: none; color: var(--ink); }
@keyframes ad-cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* pop-up on scroll */
.hp-grid > :nth-child(2), .ad-xp > :nth-child(2), .ad-pubc:nth-of-type(2) { --d: 90ms; }
.hp-grid > :nth-child(3), .ad-xp > :nth-child(3), .ad-pubc:nth-of-type(3) { --d: 160ms; }
.hp-grid > :nth-child(4), .ad-xp > :nth-child(4), .ad-pubc:nth-of-type(4) { --d: 230ms; }

/* ================= liquid glass v2: clearer, lens refraction, specular sheen ================= */
:root { --glass-tint: rgba(255,255,255,.20); --glass-tint-2: rgba(255,255,255,.06); --glass-rim: rgba(255,255,255,.95); --glass-rim-2: rgba(255,255,255,.30); --glass-hi: rgba(255,255,255,.95); --glass-sheen: rgba(255,255,255,.55); --glass-shadow: 0 10px 30px rgba(17,22,20,.14), 0 1px 3px rgba(17,22,20,.08); }
[data-theme="dark"] { --glass-tint: rgba(255,255,255,.08); --glass-tint-2: rgba(255,255,255,.02); --glass-rim: rgba(255,255,255,.55); --glass-rim-2: rgba(255,255,255,.10); --glass-hi: rgba(255,255,255,.35); --glass-sheen: rgba(255,255,255,.14); --glass-shadow: 0 12px 34px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4); }
.ad-glass, .ad-pill-nav, .ad-btn--secondary { backdrop-filter: blur(10px) saturate(1.9) brightness(1.04); -webkit-backdrop-filter: blur(10px) saturate(1.9) brightness(1.04); box-shadow: var(--glass-shadow), inset 0 1px 1px var(--glass-hi), inset 0 -1px 2px rgba(0,0,0,.08), inset 0 0 14px rgba(255,255,255,.10); }
html.ad-lens .ad-glass, html.ad-lens .ad-pill-nav, html.ad-lens .ad-btn--secondary { backdrop-filter: url(#ad-lg) blur(2.5px) saturate(1.9) brightness(1.05); }
.ad-pill-nav::after, .ad-glass::after, .ad-btn--secondary::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 90% at 18% -20%, var(--glass-sheen), transparent 55%), radial-gradient(80% 70% at 100% 130%, rgba(255,255,255,.12), transparent 60%); mix-blend-mode: screen; }
.ad-pill-nav__list, .ad-pill-nav .ad-theme, .ad-btn--secondary > * { position: relative; z-index: 1; }
.ad-pill-nav__blob { background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.30)); backdrop-filter: blur(4px) saturate(1.6); -webkit-backdrop-filter: blur(4px) saturate(1.6); box-shadow: inset 0 1px 1px rgba(255,255,255,1), inset 0 -2px 4px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.06); }
[data-theme="dark"] .ad-pill-nav__blob { background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.08)); box-shadow: inset 0 1px 1px rgba(255,255,255,.45), inset 0 -2px 4px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.45), 0 0 0 .5px rgba(255,255,255,.12); }
.ad-btn--secondary { overflow: hidden; }

/* stronger pop for the opening screen */

/* pop-up on scroll and on open: keyframe animations (start reliably, also for elements already on screen) */
html.ad-reveal-on [data-reveal]:not(.is-in) { opacity: 0; }
html.ad-reveal-on [data-reveal].is-in { animation: ad-pop .95s var(--spring) var(--d, 0ms) both; }
html.ad-reveal-on [data-reveal="title"].is-in { animation-name: ad-pop-title; animation-duration: 1.1s; }
html.ad-reveal-on .ad-hero-bg [data-reveal].is-in { animation-name: ad-pop-hero; animation-duration: 1.15s; }
html.ad-reveal-on .ad-hero-bg [data-reveal="title"].is-in { animation-name: ad-pop-title; animation-duration: 1.25s; }
html.ad-reveal-on .ad-hero-bg .ad-photo[data-reveal].is-in { animation-name: ad-pop-photo; animation-duration: 1.3s; }
@keyframes ad-pop { from { opacity: 0; transform: scale(.94); filter: blur(6px); } 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ad-pop-hero { from { opacity: 0; transform: scale(.9); filter: blur(8px); } 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ad-pop-title { from { opacity: 0; transform: scale(.82); filter: blur(10px); } 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ad-pop-photo { from { opacity: 0; transform: scale(.88); filter: blur(8px); } 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
html.ad-reveal-on .ad-hero-bg [data-reveal].is-in { animation-delay: calc(var(--d, 0ms) + 650ms); }
html.ad-reveal-on .ad-hero-bg [data-reveal="title"] { transform-origin: left center; }
/* glass tint keeps text readable over anything (photo, waves): light glass is milky, dark glass is smoky */
:root { --glass-tint: rgba(255,255,255,.58); --glass-tint-2: rgba(255,255,255,.34); }
[data-theme="dark"] { --glass-tint: rgba(28,34,33,.66); --glass-tint-2: rgba(16,20,19,.52); }

/* ================= minimalist (v10): plain text nav, no chrome ================= */
.ad-pill-nav.ad-text-nav { top: 26px; padding: 0; gap: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; transform: translateX(-50%); }
.ad-pill-nav.ad-text-nav::before, .ad-pill-nav.ad-text-nav::after { display: none; }
.ad-pill-nav.ad-text-nav.is-compact { top: 18px; padding: 0; transform: translateX(-50%); }
.ad-text-nav .ad-pill-nav__list { gap: 36px; overflow: visible; }
.ad-text-nav .ad-pill-nav__list a { padding: 4px 0; font-size: 14px; letter-spacing: .02em; color: var(--ink-subtle); font-weight: 400; }
.ad-text-nav .ad-pill-nav__list a:hover { color: var(--ink); }
.ad-text-nav .ad-pill-nav__list a[aria-current="true"] { color: var(--ink); font-weight: 400; }
.ad-text-nav .ad-pill-nav__blob, html.ad-lens .ad-text-nav .ad-pill-nav__blob { top: auto; bottom: -3px; height: 1px; border-radius: 1px; background: var(--accent); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ad-text-nav .ad-pill-nav__blob.is-stretch { top: auto; height: 1px; }
.ad-topfade { position: fixed; top: 0; left: 0; right: 0; height: 96px; z-index: 19; pointer-events: none; background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent 100%); }
@media (max-width: 640px) { .ad-text-nav .ad-pill-nav__list { gap: 18px; } .ad-text-nav .ad-pill-nav__list a { font-size: 13px; } }
.ad-section-head h2.hp-h2 { margin-top: 0; }
.ad-section-head { align-items: baseline; }
.ad-xp--min li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ad-card--min { padding: 0; background: none; border: 0; box-shadow: none !important; gap: 10px; }
.ad-card--min:hover { transform: none; }
.ad-card--min .ad-card__media { margin: 0 0 8px; border-radius: var(--radius-md); transition: transform .5s var(--spring); }
.ad-card--min:hover .ad-card__media { transform: scale(1.015); }
.ad-card--min .ad-card__title { font-weight: 500; }
.hp-min-link svg { width: 14px; height: 14px; vertical-align: -2px; margin-left: 4px; }

/* items pop on their own beat, a moment after their section title, and a little stronger */
@keyframes ad-pop-item { from { opacity: 0; transform: scale(.86); filter: blur(10px); } 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
html.ad-reveal-on .hp-section [data-reveal]:not([data-reveal="title"]).is-in { animation-name: ad-pop-item; animation-duration: 1.05s; animation-delay: calc(var(--d, 0ms) + 220ms); }
.ad-xp > li, .ad-pubc, .hp-contact-min { transform-origin: left center; }

/* v11: section items wait for their title (timing set per item by script in --wait) */
html.ad-reveal-on .hp-section [data-reveal]:not([data-reveal="title"]).is-in { animation-delay: var(--wait, 0ms); }
/* hero: name and role are there from the start; photo and profile fade in slowly and smoothly */
@keyframes ad-soft-in { from { opacity: 0; transform: scale(.975); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
html.ad-reveal-on .ad-hero-bg .ad-soft[data-reveal].is-in { animation-name: ad-soft-in; animation-duration: 1.9s; animation-timing-function: cubic-bezier(.22,.61,.36,1); animation-delay: var(--d, 0ms); }
.ad-photo { background: #f7f8f9; }
html.ad-lens .ad-pill-nav.ad-text-nav { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* v12: section pop-ups slower and smoother (gentle ease-out, no bounce) */
@keyframes ad-pop-smooth { from { opacity: 0; transform: scale(.95); filter: blur(8px); } 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ad-pop-title-smooth { from { opacity: 0; transform: scale(.92); filter: blur(10px); } 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
html.ad-reveal-on .hp-section [data-reveal="title"].is-in { animation-name: ad-pop-title-smooth; animation-duration: 1.6s; animation-timing-function: cubic-bezier(.22,.61,.36,1); }
html.ad-reveal-on .hp-section [data-reveal]:not([data-reveal="title"]).is-in { animation-name: ad-pop-smooth; animation-duration: 1.5s; animation-timing-function: cubic-bezier(.22,.61,.36,1); }

/* v13: thin, minimalist display type for the name and section titles */
.hp-name { font-weight: 200 !important; letter-spacing: -0.02em !important; }
.hp-h2, .ad-section-head h2.hp-h2 { font-weight: 200 !important; letter-spacing: -0.02em !important; }
.hp-hero__role { font-weight: 300; }
.ad-xp__org { font-weight: 300; }
.ad-card--min .ad-card__title { font-weight: 400; }
.ad-xp__role { font-weight: 400; }

/* v14: first screen = name and title only, left; photo and profile come on scroll */
.ad-hero-min { min-height: 100vh; min-height: 100svh; padding: 0; align-items: center; }
.ad-hero-min::before { display: none; }
.ad-hero-min .hp-name { margin: 0; font-size: 96px; line-height: 100px; }
.ad-hero-min .hp-hero__role { margin-top: 18px; font-size: 24px; line-height: 32px; }
.hp-about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; align-content: center; }
.hp-about .ad-photo { max-width: 420px; margin: 0; }
.hp-about__text { margin: 0; font-size: 22px; line-height: 36px; font-weight: 300; color: var(--ink); max-width: 620px; }
@media (max-width: 900px) {
  .ad-hero-min .hp-name { font-size: 56px; line-height: 60px; }
  .ad-hero-min .hp-hero__role { font-size: 19px; }
  .hp-about { grid-template-columns: 1fr; gap: 32px; }
  .hp-about .ad-photo { max-width: 280px; }
  .hp-about__text { font-size: 18px; line-height: 30px; }
}
.hp-about { padding-top: 0 !important; }
.hp-about__text p { margin: 0; }
.hp-about__text p + p { margin-top: 24px; color: var(--ink-muted); }
.hp-about__text { font-size: 20px; line-height: 33px; }
@media (max-width: 900px) { .hp-about__text { font-size: 17px; line-height: 28px; } }
.hp-about__text p + p { color: var(--ink); }
.ad-card__media--img { border: 0; background: #fff; }
.ad-card__media--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ad-card__media--svg { border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); }
/* v15: experience periods */
.ad-xp--min .ad-xp__org { font-weight: 300; }
.ad-xp--min .ad-xp__role { font-weight: 400; }
.ad-xp__date { display: block; margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.ad-xp__note { margin: 10px 0 0; font-size: 14px; line-height: 22px; color: var(--ink-subtle); max-width: 560px; }
