@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------
   Tokens
--------------------------------------------------------------- */
:root {
  color-scheme: light;
  --font-display: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-cjk: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;

  --bg: #f0eee7;
  --bg-2: #e8e4d8;
  --bg-3: #dfdacd;
  --text: #17131f;
  --text-soft: #5c5369;
  --text-faint: #6f667e;
  --rule: rgba(23, 19, 31, 0.13);
  --rule-strong: rgba(23, 19, 31, 0.3);
  --accent: #5b3e9b;
  --accent-bright: #7c5cd6;
  --accent-wash: #ded3f5;
  --accent-deep: #3d2a6e;
  --warm: #8c2f39;
  --logo-color: #2a2140;
  --footer-bg: #17131f;
  --footer-text: #f0eee7;
  --selection-bg: #cbbaf0;
  --selection-text: #17131f;
  --cursor-ring: rgba(23, 19, 31, 0.42);
  --cursor-hover-bg: rgba(91, 62, 155, 0.08);
  --cursor-label-bg: #5b3e9b;
  --cursor-label-text: #f0eee7;
  --net-line: 91, 62, 155;
  --net-node: 124, 92, 214;
  --net-alpha: 0.26;
  --shadow: 0 36px 100px rgba(23, 19, 31, 0.16);
  --shadow-soft: 0 18px 50px rgba(23, 19, 31, 0.1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --gutter: clamp(20px, 4vw, 64px);
  --gap: clamp(14px, 1.6vw, 24px);
  --header-h: 76px;
}

[data-theme="night"] {
  color-scheme: dark;
  --bg: #0b0713;
  --bg-2: #120c1d;
  --bg-3: #1a1228;
  --text: #efe9f7;
  --text-soft: #b4a8c8;
  --text-faint: #807391;
  --rule: rgba(233, 213, 255, 0.15);
  --rule-strong: rgba(233, 213, 255, 0.34);
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-wash: #221636;
  --accent-deep: #4c357e;
  --warm: #c96a75;
  --logo-color: #c4b5fd;
  --footer-bg: #06040b;
  --footer-text: #efe9f7;
  --selection-bg: #5b3e9b;
  --selection-text: #ffffff;
  --cursor-ring: rgba(233, 213, 255, 0.5);
  --cursor-hover-bg: rgba(167, 139, 250, 0.12);
  --cursor-label-bg: #a78bfa;
  --cursor-label-text: #0b0713;
  --net-line: 167, 139, 250;
  --net-node: 233, 213, 255;
  --net-alpha: 0.34;
  --shadow: 0 36px 100px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

html.menu-open {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.55s var(--ease), color 0.55s var(--ease);
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

html {
  scrollbar-color: var(--accent) transparent;
  scrollbar-width: thin;
}

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

.cjk {
  font-family: var(--font-cjk);
  font-size: 0.9em;
  font-style: normal;
  letter-spacing: 0.08em;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.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-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* Paper grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

[data-theme="night"] .grain {
  mix-blend-mode: screen;
  opacity: 0.045;
}

/* ---------------------------------------------------------------
   Cursor
--------------------------------------------------------------- */
.cursor {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
}

html.has-cursor .cursor {
  display: block;
}

html.has-cursor,
html.has-cursor * {
  cursor: none;
}

html.has-cursor.menu-open,
html.has-cursor.menu-open * {
  cursor: auto;
}

html.menu-open .cursor {
  display: none;
}

.cursor__ring,
.cursor__core,
.cursor__label {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
  translate: -100px -100px;
}

.cursor__ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--cursor-ring);
  border-radius: 50%;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
    margin 0.35s var(--ease), background-color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.cursor__ring::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.cursor__core {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--accent);
  transition: opacity 0.2s, transform 0.2s;
}

[data-theme="night"] .cursor__core {
  box-shadow: 0 0 10px var(--accent);
}

.cursor__label {
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--cursor-label-bg);
  color: var(--cursor-label-text);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.75);
  transform-origin: 0 0;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.cursor.is-hover .cursor__ring {
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  background: var(--cursor-hover-bg);
  border-color: var(--accent);
}

.cursor.is-hover .cursor__core {
  opacity: 0;
}

.cursor.has-label .cursor__label {
  opacity: 1;
  transform: scale(1);
}

.cursor.is-down .cursor__ring {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  background: var(--cursor-hover-bg);
}

/* ---------------------------------------------------------------
   Header
--------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  border-bottom: 1px solid transparent;
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom-color: var(--rule);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1;
  white-space: nowrap;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: var(--text);
}

.brand__name {
  padding-top: 1px;
}

.brand__code {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  align-self: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--text-soft);
  transition: color 0.3s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.menu-toggle,
.menu-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.theme-toggle:hover,
.menu-toggle:hover,
.menu-dialog__close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle .icon {
  width: 14px;
  height: 14px;
}

[data-theme="day"] .icon--sun,
[data-theme="night"] .icon--moon {
  display: none;
}

.menu-toggle {
  display: none;
}

.menu-toggle svg {
  width: 16px;
  height: 11px;
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* Mobile menu dialog */
.menu-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--text);
}

