:root {
  --ground: #07091a;
  --cream: #f4f2ec;
  --cream-soft: rgba(244, 242, 236, 0.68);
  --rule: rgba(244, 242, 236, 0.16);
  --ink: #0b0e20;
  --ink-soft: rgba(11, 14, 32, 0.68);
  --ink-rule: rgba(11, 14, 32, 0.16);
  --accent: #37bdb7;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4.4vw, 72px);
  --section: clamp(88px, 13vw, 200px);
  --nav-height: 84px;
  --max: 1600px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, blockquote { font-family: var(--serif); font-weight: 400; text-wrap: balance; }

::selection { background: var(--cream); color: var(--ground); }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--cream);
  color: var(--ground);
  font-size: 14px;
}
.skip:focus { top: 16px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.link {
  display: inline-flex;
  gap: 0.4em;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 200ms ease;
}
.link:hover { opacity: 0.62; }

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gutter) clamp(36px, 7vh, 80px);
  overflow: hidden;
}

.nav {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 3vh, 32px) var(--gutter);
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 200ms ease;
}
.nav a:hover { opacity: 0.6; }

.nav__mark.nav__mark {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav ul {
  display: flex;
  gap: clamp(12px, 2.6vw, 40px);
}

.hero__portrait {
  position: absolute;
  z-index: 1;
  top: var(--nav-height);
  right: 0;
  height: calc(100% - var(--nav-height));
  aspect-ratio: 1122 / 1402;
  animation: fade 1500ms ease both;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 26%),
    linear-gradient(to top, transparent 0, #000 16%),
    linear-gradient(to bottom, transparent 0, #000 13%);
  mask-image:
    linear-gradient(to right, transparent 0, #000 26%),
    linear-gradient(to top, transparent 0, #000 16%),
    linear-gradient(to bottom, transparent 0, #000 13%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-top: 18px;
  margin-left: -0.035em;
  font-size: clamp(84px, 13.4vw, 236px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.hero__lede {
  max-width: 34em;
  margin-top: clamp(20px, 3.4vh, 36px);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.45;
  color: var(--cream-soft);
}

.hero__lede a {
  color: var(--cream);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.rise { animation: rise 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise--2 { animation-delay: 120ms; }
.rise--3 { animation-delay: 260ms; }

/* Intro */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 120px);
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) var(--gutter) clamp(56px, 7vw, 104px);
}

.intro h2 {
  font-size: clamp(48px, 7vw, 124px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.intro p {
  max-width: 34em;
  color: var(--cream-soft);
}

/* Proof */

.proof {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 48px);
}

.facts > div {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.facts dt {
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 84px);
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.facts dd {
  max-width: 19em;
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cream-soft);
}

/* Record */

.record {
  background: var(--cream);
  color: var(--ink);
  padding: var(--section) 0;
}

.record > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.record__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 6vw, 120px);
  align-items: end;
}

.record__head h2 {
  font-size: clamp(56px, 8vw, 140px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.record__head p {
  max-width: 30em;
  color: var(--ink-soft);
}

.ledger {
  margin-top: clamp(56px, 7vw, 104px);
}

.ledger li,
.skills > div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 4fr) minmax(0, 6fr);
  gap: 8px clamp(20px, 3vw, 48px);
  border-top: 1px solid var(--ink-rule);
}

.ledger li { padding: clamp(24px, 2.6vw, 36px) 0; }
.ledger li:last-child { border-bottom: 1px solid var(--ink-rule); }

.ledger__year {
  padding-top: 8px;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.ledger h3 {
  font-size: clamp(25px, 2.3vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.ledger__role p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.ledger__role .link {
  margin-top: 12px;
  font-size: 14px;
}

.ledger__text {
  max-width: 40em;
  padding-top: 5px;
  font-size: 16px;
  line-height: 1.6;
}

.skills { margin-top: clamp(56px, 7vw, 104px); }

.skills > div {
  padding: 16px 0;
  grid-template-columns: minmax(0, 2fr) minmax(0, 10fr);
}
.skills > div:last-child { border-bottom: 1px solid var(--ink-rule); }

.skills dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.skills dd {
  font-size: 15px;
  line-height: 1.6;
}

/* Story */

.story__stage {
  display: block;
  position: relative;
}

.story__stage img {
  width: 100%;
  height: clamp(280px, 42vw, 68vh);
  object-fit: cover;
  object-position: 62% 46%;
}

.story__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ground) 0%, transparent 34%);
  pointer-events: none;
}

.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 120px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 4vw, 64px) var(--gutter) var(--section);
}

.story blockquote {
  margin-top: 24px;
  font-size: clamp(38px, 4.8vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.story__text p {
  max-width: 32em;
  color: var(--cream-soft);
}
.story__text p + p { margin-top: 1.1em; }
.story__text .link { margin-top: 32px; }

/* Contact */

.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 6vw, 96px) var(--gutter) var(--section);
  border-top: 1px solid var(--rule);
}

.contact h2 {
  font-size: clamp(64px, 11vw, 200px);
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.contact__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(24px, 3vw, 48px);
  margin-top: clamp(48px, 6vw, 88px);
}

.contact__list dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.contact__list dd {
  max-width: 24em;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(48px, 6vw, 88px);
}

.contact__email {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: opacity 200ms ease;
}
.contact__email:hover { opacity: 0.62; }

.contact__actions p {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.bio {
  max-width: 46em;
  margin-top: clamp(48px, 6vw, 88px);
}

.bio h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.bio p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream-soft);
}

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--cream-soft);
}

/* 404 */

.lost {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--gutter);
}

.lost h1 {
  font-size: clamp(56px, 9vw, 150px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}

/* Tablet */

@media (max-width: 1040px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(24px, 3vw, 48px); }

  .ledger li { grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); }
  .ledger__text { grid-column: 2; padding-top: 0; }
  .skills > div { grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); }
}

/* Stacked hero: phones and any portrait screen */

@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .hero { --nav-height: 64px; }

  .hero__portrait {
    left: 0;
    width: 100%;
    height: min(125vw, 62vh);
    height: min(125vw, 62svh);
    aspect-ratio: auto;
    -webkit-mask-image:
      linear-gradient(to top, transparent 12%, #000 40%),
      linear-gradient(to bottom, transparent 0, #000 13%);
    mask-image:
      linear-gradient(to top, transparent 12%, #000 40%),
      linear-gradient(to bottom, transparent 0, #000 13%);
  }

  .hero h1 { font-size: clamp(64px, 22vw, 150px); }
}

/* Phone */

@media (max-width: 760px) {
  body { font-size: 16px; }

  .intro,
  .record__head,
  .story__grid { grid-template-columns: minmax(0, 1fr); }

  .story__stage img { height: auto; aspect-ratio: 4 / 3; object-position: 72% 50%; }

  .ledger li,
  .skills > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ledger__year { padding-top: 0; }
  .ledger__text { grid-column: 1; padding-top: 10px; }

  .contact__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .nav a { font-size: 13px; }
  .nav ul { gap: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .hero__portrait { animation: none; }
}
