/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #07090e;
  --bg-soft: #0c0f17;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eceef4;
  --text-muted: #969db0;
  --text-faint: #646b7d;
  --accent: #a9bbff;
  --accent-strong: #cdd7ff;
  --accent-soft: rgba(169, 187, 255, 0.1);
  --star: rgba(255, 255, 255, 0.9);
  --star-opacity: 0.42;
  --glow: rgba(110, 135, 255, 0.14);
  --header-bg: rgba(7, 9, 14, 0.72);
  --map-filter: grayscale(1) invert(0.92) contrast(0.88) brightness(0.92);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 16px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f6f2;
  --bg-soft: #efeee8;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-hover: #ffffff;
  --line: rgba(17, 20, 30, 0.09);
  --line-strong: rgba(17, 20, 30, 0.18);
  --text: #12151c;
  --text-muted: #545b6b;
  --text-faint: #8a909c;
  --accent: #3550c8;
  --accent-strong: #22389c;
  --accent-soft: rgba(53, 80, 200, 0.08);
  --star-opacity: 0;
  --glow: rgba(53, 80, 200, 0.07);
  --header-bg: rgba(247, 246, 242, 0.8);
  --map-filter: grayscale(0.5);

  color-scheme: light;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

/* Faint, tiled star field — the only "space" texture on the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--star-opacity);
  transition: opacity 0.4s var(--ease);
  background-image:
    radial-gradient(1px 1px at 24px 38px, var(--star), transparent),
    radial-gradient(1px 1px at 132px 214px, var(--star), transparent),
    radial-gradient(1.2px 1.2px at 268px 92px, var(--star), transparent),
    radial-gradient(1px 1px at 342px 296px, var(--star), transparent),
    radial-gradient(0.8px 0.8px at 196px 348px, var(--star), transparent),
    radial-gradient(0.8px 0.8px at 72px 270px, var(--star), transparent),
    radial-gradient(1px 1px at 300px 170px, var(--star), transparent),
    radial-gradient(0.8px 0.8px at 160px 120px, var(--star), transparent);
  background-size: 380px 380px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.25) 100%);
}

/* Soft glow behind the hero */
body::after {
  content: "";
  position: absolute;
  top: -20vh;
  left: 50%;
  z-index: -1;
  width: min(1200px, 140vw);
  height: 80vh;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, var(--glow), transparent 65%);
}

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

a {
  color: inherit;
}

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

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

