/* ==========================================================================
   Tokens — "Rose B-scan" palette
   Deep plum ink (never pure black), soft blush text, a rose accent and a
   gentle lilac for data — warm and cute, still calm enough for research.
   ========================================================================== */
@font-face { font-family: "Lora"; src: url("../fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;

  --ink-0: #15121a;
  --ink-1: #1b1721;
  --ink-2: #221c29;
  --ink-3: #2c2434;
  --line: rgba(247, 228, 238, 0.11);
  --line-2: rgba(247, 228, 238, 0.2);

  --text: #f6ecf1;
  --text-2: #cdbfc8;
  --text-3: #9c8e98;

  --rose: #f4a6c6;
  --rose-2: #f9c8dc;
  --rose-ink: #2b0f1d;
  --rose-soft: rgba(244, 166, 198, 0.14);
  --rose-glow: rgba(244, 166, 198, 0.35);
  --lilac: #c4b0f2;
  --lilac-soft: rgba(196, 176, 242, 0.14);

  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.12vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --step-1: clamp(1.17rem, 1.08rem + 0.4vw, 1.38rem);
  --step-2: clamp(1.42rem, 1.24rem + 0.8vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 3rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 4.8rem);
  --step-5: clamp(3.2rem, 1.8rem + 6.4vw, 7.6rem);

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
  --radius-s: 8px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.9s;
  --nav-h: 64px;
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: rgba(244, 166, 198, 0.45); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--rose); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
::selection { background: rgba(244, 166, 198, 0.35); color: #fff; }

:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--rose); color: var(--rose-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow { display: flex; align-items: center; gap: 12px; font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); font-weight: 500; margin: 0; }
.rule { display: inline-block; width: 34px; height: 1px; background: currentColor; flex: none; }
.k { display: block; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 0 0 0.5em; }
.fine { font-size: var(--step--1); color: var(--text-3); margin-top: 1.6rem; }
.fine a { color: var(--text-2); }

/* Buttons & pills --------------------------------------------------------- */
.btn {
  --bg: transparent;
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 44px; padding: 0.62em 1.05em;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg); color: var(--text);
  font-size: 0.92rem; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), color 0.35s, transform 0.35s var(--ease-out);
}
.btn:hover { border-color: var(--rose); background: var(--rose-soft); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--solid { background: var(--rose); border-color: var(--rose); color: var(--rose-ink); }
.btn--solid:hover { background: var(--rose-2); border-color: var(--rose-2); }
.btn--ghost { border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { color: var(--text); border-color: var(--line-2); background: transparent; }
.btn .i { transition: transform 0.35s var(--ease-out); }
.btn:hover .i { transform: translate(2px, -2px); }
.btn:hover .i:has(path[d^="M10 4v12"]) { transform: translateY(2px); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 0.28em 0.75em; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--text-2); white-space: nowrap; }
.pill--rose { border-color: rgba(244, 166, 198, 0.5); color: var(--rose); background: var(--rose-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chips span { font-size: 0.75rem; padding: 0.2em 0.6em; border-radius: 6px; background: var(--ink-3); color: var(--text-2); }

.ticks li { position: relative; padding-left: 1.4em; margin-bottom: 0.5em; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.7em; height: 1px; background: var(--rose); }
.ticks--sm li { font-size: 0.92rem; margin-bottom: 0.35em; }

/* Navigation -------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  transition: background-color 0.5s var(--ease-out), border-color 0.5s, backdrop-filter 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(21, 18, 26, 0.78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__mark { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 10px; font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1; padding-bottom: 3px; }
.nav__mark i { position: absolute; right: 7px; bottom: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--rose); }
.nav__name { font-size: 0.92rem; font-weight: 500; letter-spacing: 0.01em; opacity: 0; transform: translateY(4px); transition: opacity 0.5s, transform 0.5s var(--ease-out); }
.nav.is-scrolled .nav__name { opacity: 1; transform: none; }
.nav__links { display: flex; gap: 4px; }
.nav__links a { position: relative; padding: 10px 12px; font-size: 0.88rem; color: var(--text-2); text-decoration: none; border-radius: 8px; transition: color 0.3s; }
.nav__links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 1px; background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease-out); }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--text); }
.nav__links a[aria-current="true"]::after, .nav__links a:hover::after { transform: scaleX(1); }
.nav__toggle { display: none; }
.nav__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.nav__progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--lilac), var(--rose)); transform-origin: left; transform: scaleX(var(--p, 0)); }

@media (max-width: 860px) {
  .nav__name { opacity: 1; transform: none; }
  .nav__toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: transparent; cursor: pointer; }
  .nav__bars, .nav__bars::before, .nav__bars::after { display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.4s var(--ease-out), opacity 0.3s; }
  .nav__bars { position: relative; }
  .nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
  .nav__bars::before { top: -6px; } .nav__bars::after { top: 6px; }
  .nav.is-open .nav__bars { background: transparent; }
  .nav.is-open .nav__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav.is-open .nav__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 0; overflow-y: auto; flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 24px; background: rgba(21, 18, 26, 0.97); border-bottom: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path 0.55s var(--ease-out), visibility 0s 0.55s;
  }
  .nav.is-open { background: rgba(21, 18, 26, 0.97); }
  .nav.is-open .nav__links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.55s var(--ease-out), visibility 0s; }
  .nav__links a { font-family: var(--serif); font-size: 1.6rem; padding: 12px 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); }
  .nav__links a::after { display: none; }
  .js .nav__links:not(.is-ready) { transition: none; }
}
.no-js .nav__links { visibility: visible; clip-path: none; }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 4vh) 0 0; isolation: isolate; overflow: hidden; }
.hero__field { position: absolute; inset: 0; z-index: -1; }
.hero__fallback, .hero__canvas, .hero__grain { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fallback {
  background:
    radial-gradient(60% 50% at 72% 38%, rgba(244, 166, 198, 0.13), transparent 70%),
    radial-gradient(50% 60% at 15% 90%, rgba(196, 176, 242, 0.09), transparent 70%),
    repeating-linear-gradient(176deg, transparent 0 22px, rgba(236, 230, 220, 0.025) 22px 23px),
    var(--ink-0);
}
.hero__canvas { opacity: 0; transition: opacity 1.6s var(--ease-out); }
.hero__canvas.is-live { opacity: 1; }
.hero__grain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; opacity: 0.6; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 22vh; background: linear-gradient(to bottom, transparent, var(--ink-0)); z-index: -1; pointer-events: none; }

.hero__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.hero__eyebrow { margin-bottom: clamp(18px, 3vh, 30px); }
.hero__name { font-family: var(--serif); font-weight: 420; font-size: var(--step-5); line-height: 0.94; letter-spacing: -0.025em; margin: 0 0 clamp(18px, 3vh, 28px); }
.hero__name .word { display: inline-block; white-space: nowrap; }
.hero__name .word:first-child { display: block; }
.hero__name .it { font-style: italic; font-weight: 400; }
.hero__name .ch { display: inline-block; }
.hero__role { font-size: var(--step-1); color: var(--text); margin-bottom: 0.6em; }
.hero__intro { max-width: 38ch; font-size: var(--step-0); color: var(--text-2); margin-bottom: clamp(24px, 4vh, 36px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

.hero__portrait { margin: 0; justify-self: end; width: min(100%, 420px); }
.portrait { position: relative; border-radius: 4px; }
.portrait picture, .portrait img { display: block; border-radius: 4px; width: 100%; }
.about__photo picture { display: block; }
.portrait img { aspect-ratio: 990 / 1238; object-fit: cover; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.65); }
.portrait::before { content: ""; position: absolute; inset: -14px; border: 1px solid var(--line); border-radius: 8px; pointer-events: none; }
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(180deg, transparent 55%, rgba(21, 18, 26, 0.35)); pointer-events: none; }
.portrait__scan { position: absolute; left: -14px; right: -14px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--rose), transparent); box-shadow: 0 0 18px 2px rgba(244, 166, 198, 0.55); opacity: 0; pointer-events: none; z-index: 2; }
.tick { position: absolute; width: 14px; height: 14px; border-color: var(--rose); border-style: solid; border-width: 0; z-index: 2; }
.tick--tl { left: -14px; top: -14px; border-left-width: 1px; border-top-width: 1px; }
.tick--tr { right: -14px; top: -14px; border-right-width: 1px; border-top-width: 1px; }
.tick--bl { left: -14px; bottom: -14px; border-left-width: 1px; border-bottom-width: 1px; }
.tick--br { right: -14px; bottom: -14px; border-right-width: 1px; border-bottom-width: 1px; }
.portrait__cap { white-space: nowrap; margin-top: 26px; font-size: 0.78rem; letter-spacing: 0.06em; color: var(--text-3); display: flex; gap: 10px; }
.portrait__cap span { color: var(--rose); }

.hero__latest { position: relative; display: flex; align-items: center; gap: 14px; margin-top: clamp(32px, 7vh, 72px); margin-bottom: 28px; padding: 16px 0 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text-2); font-size: 0.92rem; }
.hero__latest-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hero__latest em { color: var(--text); }
.hero__latest .i { flex: none; margin-left: auto; transition: transform 0.4s var(--ease-out); }
.hero__latest:hover { color: var(--text); }
.hero__latest:hover .i { transform: translate(3px, -3px); }

@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 28px); }
  .hero__inner { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero__text { display: contents; }
  .hero__eyebrow { order: 1; }
  .hero__name { order: 2; }
  .hero__portrait { order: 3; align-self: flex-end; width: min(68%, 340px); margin: 6px 14px 30px 0; }
  .hero__role { order: 4; }
  .hero__intro { order: 5; }
  .hero__cta { order: 6; }
  .hero__latest-text { white-space: normal; }
}
@media (max-width: 480px) { .hero__cta .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; } .hero__cta .btn--solid { flex-basis: 100%; } }

/* Section scaffolding ----------------------------------------------------- */
.section { position: relative; padding: clamp(80px, 12vw, 160px) 0 0; }
.shead { display: grid; grid-template-columns: minmax(140px, 0.32fr) 1fr; align-items: end; gap: 8px 32px; margin-bottom: clamp(40px, 6vw, 72px); position: relative; padding-bottom: 22px; }
.shead__num { margin: 0; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); display: flex; gap: 12px; align-items: baseline; padding-bottom: 0.6em; }
.shead__num span { color: var(--rose); font-family: var(--serif); font-style: italic; letter-spacing: 0; font-size: 1.05rem; text-transform: none; }
.shead__title { font-family: var(--serif); font-weight: 400; font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.02em; }
.shead__title em { color: var(--rose); }
.shead__line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-2); transform-origin: left; }
@media (max-width: 700px) { .shead { grid-template-columns: 1fr; } }
.sub { font-family: var(--serif); font-weight: 400; font-size: var(--step-2); margin: clamp(56px, 8vw, 96px) 0 22px; }