.menu-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.menu-dialog[open] {
  display: flex;
  flex-direction: column;
}

.menu-dialog__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.brand--dialog {
  font-size: 1.1rem;
}

.menu-dialog__close span {
  font-size: 0.58rem;
}

.menu-dialog__close svg {
  width: 12px;
  height: 12px;
}

.menu-dialog__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 4vh var(--gutter);
}

.menu-dialog__nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  opacity: 0;
  transform: translateY(16px);
}

.menu-dialog[open] .menu-dialog__nav a {
  animation: menuIn 0.65s var(--ease) forwards;
}

.menu-dialog__nav a:nth-child(1) { animation-delay: 0.08s; }
.menu-dialog__nav a:nth-child(2) { animation-delay: 0.13s; }
.menu-dialog__nav a:nth-child(3) { animation-delay: 0.18s; }
.menu-dialog__nav a:nth-child(4) { animation-delay: 0.23s; }
.menu-dialog__nav a:nth-child(5) { animation-delay: 0.28s; }
.menu-dialog__nav a:nth-child(6) { animation-delay: 0.33s; }

.menu-dialog__nav a span {
  width: 30px;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--accent);
}

.menu-dialog__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px var(--gutter);
  border-top: 1px solid var(--rule);
}

.menu-dialog__mail {
  font-family: var(--font-body);
  font-size: 1rem;
  border-bottom: 1px solid var(--rule-strong);
}

@keyframes menuIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------
   Hero
--------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + 34px);
  padding-bottom: 30px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 82%, transparent);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 88%, transparent) 34%,
    transparent 66%
  );
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: calc(var(--header-h) + 48px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 72%, transparent) 55%,
    transparent 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--gap);
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 3;
  grid-column: 1 / 9;
  align-self: center;
  padding-top: 2vh;
}

.hero__context {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0;
  animation: heroFade 0.9s var(--ease) 0.15s forwards;
}

.hero__context::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
}

.hero__title {
  margin: 18px 0 0 -0.055em;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8.2vw, 7.2rem);
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  line-height: 0.82;
  letter-spacing: -0.055em;
  white-space: nowrap;
  color: var(--text);
}

.char-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.13em 0 0.08em;
  margin: -0.13em 0 -0.08em;
}

.char {
  display: inline-block;
  transform: translateY(0);
  animation: charIn 1s var(--ease) backwards;
  animation-delay: calc(0.22s + var(--i) * 0.038s);
  transition: transform 0.35s var(--ease);
  will-change: transform;
}

.hero__names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: var(--text-soft);
  opacity: 0;
  animation: heroFade 0.9s var(--ease) 0.7s forwards;
}

.hero__dot {
  color: var(--accent);
}

