:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-rgb: 246, 247, 251;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --surface-soft: #eef2f7;
  --text: #101827;
  --muted: #536176;
  --border: #dbe2ec;
  --violet: #6347f5;
  --violet-rgb: 99, 71, 245;
  --violet-bright: #816cff;
  --cyan: #06717d;
  --cyan-rgb: 6, 113, 125;
  --cyan-bright: #11b8c5;
  --focus: #b76500;
  --header-bg: rgba(246, 247, 251, 0.86);
  --gradient: linear-gradient(125deg, var(--violet) 0%, var(--violet-bright) 43%, var(--cyan) 100%);
  --shadow-sm: 0 12px 34px rgba(20, 31, 54, 0.09);
  --shadow-lg: 0 28px 72px rgba(20, 31, 54, 0.15);
  --radius-lg: 30px;
  --radius-md: 18px;
  --container: min(1210px, calc(100% - 48px));
  --header-height: 76px;
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Newsreader", Iowan Old Style, Baskerville, Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090f1b;
  --bg-rgb: 9, 15, 27;
  --surface: #111a29;
  --surface-rgb: 17, 26, 41;
  --surface-soft: #142131;
  --text: #f2f5fa;
  --muted: #aab6c8;
  --border: #29384d;
  --violet: #aa8cff;
  --violet-rgb: 170, 140, 255;
  --violet-bright: #c2adff;
  --cyan: #55cbd2;
  --cyan-rgb: 85, 203, 210;
  --cyan-bright: #77e1e6;
  --focus: #f6ba52;
  --header-bg: rgba(9, 15, 27, 0.86);
  --shadow-sm: 0 14px 38px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 30px 78px rgba(0, 0, 0, 0.42);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-color: rgba(var(--violet-rgb), 0.5);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--violet);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

::selection {
  background: rgba(var(--violet-rgb), 0.22);
}

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

p,
h1,
h2,
h3,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

ul,
ol {
  padding: 0;
}

.container {
  position: relative;
  z-index: 3;
  width: var(--container);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 500;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Persistent research field */
.ambient-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: radial-gradient(rgba(var(--violet-rgb), 0.11) 0.7px, transparent 0.7px);
  background-size: 25px 25px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 86%);
}

.ambient-field svg {
  width: 100%;
  height: 100%;
}

.gradient-start {
  stop-color: var(--violet);
}

.gradient-end {
  stop-color: var(--cyan);
}

.ambient-scene {
  opacity: 0;
  transition: opacity 900ms var(--ease-out);
}

body[data-scene="top"] .scene-top,
body[data-scene="about"] .scene-about,
body[data-scene="work"] .scene-work,
body[data-scene="publications"] .scene-publications,
body[data-scene="service"] .scene-service,
body[data-scene="contact"] .scene-contact {
  opacity: 1;
}

.ambient-line,
.ambient-ring {
  fill: none;
  stroke: url(#ambient-gradient);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.ambient-line {
  opacity: 0.14;
}

.ambient-ring {
  opacity: 0.13;
  stroke-dasharray: 5 18;
  transform-box: fill-box;
  transform-origin: center;
}

.flow-line {
  opacity: 0.2;
  stroke-dasharray: 4 22;
  animation: data-flow 22s linear infinite;
}

.flow-two {
  animation-delay: -7s;
}

.flow-three {
  animation-delay: -14s;
}

.ring-one,
.service-ring-one,
.service-ring-three {
  animation: ring-turn 48s linear infinite;
}

.ring-two,
.service-ring-two {
  animation: ring-turn 38s linear infinite reverse;
}

.ambient-node,
.lattice-nodes circle,
.contact-nodes circle {
  fill: var(--surface);
  stroke: var(--violet);
  stroke-width: 2;
  opacity: 0.22;
  transform-box: fill-box;
  transform-origin: center;
}

.node-core,
.waypoint:nth-of-type(even),
.lattice-nodes circle:nth-child(3n),
.contact-nodes circle:nth-child(2n) {
  fill: var(--cyan);
  stroke: var(--cyan);
}

.node-small,
.lattice-nodes circle,
.contact-nodes circle {
  animation: node-float 9s ease-in-out infinite alternate;
}

.node-b,
.lattice-nodes circle:nth-child(2n),
.contact-nodes circle:nth-child(2n) {
  animation-delay: -4s;
}

.trajectory {
  stroke-width: 3;
  stroke-dasharray: 10 24;
  animation: data-flow 28s linear infinite;
}

.wave-line {
  opacity: 0.13;
  stroke-width: 3;
}

.wave-line-secondary {
  opacity: 0.09;
  stroke-width: 2;
}

.service-ring-one {
  opacity: 0.11;
}

.service-ring-two {
  opacity: 0.09;
}

.service-ring-three {
  opacity: 0.07;
}

@keyframes data-flow {
  to { stroke-dashoffset: -156; }
}

@keyframes ring-turn {
  to { transform: rotate(360deg); }
}

@keyframes node-float {
  to { transform: translate3d(0, -10px, 0); }
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled,
body.menu-open .site-header {
  border-color: var(--border);
  background: var(--header-bg);
  box-shadow: 0 8px 30px rgba(20, 31, 54, 0.055);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: grid;
  width: var(--container);
  min-height: var(--header-height);
  margin-inline: auto;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  place-items: center;
  background: var(--gradient);
  box-shadow: 0 10px 24px rgba(var(--violet-rgb), 0.24);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2vw, 27px);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gradient);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease-out);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.reading-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(var(--page-progress, 0));
  transform-origin: left;
  will-change: transform;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  place-items: center;
  background: rgba(var(--surface-rgb), 0.76);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle .sun-icon {
  display: none;
}