/* About ------------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__photo { margin: 0; position: sticky; top: calc(var(--nav-h) + 32px); }
.about__photo img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; }
.about__photo figcaption { margin-top: 18px; font-size: 0.88rem; color: var(--text-2); line-height: 1.5; }
.about__body { max-width: 66ch; }
.about__body p { color: var(--text-2); }
.about__body .lede { font-family: var(--serif); font-size: var(--step-2); line-height: 1.35; color: var(--text); margin-bottom: 1.1em; }
.timeline { margin-top: 48px; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 4px 20px; padding: 0 0 26px 24px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-0); border: 1px solid var(--rose); }
.timeline li:last-child::before { background: var(--rose); box-shadow: 0 0 0 5px var(--rose-soft); }
.timeline time { font-size: 0.82rem; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 0.15em; }
.timeline__tag { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); }
.timeline__text { grid-column: 2; color: var(--text); font-size: 0.96rem; }
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 280px; }
}
@media (max-width: 480px) { .timeline li { grid-template-columns: 1fr; } .timeline__text { grid-column: 1; } }

/* Research interests ------------------------------------------------------ */
.interests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.interest { position: relative; padding: 32px 28px 34px 0; border-bottom: 1px solid var(--line); }
.interest:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.interest__n { font-family: var(--serif); font-style: italic; color: var(--rose); font-size: 1.05rem; }
.interest h3 { font-family: var(--serif); font-weight: 450; font-size: var(--step-2); line-height: 1.15; margin: 14px 0 12px; }
.interest p { color: var(--text-2); font-size: 0.96rem; }
.interest__ev { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.interest__ev span { font-size: 0.72rem; padding: 0.2em 0.6em; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-3); }
.interest::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform 0.8s var(--ease-out); }
.interest:not(:nth-child(3n + 1))::after { left: 28px; }
.interest:hover::after { transform: scaleX(1); }
@media (max-width: 960px) {
  .interests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interest:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .interest:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
  .interest::after, .interest:not(:nth-child(3n + 1))::after { left: 0; }
}
@media (max-width: 600px) {
  .interests { grid-template-columns: 1fr; }
  .interest:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* Featured paper ---------------------------------------------------------- */
.paper { position: relative; padding: clamp(24px, 4vw, 56px); border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(160deg, rgba(244, 166, 198, 0.06), transparent 40%), var(--ink-1); overflow: hidden; }
.paper::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--rose), transparent); opacity: 0.6; }
.paper__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.paper__title { font-family: var(--serif); font-weight: 450; font-size: var(--step-3); line-height: 1.14; letter-spacing: -0.012em; max-width: 30ch; margin-bottom: 18px; text-wrap: balance; }
.paper__title a { text-decoration: none; background: linear-gradient(var(--rose), var(--rose)) 0 100% / 0 1px no-repeat; transition: background-size 0.8s var(--ease-out); }
.paper__title a:hover { background-size: 100% 1px; }
.paper__authors { color: var(--text); margin-bottom: 4px; }
.self { color: var(--rose); font-weight: 600; }
.paper__cite { color: var(--text-3); font-size: 0.92rem; }
.paper__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 40px; }
.paper__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); padding-top: 36px; border-top: 1px solid var(--line); }
.paper__text p, .paper__text li { color: var(--text-2); }
.paper__text .k { margin-top: 26px; }
.paper__text .k:first-child { margin-top: 0; }
.paper__q { font-family: var(--serif); font-style: italic; font-size: var(--step-1); color: var(--text) !important; line-height: 1.4; }
.paper__take { color: var(--text) !important; border-left: 2px solid var(--rose); padding-left: 16px; }
.paper__kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.paper__kw span { font-size: 0.74rem; color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 0.2em 0.55em; }
.paper__figs { display: grid; gap: 14px; align-content: start; }
.fig { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(21, 18, 26, 0.5); }
.fig__label { margin: 0 0 10px; font-size: 0.88rem; color: var(--text); }
.fig__note { margin: 8px 0 0; font-size: 0.74rem; color: var(--text-3); }
.bar { display: grid; grid-template-columns: 112px 1fr 56px; align-items: center; gap: 12px; font-size: 0.8rem; margin-top: 8px; color: var(--text-3); }
.bar__track { height: 8px; background: var(--ink-3); border-radius: 99px; overflow: hidden; }
.bar__fill { display: block; height: 100%; width: var(--w); background: var(--text-3); border-radius: inherit; transform-origin: left; }
.bar--hi { color: var(--text); }
.bar--hi .bar__fill { background: linear-gradient(90deg, var(--lilac), var(--rose)); }
.bar__val { font-variant-numeric: tabular-nums; text-align: right; }
.fig--runs { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; }
.fig--runs .fig__label { margin: 0; }
.fig__count { grid-row: span 2; margin: 0; font-family: var(--serif); line-height: 1; }
.fig__count strong { font-size: 2.4rem; font-weight: 450; color: var(--rose); }
.fig__count span { color: var(--text-3); font-size: 0.85rem; }
.dots { display: flex; gap: 5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-2); }
.dot.on { background: var(--lilac); border-color: var(--lilac); }
.fig--range p { margin: 0 0 14px; font-size: 0.88rem; }
.range { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.range__a { color: var(--lilac); } .range__b { color: var(--rose); }
.range__track { position: relative; height: 8px; background: var(--ink-3); border-radius: 99px; }
.range__mark { position: absolute; left: 0; top: -3px; bottom: -3px; width: 2px; background: var(--lilac); left: calc(0.5 / 1.7 * 100%); }
.range__band { position: absolute; top: 0; bottom: 0; left: calc(1.19 / 1.7 * 100%); right: calc((1.7 - 1.59) / 1.7 * 100%); background: var(--rose); border-radius: 99px; transform-origin: left; }
@media (max-width: 960px) { .paper__grid { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .bar { grid-template-columns: 86px 1fr 48px; gap: 8px; } }

/* Other publications ------------------------------------------------------ */
.pub-list { border-top: 1px solid var(--line); }
.pub { display: grid; grid-template-columns: minmax(80px, 0.18fr) 1fr; gap: 10px 32px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.pub__year { font-family: var(--serif); font-style: italic; color: var(--rose); font-size: var(--step-1); margin: 0; }
.pub__title { font-family: var(--serif); font-weight: 450; font-size: var(--step-1); line-height: 1.3; margin-bottom: 10px; max-width: 60ch; }
.pub__title a { text-decoration: none; }
.pub__title a:hover { text-decoration: underline; text-decoration-color: var(--rose); }
.pub__authors { font-size: 0.94rem; margin-bottom: 2px; color: var(--text-2); }
.pub__cite { font-size: 0.88rem; color: var(--text-3); }
.pub__sum { color: var(--text-2); font-size: 0.94rem; max-width: 70ch; }
.pub__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; font-size: 0.86rem; }
.pub__links a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
@media (max-width: 600px) { .pub { grid-template-columns: 1fr; } }

/* Projects ---------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); perspective: 1400px; }
.card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-1);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out), border-color 0.4s;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(244, 166, 198, 0.09), transparent 45%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card:focus-within { border-color: var(--rose); }
.card__vis { height: 120px; margin: -6px 0 22px; border-radius: 10px; background: var(--ink-0); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; transform: translateZ(24px); }
.card__vis svg { width: 100%; height: 100%; }
.card__vis path, .card__vis ellipse, .card__vis rect, .card__vis circle { fill: none; stroke: var(--lilac); stroke-width: 1.1; opacity: 0.75; }
.card__vis--oct path:nth-child(3n) { stroke: var(--rose); }
.card__vis circle { fill: var(--ink-0); }
.card__vis circle.seed { fill: var(--rose); stroke: var(--rose); }
.card__kicker { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); margin: 0 0 8px; }
.card__title { font-family: var(--serif); font-weight: 450; font-size: var(--step-2); line-height: 1.15; margin-bottom: 14px; transform: translateZ(16px); }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card__sum { color: var(--text-2); font-size: 0.96rem; }
.card .ticks { margin-bottom: 22px; }
.card__foot { margin-top: auto; display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 0.8rem; color: var(--text-3); }
.card__link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-2); text-decoration: none; overflow-wrap: anywhere; }
.card:hover .card__link { color: var(--rose); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* Skills ------------------------------------------------------------------ */
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skill { background: var(--ink-0); padding: 28px; }
.skill h3 { font-family: var(--serif); font-weight: 450; font-size: var(--step-1); margin-bottom: 16px; }
.skill ul { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.skill li { font-size: 0.84rem; padding: 0.3em 0.7em; border-radius: 6px; background: var(--ink-2); color: var(--text); }
.skill__ev { margin: 0; font-size: 0.8rem; color: var(--text-3); }
.skill__ev .k { display: inline; margin-right: 6px; }
@media (max-width: 960px) { .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .skill-grid { grid-template-columns: 1fr; } }

/* Contact ----------------------------------------------------------------- */
.contact__lede { font-family: var(--serif); font-size: var(--step-2); line-height: 1.35; max-width: 34ch; margin-bottom: 40px; }
.links { border-top: 1px solid var(--line); }
.link { position: relative; display: grid; grid-template-columns: 56px minmax(120px, 0.35fr) 1fr auto; align-items: center; gap: 18px; padding: 22px 4px; border-bottom: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.link::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--rose-soft), transparent 70%); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease-out); z-index: -1; }
.link:hover::before, .link:focus-visible::before { transform: scaleX(1); }
.link__glyph { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 0.8rem; font-weight: 600; color: var(--rose); letter-spacing: 0.02em; }
.link__label { font-family: var(--serif); font-size: var(--step-1); }
.link__handle { color: var(--text-3); font-size: 0.9rem; overflow-wrap: anywhere; }
.link .i { width: 1.2em; height: 1.2em; color: var(--text-3); transition: transform 0.5s var(--ease-out), color 0.3s; }
.link:hover .i { color: var(--rose); transform: translate(4px, -4px); }
@media (max-width: 600px) {
  .link { grid-template-columns: 48px 1fr auto; gap: 4px 14px; }
  .link__handle { grid-column: 2; grid-row: 2; }
  .link .i { grid-row: 1 / span 2; grid-column: 3; }
  .link__glyph { grid-row: 1 / span 2; }
}