.hero__soft {
  color: var(--text-soft);
}

.hero__statement {
  max-width: 47ch;
  margin-top: 24px;
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  line-height: 1.65;
  color: var(--text-soft);
  opacity: 0;
  animation: heroFade 0.9s var(--ease) 0.82s forwards;
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  animation: heroFade 0.9s var(--ease) 0.94s forwards;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  animation: statusPulse 2.8s ease-out infinite;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 32px;
  margin-top: 32px;
  opacity: 0;
  animation: heroFade 0.9s var(--ease) 1.04s forwards;
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 1rem;
  color: var(--text);
  transition: color 0.3s, border-color 0.3s;
}

.link-cta svg {
  width: 18px;
  height: 12px;
  transition: transform 0.35s var(--ease);
}

.link-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.link-cta:hover svg {
  transform: translateX(4px);
}

.magnetic {
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s;
}

/* Hero visual */
.hero__visual {
  position: relative;
  z-index: 2;
  grid-column: 9 / 13;
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: 430px;
  opacity: 0;
  animation: portraitIn 1.15s var(--ease) 0.38s forwards;
}

.hero__logo {
  position: absolute;
  z-index: 0;
  top: -20%;
  left: -4%;
  width: clamp(200px, 22vw, 330px);
  aspect-ratio: 1;
  background: var(--logo-color);
  -webkit-mask: url("../img/logo-mask.png") center / contain no-repeat;
  mask: url("../img/logo-mask.png") center / contain no-repeat;
  opacity: 0.88;
  transform: rotate(-8deg);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.08));
  transition: background-color 0.5s var(--ease), filter 0.5s var(--ease);
}

[data-theme="night"] .hero__logo {
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 35%, transparent));
}

.portrait {
  position: relative;
  z-index: 2;
  margin: 0;
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 40%;
}

.portrait__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.portrait:hover .portrait__frame {
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.012);
  box-shadow: 0 50px 130px rgba(23, 19, 31, 0.24);
}

[data-theme="night"] .portrait:hover .portrait__frame {
  box-shadow: 0 50px 130px rgba(0, 0, 0, 0.7);
}

.portrait__frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.portrait__inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-3);
}

.portrait__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
}

.portrait__img--mono {
  filter: grayscale(1) contrast(1.08) brightness(0.84);
  transition: filter 0.6s var(--ease);
}

.portrait__img--color {
  opacity: 0;
  filter: saturate(1.45) contrast(1.04) brightness(1.05);
  -webkit-mask-image: radial-gradient(
    circle 190px at var(--mx) var(--my),
    #000 0%,
    rgba(0, 0, 0, 0.86) 45%,
    transparent 72%
  );
  mask-image: radial-gradient(
    circle 190px at var(--mx) var(--my),
    #000 0%,
    rgba(0, 0, 0, 0.86) 45%,
    transparent 72%
  );
  transition: opacity 0.35s var(--ease);
}

.portrait:hover .portrait__img--color {
  opacity: 1;
}

.portrait__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(11, 7, 19, 0.36), transparent 46%);
  pointer-events: none;
}

.portrait__orbit {
  position: absolute;
  z-index: -1;
  inset: -13%;
  width: 126%;
  height: 126%;
  overflow: visible;
  pointer-events: none;
}

.orbit {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: orbitDraw 2.4s var(--ease) 0.6s forwards;
}

.orbit--two {
  animation-delay: 0.82s;
  opacity: 0.62;
}

.orbit__dot {
  fill: var(--accent);
}

[data-theme="night"] .orbit__dot {
  filter: drop-shadow(0 0 6px var(--accent));
}

.portrait__caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.portrait__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warm);
}

.hero__foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(36px, 7vh, 80px);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.scroll-line {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 1px;
  overflow: hidden;
  background: var(--rule);
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 1px;
  background: var(--accent);
  animation: scrollLine 2.6s var(--ease-io) infinite;
}

.hero__coordinates {
  color: var(--text-faint);
}

