:root {
  --bg: #f7f6f2;
  --text: #151515;
  --muted: #76736d;
  --line: #d8d4cc;
  --max: 1120px;
  --pad: clamp(1rem, 2.4vw, 2rem);
  --header-h: 58px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    system-ui,
    -apple-system,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.page {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 var(--pad);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header-h);
  background: var(--bg);
}

.site-header-inner {
  width: min(100%, var(--max));
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
}

.name {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.intro {
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) 0 5rem;
  max-width: 980px;
}

.intro h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.intro-copy {
  margin: 2.6rem 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.52;
}

.selected {
  padding: 5rem 0 5.5rem;
}

.section-label {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-list {
  border-top: 1px solid var(--line);
}

.work {
  padding: 1.2rem 0 1.3rem;
  border-bottom: 1px solid var(--line);
}

.type {
  margin: 0 0 0.34rem;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 500;
}

.meta {
  margin: 0.52rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

footer {
  padding: 1.3rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

/* Legal pages */
.legal-page {
  padding: calc(var(--header-h) + 5rem) 0 6rem;
  max-width: 760px;
}

.legal-page h1 {
  margin: 0 0 3rem;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.legal-page h2 {
  margin: 2.8rem 0 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

.legal-page p {
  margin: 0.75rem 0;
}

.legal-page a {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.legal-page ul {
  padding-left: 1.2rem;
}

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

  .name {
    font-size: 1.12rem;
  }

  .intro {
    min-height: calc(100svh - 58px);
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 4.5rem;
  }

  .intro h1 {
    max-width: 12ch;
    font-size: clamp(2.35rem, 11vw, 3.6rem);
  }

  .intro-copy {
    max-width: 32rem;
  }

  .selected {
    padding-top: 0;
  }

  .work {
    padding: 1.1rem 0 1.2rem;
  }

  .legal-page {
    padding-top: calc(var(--header-h) + 4rem);
  }
}

@media (max-width: 390px) {
  .footer-links {
    gap: 0.45rem 0.8rem;
  }
}

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