/* Footer ------------------------------------------------------------------ */
.foot { margin-top: clamp(100px, 14vw, 180px); border-top: 1px solid var(--line); padding: 48px 0 40px; background: linear-gradient(180deg, var(--ink-0), var(--ink-1)); }
.foot__inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: end; }
.foot__name { font-family: var(--serif); font-size: var(--step-3); line-height: 1; margin: 0; }
.foot__name em { color: var(--rose); }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 0.9rem; }
.foot__links a { color: var(--text-2); text-decoration: none; }
.foot__links a:hover { color: var(--rose); }
.foot__copy { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; color: var(--text-3); padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .foot__inner { grid-template-columns: 1fr; } }

/* 404 --------------------------------------------------------------------- */
.nf { min-height: 100svh; display: grid; place-items: center; background: radial-gradient(60% 50% at 70% 30%, rgba(244, 166, 198, 0.1), transparent 70%), var(--ink-0); }
.nf__title { font-family: var(--serif); font-weight: 400; font-size: var(--step-4); line-height: 1.05; margin: 24px 0; }
.nf__title em { color: var(--rose); }
.nf__text { color: var(--text-2); max-width: 46ch; margin-bottom: 28px; }

/* Certificates ------------------------------------------------------------ */
.certs__intro { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px 48px; margin-bottom: 32px; }
.certs__intro p:first-child { color: var(--text-2); }
.certs__intro .fine { margin-top: 0; }
@media (max-width: 860px) { .certs__intro { grid-template-columns: 1fr; } }