@keyframes charIn {
  from { transform: translateY(115%); }
  to { transform: translateY(0); }
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes portraitIn {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes orbitDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes scrollLine {
  0% { transform: translateX(-12px); }
  55% { transform: translateX(38px); }
  100% { transform: translateX(38px); }
}

/* ---------------------------------------------------------------
   Ticker
--------------------------------------------------------------- */
.ticker {
  overflow: hidden;
  padding: 13px 0;
  border-block: 1px solid var(--rule);
  background: var(--bg-2);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 46s linear infinite;
}

.ticker:hover .ticker__track {
  animation-play-state: paused;
}

.ticker__group {
  display: flex;
  align-items: center;
  gap: 42px;
  padding-right: 42px;
}

.ticker__group span:not(.ticker__star) {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--text);
}

.ticker__star {
  font-size: 0.78rem;
  color: var(--accent);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* Theme swap */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

/* ---------------------------------------------------------------
   Sections
--------------------------------------------------------------- */
.section {
  padding: clamp(80px, 11vw, 150px) 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.about {
  border-top: 0;
}

.section__head {
  position: relative;
  display: grid;
  grid-template-columns: 8% 1fr auto;
  gap: var(--gap);
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: clamp(40px, 6vw, 70px);
}

.section__head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rule-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease);
}

.section__head.is-in::after {
  transform: scaleX(1);
}

.section__index {
  padding-bottom: 0.18em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--accent);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 96;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text);
}

.section__note {
  max-width: 27ch;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  text-align: right;
  color: var(--text-soft);
}

.section__head[data-reveal="head"] .section__index,
.section__head[data-reveal="head"] .section__title,
.section__head[data-reveal="head"] .section__note {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.section__head[data-reveal="head"] .section__title {
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease),
    clip-path 1.1s var(--ease);
}

.section__head[data-reveal="head"].is-in .section__index,
.section__head[data-reveal="head"].is-in .section__title,
.section__head[data-reveal="head"].is-in .section__note {
  opacity: 1;
  transform: none;
}

.section__head[data-reveal="head"].is-in .section__title {
  clip-path: inset(0);
}

/* ---------------------------------------------------------------
   About
--------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(40px, 5vw, 80px) var(--gap);
  align-items: center;
}

.about__media {
  position: relative;
  grid-column: 1 / 7;
}

.about__figure {
  position: relative;
}

.about__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  filter: saturate(0.86) contrast(1.02);
  transition: filter 0.8s var(--ease), transform 0.8s var(--ease);
}

.about__figure:hover img {
  filter: saturate(1) contrast(1.03);
  transform: scale(1.008);
}

.about__figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.about__seal {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: clamp(110px, 13vw, 170px);
  padding: 9px;
  background: #fbfaf6;
  border: 1px solid rgba(23, 19, 31, 0.08);
  box-shadow: var(--shadow-soft);
  transform: rotate(-4deg);
  transition: transform 0.6s var(--ease);
}

.about__seal:hover {
  transform: rotate(0deg);
}

.about__seal img {
  width: 100%;
  height: auto;
}

.about__copy {
  grid-column: 7 / 13;
}

.about__lede {
  max-width: 30ch;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.45;
  color: var(--text);
}

.about__copy > p:not(.about__lede) {
  max-width: 58ch;
  margin-top: 18px;
  color: var(--text-soft);
}

.pullquote {
  margin: clamp(30px, 4vw, 50px) 0;
  padding-left: 24px;
  border-left: 2px solid var(--accent);
}

.pullquote p {
  max-width: 27ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
}

.toolkit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.toolkit p {
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-soft);
}

/* ---------------------------------------------------------------
   Research
--------------------------------------------------------------- */
.research__intro {
  max-width: 65ch;
  margin-left: 8.333%;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-soft);
}

.research__list {
  margin-top: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}