.icon-sprite {
  display: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  display: block;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.label-count {
  margin-left: 6px;
  color: var(--accent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.text-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

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

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

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--text);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.is-active {
  color: var(--text);
  background: var(--surface-hover);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.theme-toggle .icon {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: center;
  gap: 64px;
  min-height: min(780px, calc(100svh - var(--header-h)));
  padding-block: 56px 96px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero-tagline {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--accent-strong);
}

.hero-lead {
  max-width: 54ch;
  margin: 28px 0 0;
  font-size: 17px;
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.hero-socials {
  display: inline-flex;
  gap: 8px;
  margin-left: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.hero-portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: 0;
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-portrait img {
  position: absolute;
  inset: 14%;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: orbit 48s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px 2px var(--accent-soft), 0 0 6px var(--accent);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  padding-block: clamp(72px, 10vw, 128px);
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--line);
}

.section-head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

.section-index {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.section-index::after {
  content: " /";
  color: var(--text-faint);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 44ch;
  margin: 0 0 48px;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

/* ==========================================================================
   About
   ========================================================================== */

.lab-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
  padding: 16px 20px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lab-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.lab-logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
}

.lab-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.lab-text {
  flex: 1;
  min-width: 0;
}

.lab-text .label {
  margin-bottom: 2px;
}

.lab-name {
  display: block;
  font-weight: 500;
  line-height: 1.4;
}

.lab-arrow {
  color: var(--text-muted);
  transition: transform 0.25s var(--ease), color 0.2s ease;
}

.lab-card:hover .lab-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.timeline-period {
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.timeline-title {
  display: block;
  font-weight: 500;
}

.timeline-org {
  display: block;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Research
   ========================================================================== */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 80px;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.focus-item {
  padding: 24px 24px 28px;
  background: var(--bg);
  transition: background-color 0.3s ease;
}

.focus-item:hover {
  background: var(--bg-soft);
}

.focus-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.focus-item h3 {
  margin: 40px 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.focus-item p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
}

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

.pub {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.pub-year {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.pub-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.pub-title a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.2s ease;
}

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

.pub-authors {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.pub-authors strong {
  font-weight: 600;
  color: var(--text);
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.pub-venue {
  margin-right: 4px;
  font-size: 14px;
  font-style: italic;
  color: var(--text);
}

.tag {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.tag-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.pub .icon-btn {
  width: 40px;
  height: 40px;
}

.pub:hover .icon-btn {
  color: var(--text);
  border-color: var(--line-strong);
}

.state-message {
  margin: 0;
  padding: 28px 0;
  color: var(--text-muted);
}

/* ==========================================================================
   Projects
   ========================================================================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.3s var(--ease);
}

a.project-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.project-media {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
}

.project-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.project-body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-orbit {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: orbit 14s linear infinite;
}

.empty-orbit::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--text-faint);
}

.empty-orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--accent);
}

.empty-text {
  flex: 1;
}

.empty-text h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.empty-text p {
  margin: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-lead {
  max-width: 22ch;
  margin: 0 0 48px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.contact-list {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.contact-row dt {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-row dd {
  margin: 0;
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.copy-btn .icon {
  width: 14px;
  height: 14px;
}

.copy-btn .icon-check,
.copy-btn.is-copied .icon-copy {
  display: none;
}

.copy-btn.is-copied .icon-check {
  display: block;
}

.copy-btn.is-copied {
  color: var(--accent-strong);
  border-color: var(--accent-soft);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.contact-links .icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.map-frame {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: var(--map-filter);
}

.ama-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent-soft), transparent 65%);
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.ama-card:hover {
  border-color: var(--line-strong);
}

.ama-card .label {
  margin-bottom: 6px;
}

.ama-title {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ama-text {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
}

.ama-card:hover .ama-arrow {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Talk page
   ========================================================================== */

.talk-page {
  padding-block: clamp(48px, 8vw, 96px) clamp(72px, 10vw, 128px);
}

.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
}

.back-link .icon {
  width: 15px;
  height: 15px;
  transform: rotate(-90deg);
}

.back-link:hover .icon {
  transform: rotate(-90deg) translate(2px, -2px);
}

.talk-title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.talk-lead {
  max-width: 56ch;
  margin: 20px 0 0;
  font-size: 17px;
  color: var(--text-muted);
}

.talk-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 48px 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  counter-reset: step;
}

.talk-steps li {
  padding: 20px 24px;
  background: var(--bg);
  font-size: 14.5px;
  color: var(--text-muted);
  counter-increment: step;
}

.talk-steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.talk-thread {
  min-height: 240px;
}

.talk-thread .utterances {
  max-width: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  font-size: 13.5px;
  color: var(--text-faint);
}

.footer-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 32px 48px;
}

.footer-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--line);
}

.footer-inner p {
  margin: 0;
}

.footer-quote {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.footer-quote q {
  quotes: "“" "”";
}

/* ==========================================================================
   Motion
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

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

  .orbit,
  .empty-orbit {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding-block: 40px 80px;
  }

  .hero-portrait {
    order: -1;
    justify-self: start;
    width: 200px;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-head {
    position: static;
  }

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

  .focus-item h3 {
    margin-top: 20px;
  }

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

@media (max-width: 640px) {
  .nav {
    gap: 12px;
  }

  .nav-brand-name {
    display: none;
  }

  .nav-links a {
    padding: 6px 9px;
    font-size: 13.5px;
  }

  .hero-portrait {
    width: 160px;
  }

  .kicker {
    border-radius: 12px;
    line-height: 1.5;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-socials {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .timeline li,
  .contact-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pub {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
  }

  .pub-year {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .empty-state,
  .ama-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }
}