.filters { position: sticky; top: var(--nav-h); z-index: 5; display: grid; grid-template-columns: minmax(220px, 320px) 1fr auto; gap: 14px 20px; align-items: center; padding: 14px 0; margin-bottom: 24px; background: linear-gradient(var(--ink-0) 75%, transparent); }
.search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink-1); color: var(--text-3); transition: border-color 0.3s; }
.search:focus-within { border-color: var(--rose); color: var(--rose); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.92rem; outline: none; }
.search input::placeholder { color: var(--text-3); }
.chips--filter { gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0.3em 0.85em; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text-2); font-size: 0.82rem; cursor: pointer; transition: all 0.35s var(--ease-out); }
.chips .chip span { background: none; padding: 0; border-radius: 0; font-size: 0.72rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip.is-on { background: var(--text); color: var(--ink-0); border-color: var(--text); }
.chips .chip.is-on span { color: rgba(21, 18, 26, 0.6); }
.filters__status { margin: 0; font-size: 0.8rem; color: var(--text-3); white-space: nowrap; }
@media (max-width: 960px) {
  .filters { grid-template-columns: 1fr auto; position: static; background: none; }
  .chips--filter { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .chips--filter::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.cert[hidden] { display: none; }
.cert__btn { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-1); text-align: left; cursor: zoom-in; overflow: hidden; transition: transform 0.55s var(--ease-out), border-color 0.35s, box-shadow 0.55s var(--ease-out); }
.cert__btn:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.8); }
.cert__img { display: grid; place-items: center; padding: 14px; background: var(--ink-2); aspect-ratio: 4 / 3 !important; }
.cert__img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.7); transition: transform 0.7s var(--ease-out); }
.cert__btn:hover .cert__img img { transform: scale(1.035); }
.cert__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; flex: 1; }
.cert__issuer { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); margin: 0; }
.cert__title { font-family: var(--serif); font-size: 1.06rem; line-height: 1.3; color: var(--text); }
.cert__meta { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; font-size: 0.76rem; color: var(--text-3); padding-top: 6px; }
.empty { padding: 40px 0; text-align: center; color: var(--text-3); }