.research__item {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr 90px;
  gap: var(--gap);
  align-items: baseline;
  width: 100%;
  padding: clamp(20px, 2.4vw, 30px) 12px;
  border: 0;
  border-top: 1px solid var(--rule);
  background: transparent;
  color: inherit;
  text-align: left;
  overflow: hidden;
  transition: background-color 0.35s var(--ease);
}

.research__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    520px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 66%
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.research__item:hover::before,
.research__item:focus-visible::before,
.research__item.is-active::before {
  opacity: 1;
}

.research__term {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  transition: transform 0.45s var(--ease), color 0.3s;
}

.research__desc {
  position: relative;
  z-index: 1;
  max-width: 42ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.research__count {
  position: relative;
  z-index: 1;
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.3s;
}

.research__item:hover .research__term,
.research__item:focus-visible .research__term {
  transform: translateX(8px);
  color: var(--accent);
}

.research__item:hover .research__count,
.research__item.is-active .research__count {
  color: var(--accent);
}

.research__item.is-active {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.research__item.is-active .research__term {
  color: var(--accent);
}

.research__hint {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* ---------------------------------------------------------------
   Publications
--------------------------------------------------------------- */
.pub__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.filter {
  position: relative;
  padding: 0 0 4px;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.3s;
}

.filter sup {
  margin-left: 2px;
  font-size: 0.72em;
}

.filter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.filter:hover {
  color: var(--text);
}

.filter.is-active {
  color: var(--text);
}

.filter.is-active::after {
  transform: scaleX(1);
}

.filter--topic {
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-transform: none;
  font-size: 0.58rem;
}

.filter--topic::after {
  display: none;
}

.pub__count {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
}

.pub__groups {
  margin-top: 30px;
}

.pub-group + .pub-group {
  margin-top: clamp(40px, 5vw, 60px);
}

.pub-group[hidden] {
  display: none;
}

.pub-group__title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.pub-group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub {
  display: grid;
  grid-template-columns: 110px 1fr 64px;
  gap: var(--gap);
  padding: clamp(22px, 2.6vw, 32px) 0;
  border-top: 1px solid var(--rule);
  transition: background-color 0.35s var(--ease);
}

.pub[hidden] {
  display: none;
}

.pub:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.pub__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 4px;
}

.pub__year {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
}

.pub__badge {
  padding: 3px 5px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.pub__authors {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.pub__title {
  max-width: 60ch;
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.75vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}

.pub__title a {
  color: inherit;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease), color 0.3s;
}

.pub__title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.pub__venue {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.pub__summary {
  max-width: 65ch;
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.pub__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pub__topics span + span {
  padding-left: 8px;
  border-left: 1px solid var(--rule);
}

.pub__doi {
  justify-self: end;
  align-self: start;
  padding: 7px 9px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.pub__doi:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.pub__doi--muted {
  opacity: 0.45;
  border-color: var(--rule);
}

.pub__empty {
  margin-top: 40px;
  font-style: italic;
  color: var(--text-soft);
}

/* ---------------------------------------------------------------
   Experience
--------------------------------------------------------------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 170px 28px 1fr;
  grid-template-areas: "date marker body";
}

.timeline__date {
  grid-area: date;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.timeline__marker {
  position: relative;
  grid-area: marker;
  display: flex;
  justify-content: center;
}

.timeline__marker::before {
  content: "";
  position: absolute;
  top: 7px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.timeline__marker::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -6px;
  width: 1px;
  background: var(--rule);
}

.timeline__item:last-child .timeline__marker::after {
  display: none;
}

.timeline__item:hover .timeline__marker::before {
  transform: scale(1.25);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
}

.timeline__body {
  grid-area: body;
  padding-bottom: clamp(36px, 4vw, 54px);
  border-bottom: 1px solid var(--rule);
}

.timeline__item:last-child .timeline__body {
  border-bottom: 0;
}

.timeline__role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.timeline__org {
  margin-top: 5px;
  font-size: 0.95rem;
  color: var(--text);
}

.timeline__note {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.timeline__points {
  margin-top: 12px;
  list-style: none;
}

.timeline__points li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.timeline__points li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 1px;
  background: var(--accent);
}

.timeline__points li + li {
  margin-top: 5px;
}

/* ---------------------------------------------------------------
   Education
--------------------------------------------------------------- */
.edu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
}

.edu {
  position: relative;
  padding-top: 18px;
  border-top: 2px solid var(--text);
}

.edu::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease);
}

.edu.is-in::before {
  transform: scaleX(1);
}

.edu__date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.edu__school {
  max-width: 12ch;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.edu__degree {
  margin-top: 8px;
  font-size: 1.05rem;
}

.edu__detail {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.edu__course {
  max-width: 52ch;
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.honors {
  margin-top: clamp(50px, 7vw, 90px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.honors__title {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text-soft);
}

.honors__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(30px, 5vw, 70px);
  margin-top: 20px;
  list-style: none;
}

.honors__list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.honor__year {
  padding-top: 0.25em;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--accent);
}

/* ---------------------------------------------------------------
   Contact
--------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: start;
}

.contact__copy {
  grid-column: 1 / 7;
}

.contact__email {
  grid-column: 7 / 13;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact__lede {
  max-width: 48ch;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.5;
}

.contact__copy p + p {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.email-link {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color 0.3s, border-color 0.3s;
}

.email-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-button {
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s,
    transform 0.3s var(--ease);
}

.copy-button:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.copy-feedback {
  min-height: 1em;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
}

.contact__links {
  margin-top: clamp(50px, 7vw, 90px);
  list-style: none;
  border-top: 1px solid var(--rule);
}

.contact__links li {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: var(--gap);
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 0.35s var(--ease);
}

.contact__links li:hover {
  padding-left: 10px;
}

.contact__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact__links a {
  justify-self: start;
  font-size: 1rem;
  color: var(--text);
  transition: color 0.3s;
}

.contact__links a:hover {
  color: var(--accent);
}

.external {
  width: 12px;
  height: 12px;
  justify-self: end;
  color: var(--text-faint);
  transition: color 0.3s, transform 0.3s var(--ease);
}

.contact__links li:hover .external {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
  padding: clamp(50px, 7vw, 80px) 0 26px;
  background: var(--footer-bg);
  color: var(--footer-text);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 6fr 3fr;
  gap: var(--gap);
  align-items: start;
}

.footer__seal {
  width: clamp(100px, 12vw, 150px);
  padding: 8px;
  background: #fbfaf6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  transform: rotate(-4deg);
  transition: transform 0.6s var(--ease);
}

.footer__seal:hover {
  transform: rotate(0deg);
}

.footer__seal img {
  width: 100%;
  height: auto;
}

.footer__identity {
  padding-top: 6px;
}

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.footer__name {
  margin-top: 12px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  opacity: 0.85;
}

.footer__name span {
  opacity: 0.7;
}

.footer__line {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.footer__meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 70px);
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.footer__top-link {
  transition: opacity 0.3s;
}

.footer__top-link:hover {
  opacity: 1;
  color: var(--accent-bright);
}

/* ---------------------------------------------------------------
   Reveal utilities
--------------------------------------------------------------- */
[data-reveal="fade"] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal="fade"].is-in {
  opacity: 1;
  transform: none;
}

[data-reveal="clip"] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal="clip"].is-in {
  clip-path: inset(0);
}

[data-reveal="row"] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal="row"].is-in {
  opacity: 1;
  transform: none;
}

.pub:nth-child(2) { --delay: 60ms; }
.timeline__item:nth-child(2) { --delay: 60ms; }
.timeline__item:nth-child(3) { --delay: 120ms; }
.timeline__item:nth-child(4) { --delay: 180ms; }
.timeline__item:nth-child(5) { --delay: 240ms; }
.timeline__item:nth-child(6) { --delay: 300ms; }

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero__visual {
    max-width: 380px;
  }

  .hero__logo {
    top: -18%;
    left: -10%;
    width: clamp(200px, 20vw, 300px);
  }

  .about__grid {
    gap: 50px var(--gap);
  }
}

@media (max-width: 980px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 70px);
    padding-bottom: 50px;
  }

  .hero::before {
    background: linear-gradient(
      to bottom,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 86%, transparent) 45%,
      transparent 76%
    );
  }

  .hero__copy {
    grid-column: 1 / -1;
  }

  .hero__title {
    font-size: clamp(3.4rem, 11.6vw, 7rem);
  }

  .hero__visual {
    grid-column: 1 / -1;
    justify-self: start;
    width: min(78vw, 470px);
    max-width: none;
    margin-top: clamp(54px, 8vw, 80px);
  }

  .hero__logo {
    top: -9%;
    left: auto;
    right: -18%;
    width: clamp(220px, 32vw, 360px);
  }

  .hero__foot {
    margin-top: 60px;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__media,
  .about__copy {
    grid-column: 1 / -1;
  }

  .about__copy {
    margin-top: 20px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__copy,
  .contact__email {
    grid-column: 1 / -1;
  }

  .contact__email {
    margin-top: 40px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__meta {
    grid-column: 1 / -1;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    text-align: left;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
    --gutter: 18px;
  }

  .brand__code {
    display: none;
  }

  .header__tools {
    gap: 7px;
  }

  .theme-toggle,
  .menu-toggle,
  .menu-dialog__close {
    padding: 7px 9px;
    font-size: 0.54rem;
  }

  .hero {
    padding-top: calc(var(--header-h) + 54px);
  }

  .hero__title {
    font-size: 11.6vw;
    letter-spacing: -0.065em;
  }

  .hero__context {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }

  .hero__names {
    margin-top: 18px;
    font-size: 1rem;
  }

  .hero__statement {
    font-size: 0.98rem;
  }

  .hero__status {
    align-items: flex-start;
    font-size: 0.55rem;
  }

  .status-dot {
    margin-top: 0.45em;
  }

  .hero__actions {
    gap: 16px 22px;
  }

  .hero__visual {
    width: min(86vw, 430px);
    margin-top: 48px;
  }

  .hero__logo {
    top: -6%;
    right: 2%;
    left: auto;
    width: 38vw;
  }

  .hero__foot {
    margin-top: 46px;
  }

  .hero__coordinates {
    display: none;
  }

  .ticker {
    padding: 11px 0;
  }

  .ticker__group {
    gap: 30px;
    padding-right: 30px;
  }

  .ticker__group span:not(.ticker__star) {
    font-size: 1.15rem;
  }

  .section__head {
    grid-template-columns: auto 1fr;
    padding-bottom: 20px;
    margin-bottom: 36px;
  }

  .section__index {
    font-size: 0.95rem;
  }

  .section__title {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
  }

  .section__note {
    grid-column: 1 / -1;
    margin-top: 12px;
    text-align: left;
    font-size: 0.92rem;
  }

  .research__intro {
    margin-left: 0;
    font-size: 1rem;
  }

  .research__item {
    grid-template-columns: 1fr auto;
    gap: 8px var(--gap);
    padding: 18px 8px;
  }

  .research__term {
    font-size: 1.4rem;
  }

  .research__desc {
    grid-column: 1 / -1;
    font-size: 0.88rem;
  }

  .research__count {
    font-size: 0.52rem;
  }

  .pub__filters {
    gap: 12px;
  }

  .filter {
    font-size: 0.56rem;
  }

  .filter--topic {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .pub {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 0;
  }

  .pub__meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 0;
  }

  .pub__title {
    font-size: 1.3rem;
  }

  .pub__doi {
    justify-self: start;
  }

  .timeline__item {
    grid-template-columns: 24px 1fr;
    grid-template-areas: "marker date" "marker body";
  }

  .timeline__date {
    padding-top: 0;
    font-size: 0.55rem;
  }

  .timeline__marker::before {
    top: 4px;
    width: 8px;
    height: 8px;
  }

  .timeline__marker::after {
    top: 16px;
    bottom: -6px;
  }

  .timeline__body {
    padding-top: 8px;
    padding-bottom: 32px;
  }

  .timeline__role {
    font-size: 1.3rem;
  }

  .timeline__note {
    font-size: 0.5rem;
    line-height: 1.5;
  }

  .edu__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .edu__school {
    max-width: none;
    font-size: 2rem;
  }

  .honors__list {
    grid-template-columns: 1fr;
  }

  .contact__links li {
    grid-template-columns: 84px 1fr auto;
    padding: 14px 0;
  }

  .email-link {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    word-break: break-word;
  }

  .contact__links a {
    font-size: 0.92rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__seal {
    width: 88px;
  }

  .footer__identity {
    margin-top: 20px;
  }

  .footer__meta {
    margin-top: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .about__seal {
    right: -8px;
    bottom: -28px;
    width: 104px;
  }

  .about__lede {
    font-size: 1.3rem;
  }

  .toolkit {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 430px) {
  .theme-toggle__text {
    display: none;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .menu-toggle {
    padding: 7px 9px;
  }

  .menu-toggle span {
    display: none;
  }

  .menu-dialog__nav a {
    font-size: 2rem;
  }

  .menu-dialog__foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Touch / reduced motion: show the full-colour portrait and no cursor */
@media (hover: none) {
  .portrait__img--color {
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .portrait__img--mono {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .hero__title .char {
    animation: none !important;
    transform: none !important;
  }

  .hero__context,
  .hero__names,
  .hero__statement,
  .hero__status,
  .hero__actions,
  .hero__visual {
    opacity: 1 !important;
    animation: none !important;
  }

  .portrait__img--color {
    opacity: 1 !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  .portrait__img--mono {
    opacity: 0 !important;
  }

  .cursor {
    display: none !important;
  }

  .ticker__track {
    animation: none !important;
  }

  .ticker {
    overflow-x: auto;
  }

  .orbit {
    stroke-dashoffset: 0;
  }

  .section__head::after,
  .edu::before {
    transform: none !important;
  }
}

/* ---------------------------------------------------------------
   404
--------------------------------------------------------------- */
.error-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 90px) 0 110px;
}

.error-main::before {
  content: "404";
  position: absolute;
  top: 50%;
  right: -2%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(12rem, 32vw, 30rem);
  line-height: 0.7;
  letter-spacing: -0.08em;
  color: var(--text);
  opacity: 0.045;
  pointer-events: none;
}

.error-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.error-kicker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.error-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.error-copy {
  max-width: 48ch;
  margin-top: 26px;
  color: var(--text-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 34px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 70px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.error-links a {
  transition: color 0.3s;
}

.error-links a:hover {
  color: var(--accent);
}

.error-footer {
  padding: 24px 0;
}

.error-footer .footer__bottom {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 720px) {
  .error-main {
    padding-top: calc(var(--header-h) + 60px);
    padding-bottom: 70px;
  }

  .error-main::before {
    right: -6%;
    font-size: 46vw;
  }

  .error-links {
    margin-top: 46px;
  }
}

/* ---------------------------------------------------------------
   Print
--------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .ticker,
  .hero__canvas,
  .hero__grid,
  .hero::before,
  .hero__visual,
  .hero__foot,
  .cursor,
  .grain,
  .menu-dialog,
  .about__seal,
  .footer__seal,
  .copy-button,
  .copy-feedback,
  .pub__filters,
  .pub__count,
  .research__hint,
  .skip-link {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 20px 0;
  }

  .section {
    padding: 26px 0;
    break-inside: avoid;
  }

  .pullquote p,
  .email-link {
    color: #000;
  }

  a {
    text-decoration: underline;
  }
}
