:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #2a2a2a;
  --muted: #6b6b6b;
  --rule: #e8e8e6;
  --hover-bg: #f2f2f0;
  --max: 720px;
}

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

html, body, h1, h2, h3, p, ul, ol, dl, dt, dd, figure {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss03", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #1a1a1a;
  color: #ffffff;
}

/* ---------- Site header (nav across all pages) ---------- */

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.75rem 1rem;
}

.masthead {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.lava-header {
  position: relative;
  width: 100%;
  line-height: 1;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 1.75rem;
  isolation: isolate;
}

.lava-header__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
}

.lava-header__title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 0.05em 0 0;
  display: inline-block;
  font-family: "Geist", system-ui, sans-serif;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #111111;
  text-align: left;
  pointer-events: none;
}

.masthead a {
  color: var(--ink);
  text-decoration: none;
}

.masthead a:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-header__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-header__nav .icons {
  margin-left: auto;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 120ms ease;
}

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

/* ---------- Main + content ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.75rem 7rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.22);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 120ms ease;
}

a:hover { text-decoration-color: var(--ink); }
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 1px;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

h1 {
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.page-title {
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

section + section { margin-top: 3.5rem; }

/* ---------- Hero (home) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.25rem;
  align-items: start;
  margin-bottom: 4.5rem;
}

.hero__tagline {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 38ch;
  margin-bottom: 1.5rem;
}

.hero__photo {
  width: 130px;
  height: 162px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

.about__photo {
  width: 220px;
  height: 274px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  margin-bottom: 2rem;
  float: right;
  margin-left: 2rem;
  margin-top: 0.4rem;
}

.about__body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.about__body p { margin-bottom: 1.1rem; max-width: 42ch; }

.about__body + section { margin-top: 3.5rem; clear: both; }

/* ---------- Icon row ---------- */

.icons {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  align-items: center;
  padding: 0;
}

.icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 120ms ease, background 120ms ease;
}

.icons a:hover {
  color: var(--ink);
  background: var(--hover-bg);
}

.icons svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ---------- Entries grid (news / papers / talks) ---------- */

.entries {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  column-gap: 1.5rem;
  row-gap: 1rem;
}

.entry { display: contents; }

dt {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.32rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

dd {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

dd em { font-style: italic; color: var(--ink); }

.lede {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.site-footer {
  max-width: var(--max);
  margin: 3rem auto 0;
  padding: 1.5rem 1.75rem 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer time {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Easter egg trigger ---------- */

.easter-egg-trigger {
  display: block;
  margin: 4rem auto 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  opacity: 0.25;
  transition: opacity 260ms ease, color 200ms ease;
}

.easter-egg-trigger:hover,
.easter-egg-trigger:focus-visible {
  opacity: 0.7;
  color: var(--ink);
  outline: none;
}

.easter-egg-trigger[aria-pressed="true"] {
  opacity: 1;
  color: var(--ink);
}

/* ---------- DVD embed (overlay on bio page) ---------- */

#dvd-host {
  position: fixed;
  inset: 0;
  z-index: 50;
}

#dvd-host:empty {
  pointer-events: none;
}

#dvd-host canvas {
  display: block;
}

.easter-egg-trigger {
  position: relative;
  z-index: 60;
}



/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .site-header {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  main {
    padding: 0 1.25rem 4rem;
  }

  h1 { font-size: 1.85rem; }

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

  .hero__photo,
  .about__photo {
    display: none;
  }

  .entries {
    grid-template-columns: 1fr;
    row-gap: 0.3rem;
  }

  .entry { display: block; margin-bottom: 1.5rem; }

  dt { padding-top: 0; margin-bottom: 0.15rem; }
}