/* Viewer dialog ----------------------------------------------------------- */
.viewer { width: min(1180px, 100% - 24px); max-height: calc(100svh - 24px); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--ink-1); color: var(--text); overflow: hidden; }
.viewer::backdrop { background: rgba(12, 9, 14, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.viewer__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr); max-height: calc(100svh - 26px); }
.viewer__img { display: grid; place-items: center; padding: clamp(12px, 3vw, 32px); background: var(--ink-2); overflow: auto; }
.viewer__img img { max-height: calc(100svh - 90px); width: auto; max-width: 100%; border-radius: 4px; box-shadow: 0 20px 40px -20px #000; }
.viewer__side { display: flex; flex-direction: column; gap: 14px; padding: 32px 28px 24px; overflow: auto; }
.viewer__side h3 { font-family: var(--serif); font-weight: 450; font-size: var(--step-2); line-height: 1.15; padding-right: 32px; }
.viewer__dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 4px 0 0; font-size: 0.88rem; }
.viewer__dl dt { color: var(--text-3); }
.viewer__dl dd { margin: 0; color: var(--text); }
.viewer__note { font-size: 0.86rem; color: var(--text-2); margin: 0; padding: 12px 14px; border-left: 2px solid var(--rose); background: var(--rose-soft); border-radius: 0 8px 8px 0; }
.viewer__note:empty { display: none; }
.viewer__actions { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.viewer__nav { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.viewer__close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--ink-1); cursor: pointer; }
.viewer__close:hover { border-color: var(--rose); color: var(--rose); }
.viewer[open] { animation: viewer-in 0.5s var(--ease-out); }
.viewer[open]::backdrop { animation: fade-in 0.4s ease; }
@keyframes viewer-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 860px) {
  .viewer__inner { grid-template-columns: 1fr; overflow: auto; }
  .viewer__img img { max-height: 58svh; }
  .viewer__side { overflow: visible; }
}