html:not(.js) .theme-toggle {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

.menu-toggle {
  display: none;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 3px 0;
  border-radius: 99px;
  background: currentColor;
  transition: transform 220ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Shared components */
.button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 15px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: var(--gradient);
  box-shadow: 0 12px 30px rgba(var(--violet-rgb), 0.22);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease;
}

.button:hover {
  box-shadow: 0 16px 38px rgba(var(--violet-rgb), 0.3);
  transform: translateY(-2px);
}

.button-small {
  min-height: 42px;
  padding-inline: 17px;
  font-size: 0.75rem;
}

.button-light {
  background: #fff;
  box-shadow: none;
  color: #291862;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.text-link svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms var(--ease-out);
}

.text-link:hover svg {
  transform: translate(2px, -2px);
}

.section {
  position: relative;
  z-index: 1;
  padding: clamp(90px, 9vw, 138px) 0;
}

.section::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.93), rgba(var(--bg-rgb), 0.72) 55%, rgba(var(--bg-rgb), 0.34));
}

.section-tint::before {
  background: linear-gradient(90deg, rgba(var(--surface-rgb), 0.86), rgba(var(--surface-rgb), 0.68) 58%, rgba(var(--surface-rgb), 0.42));
  border-block: 1px solid var(--border);
}

.stage {
  display: grid;
  min-height: 100svh;
  align-items: center;
}

.section-flow {
  padding-block: clamp(112px, 10vw, 160px);
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.4fr);
  gap: clamp(58px, 9vw, 125px);
  align-items: start;
}

.section-heading {
  max-width: 465px;
}

.section-heading-sticky {
  position: sticky;
  top: calc(var(--header-height) + 58px);
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 35px;
  height: 2px;
  background: var(--gradient);
}

.section-heading h2,
.contact-panel h2 {
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 5.8vw, 5.35rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

.section-heading > p:not(.section-kicker) {
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Hero */
.hero {
  padding: calc(var(--header-height) + 36px) 0 54px;
  overflow: clip;
}

.hero::before {
  background:
    radial-gradient(circle at 86% 25%, rgba(var(--violet-rgb), 0.13), transparent 28%),
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.98) 0%, rgba(var(--bg-rgb), 0.91) 44%, rgba(var(--bg-rgb), 0.34) 78%, rgba(var(--bg-rgb), 0.12));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: clamp(50px, 7.5vw, 100px);
  align-items: center;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3.55rem, 6.4vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.052em;
  line-height: 0.91;
}

