:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #000000;
  --muted: #595959;
  --line: rgba(0, 0, 0, 0.14);
  --surface: #f6f6f6;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 160ms ease, color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

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

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}

p {
  margin: 0;
}

/* Landing layout — static monochrome nav */
.landing--mono {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  color: #000000;
}

.nav3d {
  display: flex;
  flex-direction: column;
  padding-left: clamp(28px, 7vw, 96px);
  gap: clamp(2px, 1vw, 10px);
}

.word {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.94;
  font-size: clamp(3rem, 12.5vw, 8.6rem);
  width: fit-content;
}

.word .ord {
  font-size: 0.145em;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  opacity: 0.34;
  transform: translateY(-0.15em);
}

/* Sub-page shell */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.page-header .back {
  font-size: 14px;
  color: var(--muted);
  border-bottom: none;
  font-weight: 500;
}

.page-header .back:hover {
  color: var(--ink);
}

.page-header .crumb {
  font-size: 14px;
  color: var(--muted);
  font-variant: small-caps;
  letter-spacing: 0.08em;
}

.page h1 {
  margin-bottom: 16px;
}

.page-lede {
  color: var(--muted);
  font-size: 19px;
  max-width: 58ch;
  margin-bottom: 32px;
}

.placeholder-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.placeholder-card strong {
  color: var(--ink);
}

/* CV-style sections (Works) */
.cv {
  max-width: 920px;
  margin: 0 auto;
  padding: 96px 24px 140px;
}

/* Publications list */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
}

.pub-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.pub-meta .year {
  font-variant: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

.pub-chip {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.pub-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.pub-venue {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.pub-list a {
  border-bottom: none;
  color: var(--muted);
  font-size: 12px;
  font-variant: small-caps;
  letter-spacing: 0.1em;
}

.pub-list a:hover {
  color: var(--ink);
}

/* Filter strip (Works) */
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-strip a {
  border-bottom: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.filter-strip a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.filter-strip a.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

@media (max-width: 680px) {
  .page {
    padding: 24px 20px 64px;
  }

  .word {
    gap: 12px;
  }

  .nav3d {
    padding-left: 22px;
    gap: 4px;
  }

  .cv {
    padding: 64px 20px 96px;
  }

  .pub-list {
    grid-template-columns: 1fr;
  }
}

/* About split-panel layout */
body.about-page {
  overflow: hidden;
}

.about-split {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.about-left {
  position: relative;
  width: 50%;
  background: #0c0c10;
  overflow: hidden;
  flex-shrink: 0;
}

.about-left canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.about-back {
  position: absolute;
  top: 24px;
  left: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  border-bottom: none;
  z-index: 3;
  letter-spacing: 0.01em;
  transition: color 160ms ease;
}

.about-back:hover {
  color: rgba(255, 255, 255, 0.82);
}

.about-drag-hint {
  position: absolute;
  bottom: 24px;
  left: 28px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.28);
  font-style: italic;
  pointer-events: none;
  z-index: 3;
}

.about-right {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 56px 52px;
  overflow-y: auto;
  background: var(--bg);
}

.about-bio {
  max-width: 480px;
  width: 100%;
}

.about-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.about-name {
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 28px;
}

.about-body p {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.75;
  color: var(--ink);
  opacity: 0.85;
}

.about-body p + p {
  margin-top: 18px;
}

/* Tablet */
@media (max-width: 900px) {
  body.about-page {
    overflow-y: auto;
  }

  .about-split {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .about-left {
    width: 100%;
    height: 50vh;
    min-height: 280px;
  }

  .about-right {
    flex: none;
    align-items: flex-start;
    padding: 44px 48px 60px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .about-left {
    height: 44vh;
    min-height: 240px;
  }

  .about-drag-hint {
    bottom: 16px;
    left: 20px;
  }

  .about-right {
    padding: 36px 24px 56px;
  }

  .about-body p {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