/* Motion ------------------------------------------------------------------
   Everything here is progressive: without JS (.no-js) or with reduced
   motion, content renders in its final state.
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  .js .hero__name .ch { opacity: 0; transform: translateY(0.5em) rotate(4deg); filter: blur(6px); }
  .js .is-loaded .hero__name .ch { opacity: 1; transform: none; filter: none; transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out), filter 0.9s var(--ease-out); transition-delay: calc(0.25s + var(--c) * 0.035s); }
  .js .hero__eyebrow, .js .hero__role, .js .hero__intro, .js .hero__cta, .js .hero__latest { opacity: 0; transform: translateY(16px); }
  .js .is-loaded .hero__eyebrow { opacity: 1; transform: none; transition: all 1s var(--ease-out) 0.1s; }
  .js .is-loaded .hero__role { opacity: 1; transform: none; transition: all 1s var(--ease-out) 0.85s; }
  .js .is-loaded .hero__intro { opacity: 1; transform: none; transition: all 1s var(--ease-out) 0.95s; }
  .js .is-loaded .hero__cta { opacity: 1; transform: none; transition: all 1s var(--ease-out) 1.08s; }
  .js .is-loaded .hero__latest { opacity: 1; transform: none; transition: all 1s var(--ease-out) 1.3s; }
  .js .hero__eyebrow .rule { transform: scaleX(0); transform-origin: left; }
  .js .is-loaded .hero__eyebrow .rule { transform: none; transition: transform 1.2s var(--ease-out) 0.3s; }

  /* Portrait: a scan line sweeps down and reveals the photo */
  .js .portrait picture { clip-path: inset(0 0 100% 0); }
  .js .is-loaded .portrait picture { clip-path: inset(0 0 0 0); transition: clip-path 1.6s var(--ease-io) 0.35s; }
  .js .is-loaded .portrait__scan { animation: scan 1.6s var(--ease-io) 0.35s both; }
  .js .tick, .js .portrait::before, .js .portrait__cap { opacity: 0; }
  .js .is-loaded .tick, .js .is-loaded .portrait::before, .js .is-loaded .portrait__cap { opacity: 1; transition: opacity 1s ease 1.7s; }
  @keyframes scan { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

  /* Scroll reveals */
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) var(--ease-out), transform calc(var(--dur) + 0.2s) var(--ease-out); transition-delay: calc(var(--d, 0) * 0.09s); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shead .shead__line { transform: scaleX(0); transition: transform 1.4s var(--ease-out) 0.2s; }
  .js .shead.is-in .shead__line { transform: scaleX(1); }

  /* Paper figures animate when the paper enters */
  .js .paper .bar__fill { transform: scaleX(0); transition: transform 1.4s var(--ease-out); }
  .js .paper.is-in .bar__fill { transform: scaleX(1); }
  .js .paper.is-in .bar--hi .bar__fill { transition-delay: 0.25s; }
  .js .paper .dot.on { transform: scale(0); transition: transform 0.6s var(--ease-out); transition-delay: calc(0.4s + var(--i) * 0.05s); }
  .js .paper.is-in .dot.on { transform: scale(1); }
  .js .paper .range__band { transform: scaleX(0); transition: transform 1.2s var(--ease-out) 0.6s; }
  .js .paper.is-in .range__band { transform: scaleX(1); }

  /* Project line-art draws itself */
  .js .card__vis path, .js .card__vis ellipse, .js .card__vis rect { stroke-dasharray: 420; stroke-dashoffset: 420; transition: stroke-dashoffset 2.2s var(--ease-out); transition-delay: calc(var(--i, 0) * 0.07s); }
  .js .card.is-in .card__vis path, .js .card.is-in .card__vis ellipse, .js .card.is-in .card__vis rect { stroke-dashoffset: 0; }
  .js .card__vis circle { transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform 0.6s var(--ease-out); transition-delay: calc(0.5s + var(--i, 0) * 0.06s); }
  .js .card.is-in .card__vis circle { transform: scale(1); }

  /* Certificate grid stagger after filtering */
  .cert.is-entering .cert__btn { animation: cert-in 0.6s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 0.03s); }
  @keyframes cert-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .card { transform: none !important; }
}