.hero h1 span {
  display: block;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-intro {
  max-width: 670px;
}

.hero-lead {
  margin-bottom: 10px;
  font-size: clamp(1.18rem, 1.7vw, 1.46rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.43;
}

.hero-body {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.affiliations {
  display: grid;
  max-width: 690px;
  margin: 24px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  list-style: none;
}

.affiliations li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
}

.affiliations p {
  display: flex;
  margin: 0;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
}

.affiliations strong {
  color: var(--text);
}

.affiliations small {
  color: var(--muted);
  font-size: 0.75rem;
}

.affiliation-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
}

.affiliation-dot.violet {
  background: var(--violet);
  box-shadow: 0 0 0 5px rgba(var(--violet-rgb), 0.12);
}

.affiliation-dot.cyan {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(var(--cyan-rgb), 0.12);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.social-links {
  display: flex;
  margin: 24px 0 0;
  flex-wrap: wrap;
  gap: 6px 19px;
  list-style: none;
}

.social-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.social-links a:hover {
  color: var(--violet);
}

.portrait-stage {
  position: relative;
  width: min(100%, 385px);
  justify-self: end;
}

.portrait-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 7px solid rgba(var(--surface-rgb), 0.92);
  border-radius: 48% 48% 28px 28px / 30% 30% 24px 24px;
  background: linear-gradient(150deg, rgba(var(--violet-rgb), 0.28), rgba(var(--cyan-rgb), 0.22));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(var(--violet-rgb), 0.4);
}

.portrait-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.portrait-frame img.is-hidden {
  display: none;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--violet);
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.portrait-orbit {
  position: absolute;
  z-index: 1;
  top: 3%;
  left: -15%;
  width: 112%;
  aspect-ratio: 1;
  border: 2px solid rgba(var(--violet-rgb), 0.5);
  border-right-color: transparent;
  border-bottom-color: rgba(var(--cyan-rgb), 0.3);
  border-radius: 50%;
  animation: orbit-sway 10s ease-in-out infinite alternate;
  transform: rotate(-17deg);
}

.portrait-orbit::before,
.portrait-orbit::after {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--cyan);
  content: "";
}

.portrait-orbit::before {
  top: 11%;
  right: 13%;
}

.portrait-orbit::after {
  bottom: 14%;
  left: 5%;
  background: var(--violet);
}

@keyframes orbit-sway {
  to { transform: rotate(-9deg); }
}

.portrait-note {
  position: relative;
  z-index: 4;
  display: flex;
  width: fit-content;
  max-width: 90%;
  margin: -24px auto 0;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(var(--cyan-rgb), 0.15);
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  bottom: 15px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  width: 1px;
  height: 30px;
  overflow: hidden;
  background: var(--border);
}

.scroll-cue i::after {
  position: absolute;
  inset: 0;
  background: var(--violet);
  content: "";
  animation: scroll-line 2s ease-in-out infinite;
  transform: translateY(-100%);
}

@keyframes scroll-line {
  70%, 100% { transform: translateY(100%); }
}

/* About */
.about-content > p {
  max-width: 68ch;
}

.large-copy {
  margin-bottom: 23px;
  color: var(--text);
  font-size: clamp(1.17rem, 1.8vw, 1.42rem);
  font-weight: 600;
  line-height: 1.52;
}

.about-content > p:not(.large-copy) {
  color: var(--muted);
}

.focus-grid {
  display: grid;
  margin: 42px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  list-style: none;
}

.focus-item {
  position: relative;
  min-height: 158px;
  padding: 26px 22px 12px 0;
  border-right: 1px solid var(--border);
}

.focus-item + .focus-item {
  padding-left: 22px;
}

.focus-item:last-child {
  border-right: 0;
}

.focus-marker {
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--gradient);
}

.focus-item h3 {
  margin: 24px 0 8px;
  font-size: 0.98rem;
}

.focus-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.58;
}

/* Academic path */
.timeline {
  position: relative;
}

.timeline::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 134px;
  width: 1px;
  background: linear-gradient(var(--violet), var(--cyan), var(--border));
  content: "";
}

.timeline-entry {
  position: relative;
  display: grid;
  padding: 0 0 52px;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 56px;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry::before {
  position: absolute;
  top: 7px;
  left: 128px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--surface-soft);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 1px var(--violet);
  content: "";
}

.timeline-entry:nth-child(even)::before {
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
}

.current-label {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.12);
  color: var(--cyan);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-body h3 {
  margin-bottom: 6px;
  font-size: clamp(1.15rem, 1.7vw, 1.38rem);
  letter-spacing: -0.015em;
}

.timeline-org {
  margin-bottom: 8px;
  color: var(--violet);
  font-size: 0.86rem;
  font-weight: 700;
}