/* ==========================================================================
   Soft & cute layer — rose glow, sparkles, hearts, gentle shimmer.
   Loaded last; every motion here is disabled under reduced motion.
   ========================================================================== */
.heart { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: -0.12em; }
.star { width: 100%; height: 100%; fill: currentColor; }

/* Nav mark: the dot becomes a tiny heart */
.nav__mark { border-color: rgba(244, 166, 198, 0.4); background: linear-gradient(145deg, rgba(244, 166, 198, 0.12), transparent); }
.nav__mark i { width: 9px; height: 9px; right: 5px; bottom: 6px; background: none; color: var(--rose); display: grid; }
.nav__mark i .heart { width: 9px; height: 9px; vertical-align: 0; }
.nav__progress span { background: linear-gradient(90deg, var(--lilac), var(--rose), var(--rose-2)); }

/* Hero name: the italic words get a slow rose → lilac shimmer */
.hero__name .it .ch {
  background: linear-gradient(100deg, var(--text) 0%, var(--rose-2) 30%, var(--rose) 50%, var(--lilac) 70%, var(--text) 100%);
  background-size: 400% 100%;
  background-position: calc(var(--c) * -8%) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.02em;
}
.hero__eyebrow, .eyebrow { color: var(--rose); }

/* Portrait: arched frame, breathing glow, sparkles */
.hero__portrait { position: relative; }
.portrait, .portrait picture, .portrait img { border-radius: 999px 999px 22px 22px; }
.portrait::before { inset: -12px; border-radius: 999px 999px 28px 28px; border-color: rgba(244, 166, 198, 0.35); }
.portrait::after { border-radius: 999px 999px 22px 22px; background: linear-gradient(180deg, transparent 60%, rgba(43, 15, 29, 0.35)); }
.portrait img { box-shadow: 0 40px 90px -30px rgba(244, 166, 198, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.7); }
.portrait__scan { background: linear-gradient(90deg, transparent, var(--rose), transparent); box-shadow: 0 0 22px 3px var(--rose-glow); }
.portrait__glow {
  position: absolute; inset: 6% -10% 4% -10%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 166, 198, 0.38), rgba(196, 176, 242, 0.16) 55%, transparent 75%);
  filter: blur(18px); pointer-events: none;
}
.tick { display: none; }
.sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.sparkles i, .sparkles b { position: absolute; display: block; color: var(--rose-2); translate: -50% -50%; }
.sparkles i { width: var(--z); height: var(--z); filter: drop-shadow(0 0 6px var(--rose-glow)); }
.sparkles i:nth-child(even) { color: var(--lilac); }
.sparkles b { font-size: 14px; color: var(--rose); filter: drop-shadow(0 0 6px var(--rose-glow)); }
.portrait__cap span { color: var(--rose); }
.cap-heart { margin-left: 4px; font-size: 0.85em; }