.timeline-body p:last-child {
  max-width: 66ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Publications */
.publication-more {
  margin-top: 18px;
  color: var(--violet);
}

.publication-list {
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.publication {
  display: grid;
  min-height: 142px;
  padding: 29px 8px 29px 0;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 34px;
  border-bottom: 1px solid var(--border);
  transition: padding 220ms var(--ease-out), background-color 220ms ease;
}

.publication:hover {
  padding-left: 14px;
  background: rgba(var(--violet-rgb), 0.045);
}

.publication-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.publication-meta span:first-child {
  color: var(--text);
  font-size: 0.71rem;
}

.publication-meta .status-accepted {
  color: var(--cyan);
}

.publication-meta .status-reviewed {
  color: var(--violet);
}

.publication-content {
  max-width: 790px;
}

.publication h3 {
  margin-bottom: 11px;
  font-size: clamp(1.1rem, 1.55vw, 1.36rem);
  letter-spacing: -0.018em;
  line-height: 1.42;
}

.publication h3 a {
  text-decoration: none;
}

.publication h3 a span {
  display: inline-block;
  color: var(--violet);
  transition: transform 180ms var(--ease-out);
}

.publication h3 a:hover span {
  transform: translate(2px, -2px);
}

.publication p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.58;
}

.publication .venue {
  color: var(--text);
  font-weight: 600;
}

.publication .venue a {
  color: var(--violet);
}

/* Reviewing */
.service-list {
  border-top: 1px solid var(--border);
}

.service-list article {
  display: grid;
  padding: 25px 0;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 30px;
  border-bottom: 1px solid var(--border);
}

.service-year {
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.service-details {
  display: grid;
  gap: 20px;
}

.service-role {
  display: grid;
  min-height: 38px;
  grid-template-columns: minmax(170px, 0.6fr) minmax(0, 1.4fr);
  gap: 22px;
  align-items: start;
}

.service-role h3 {
  margin: 4px 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.venue-pills {
  display: flex;
  margin: 0;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}

.venue-pills li {
  min-width: 55px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(var(--surface-rgb), 0.72);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

/* Contact */
.contact-section {
  padding-block: calc(var(--header-height) + 50px) 88px;
}

.contact-section::before {
  background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.9), rgba(var(--bg-rgb), 0.54), rgba(var(--bg-rgb), 0.22));
}

.contact-panel {
  display: grid;
  overflow: hidden;
  padding: clamp(38px, 6vw, 74px);
  border-radius: var(--radius-lg);
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: clamp(48px, 8vw, 100px);
  align-items: center;
  background: linear-gradient(130deg, #3d218f 0%, #6845ef 48%, #087f8c 115%);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.contact-panel::before,
.contact-panel::after {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.contact-panel::before {
  top: -190px;
  right: -110px;
  width: 410px;
  height: 410px;
}

.contact-panel::after {
  right: -80px;
  bottom: -210px;
  width: 470px;
  height: 470px;
  border-width: 72px;
  border-color: rgba(255, 255, 255, 0.06);
}

.contact-panel > * {
  position: relative;
  z-index: 2;
}

.contact-panel .section-kicker,
.contact-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-panel h2 {
  max-width: 650px;
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(3.4rem, 6vw, 5.8rem);
}

.contact-intro > p:not(.section-kicker) {
  max-width: 55ch;
  margin-bottom: 28px;
}

.contact-directory {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.contact-group {
  display: grid;
  padding: 14px 0;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  align-items: center;
}

.contact-group p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-group a {
  min-width: 0;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-profiles {
  display: flex;
  margin: 24px 0 0;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
}

.contact-profiles a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.71rem;
  font-weight: 700;
  text-decoration: none;
}

.contact-profiles a:hover {
  color: #fff;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 30px 0 38px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner,
.footer-inner div {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-inner {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* Motion: content is visible without JavaScript */
.reveal {
  opacity: 1;
  transform: none;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 620ms ease, transform 620ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .reveal.visible {
  opacity: 1;
  transform: none;
}

/* Snap only when sections fit comfortably and input is precise. */
@media (min-width: 981px) and (min-height: 760px) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html {
    scroll-snap-type: y proximity;
  }

  .stage {
    scroll-snap-align: center;
    scroll-snap-stop: normal;
  }

  .section-flow {
    scroll-snap-align: none;
  }
}

@media (max-width: 1100px) {
  .brand-name {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.72fr);
    gap: 52px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 7vw, 5.2rem);
  }

  .editorial-grid {
    gap: 65px;
  }
}

@media (max-width: 980px) {
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .section-heading {
    max-width: 720px;
  }

  .section-heading-sticky {
    position: static;
  }

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 42px;
  }
}

@media (max-width: 900px) {
  :root {
    --container: min(820px, calc(100% - 38px));
    --header-height: 70px;
  }

  .nav-cv {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: calc(var(--header-height) + 55px) 90px;
  }

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

  .portrait-stage {
    width: min(88%, 390px);
    margin: 22px auto 0;
    justify-self: center;
  }

  .scroll-cue {
    display: none;
  }

  .stage {
    min-height: auto;
  }

}

@media (max-width: 760px) {
  :root {
    --container: min(680px, calc(100% - 32px));
    --header-height: 68px;
  }

  body {
    font-size: 15.5px;
  }

  html:not(.js) .site-header {
    position: relative;
    border-color: var(--border);
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .nav-wrap {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .nav-actions {
    justify-self: end;
  }

  html:not(.js) .nav-actions {
    grid-row: 1;
    grid-column: 2;
  }

  .js .menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: fixed;
    z-index: 101;
    inset: var(--header-height) 0 auto;
    display: grid;
    padding: 18px max(16px, calc((100vw - 680px) / 2));
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    gap: 4px;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
  }

  html:not(.js) .site-nav {
    position: static;
    grid-row: 2;
    grid-column: 1 / -1;
    max-height: none;
    padding: 0 0 12px;
    border-bottom: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-shadow: none;
  }

  .js .site-nav {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms var(--ease-out), visibility 0s linear 180ms;
  }

  .js .site-nav.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
  }

  .site-nav a {
    min-height: 50px;
    padding: 5px 3px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav a::after {
    display: none;
  }

  .section {
    padding-block: 86px;
  }

  .section-flow {
    padding-block: 100px;
  }

  .section-heading h2,
  .contact-panel h2 {
    font-size: clamp(2.75rem, 6.5vw, 3.1rem);
  }

  .ambient-field svg {
    width: 130%;
    max-width: none;
    transform: translateX(-22%);
  }

  .ambient-grid {
    opacity: 0.28;
  }

  .ambient-field {
    opacity: 0.65;
  }

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

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

  .focus-item,
  .focus-item + .focus-item {
    min-height: 0;
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .focus-item:last-child {
    border-bottom: 0;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-entry {
    padding: 0 0 38px 34px;
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .timeline-entry::before {
    top: 4px;
    left: 1px;
  }

  .timeline-meta {
    flex-direction: row;
    align-items: center;
  }

  .publication {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 18px;
  }

  .publication:hover {
    padding-left: 0;
    background: transparent;
  }

  .service-role {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-group {
    grid-template-columns: 135px minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner div {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(3rem, 11.2vw, 3.4rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-actions .text-link {
    justify-content: center;
  }

  .social-links {
    gap-inline: 15px;
  }

  .portrait-stage {
    width: min(88%, 390px);
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .publication-meta {
    flex-direction: row;
    gap: 12px;
  }

  .service-list article {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .contact-panel {
    padding: 34px 24px;
    border-radius: 22px;
  }

  .contact-group {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contact-intro .button {
    width: 100%;
  }

  .footer-inner div > span {
    display: none;
  }
}

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

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

  .motion-ready .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  .ambient-field {
    opacity: 0.45;
  }

  .section::before {
    background: rgba(var(--bg-rgb), 0.97);
  }
}

@media (forced-colors: active) {
  .ambient-field,
  .portrait-orbit {
    display: none;
  }

  .hero h1 span {
    background: none;
    color: CanvasText;
  }

  .button,
  .icon-button,
  .portrait-frame,
  .venue-pills li {
    border: 1px solid CanvasText;
  }
}

@media print {
  .ambient-field,
  .site-header,
  .scroll-cue,
  .portrait-orbit {
    display: none !important;
  }

  .section,
  .stage,
  .section-flow {
    min-height: 0;
    padding: 34px 0;
    break-inside: avoid;
  }

  .section::before {
    display: none;
  }

  .motion-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