/* Buttons: soft rose glow */
.btn--solid { box-shadow: 0 10px 28px -12px var(--rose-glow); }
.btn--solid:hover { box-shadow: 0 14px 34px -10px rgba(244, 166, 198, 0.6); }
.btn:hover { background: var(--rose-soft); }

/* Section titles: gradient emphasis */
.shead__title em, .foot__name em {
  background: linear-gradient(95deg, var(--rose-2), var(--rose) 45%, var(--lilac));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em;
}
.shead__num span { color: var(--rose); }
.shead__line { background: linear-gradient(90deg, var(--rose), rgba(196, 176, 242, 0.5) 30%, var(--line-2) 60%); }

/* Cards & panels: softer corners + rose hover glow */
:root { --radius: 20px; }
.card:hover, .cert__btn:hover { border-color: rgba(244, 166, 198, 0.35); box-shadow: 0 26px 50px -28px rgba(244, 166, 198, 0.35); }
.cert__btn { border-radius: 16px; }
.paper { background: radial-gradient(80% 60% at 100% 0%, rgba(196, 176, 242, 0.08), transparent 60%), linear-gradient(160deg, rgba(244, 166, 198, 0.08), transparent 45%), var(--ink-1); }
.bar--hi .bar__fill { background: linear-gradient(90deg, var(--lilac), var(--rose)); }
.dot.on { background: var(--rose); border-color: var(--rose); }
.range__mark { background: var(--lilac); }
.range__a { color: var(--lilac); }
.card__vis path, .card__vis ellipse, .card__vis rect, .card__vis circle { stroke: var(--lilac); }
.card__vis--oct path:nth-child(3n) { stroke: var(--rose); }
.chip.is-on { background: var(--rose); border-color: var(--rose); color: var(--rose-ink); }
.chips .chip.is-on span { color: rgba(43, 15, 29, 0.65); }
.interest::after { background: linear-gradient(90deg, var(--rose), var(--lilac)); }
.interest__n, .pub__year { color: var(--rose); }
.timeline li::before { border-color: var(--rose); }
.timeline li:last-child::before { background: var(--rose); }
.link__glyph { color: var(--rose); border-color: rgba(244, 166, 198, 0.3); background: var(--rose-soft); }
.foot__heart { color: var(--rose); display: inline-block; }

/* Cursor sparkle trail (created by main.js on fine pointers only) */
.trail { position: fixed; left: 0; top: 0; width: 10px; height: 10px; pointer-events: none; z-index: 60; color: var(--rose-2); opacity: 0; filter: drop-shadow(0 0 4px var(--rose-glow)); }
.trail svg { width: 100%; height: 100%; fill: currentColor; }

@media (prefers-reduced-motion: no-preference) {
  .hero__name .it .ch { animation: shimmer 9s ease-in-out infinite; animation-delay: calc(var(--c) * 0.06s); }
  @keyframes shimmer { 0%, 100% { background-position: calc(var(--c) * -8%) 0; } 50% { background-position: calc(100% + var(--c) * -8%) 0; } }
  .portrait__glow { animation: breathe 6s ease-in-out infinite; }
  @keyframes breathe { 0%, 100% { opacity: 0.75; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }
  .sparkles i { animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--dl); }
  @keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
  .sparkles b { animation: floaty 4.5s ease-in-out infinite; animation-delay: var(--dl); }
  @keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.6; } 50% { transform: translateY(-10px) rotate(8deg); opacity: 1; } }
  .nav__mark i { animation: beat 2.8s ease-in-out infinite; }
  .foot__heart, .cap-heart { animation: beat 2.8s ease-in-out infinite; }
  @keyframes beat { 0%, 60%, 100% { transform: scale(1); } 10% { transform: scale(1.25); } 20% { transform: scale(1); } 30% { transform: scale(1.18); } }
  .timeline li:last-child::before { animation: pulse 2.4s ease-out infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(244, 166, 198, 0.5); } 100% { box-shadow: 0 0 0 12px rgba(244, 166, 198, 0); } }
  .js .sparkles { opacity: 0; }
  .js .is-loaded .sparkles { opacity: 1; transition: opacity 1.2s ease 1.6s; }
  .btn--solid { background-image: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); background-size: 250% 100%; background-position: 150% 0; background-repeat: no-repeat; }
  .btn--solid:hover { background-position: -50% 0; transition: background-position 0.9s var(--ease-out), box-shadow 0.4s; }
}
@media (prefers-reduced-motion: reduce) { .trail { display: none; } }
@media (max-width: 860px) { .portrait__glow { inset: 4% -6% 2% -6%; } }
