@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/cormorant-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/cormorant-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/karla-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/karla-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #12100e;
  --raised: #1c1814;
  --paper: #eadfcb;
  --mute: #b5a58c;
  --gilt: #c4a574;
  --gilt-bright: #e0c48a;
  --line: #3d342c;
  --on-gilt: #14110c;
  --display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --body: "Karla", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --text: 1.125rem;
  --radius: 2px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 180ms;
  --page: min(72rem, calc(100% - 3rem));
  --os-ink: var(--ink);
  --os-raised: var(--raised);
  --os-paper: var(--paper);
  --os-mute: var(--mute);
  --os-gilt: var(--gilt);
  --os-gilt-bright: var(--gilt-bright);
  --os-line: var(--line);
  --os-on-gilt: var(--on-gilt);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--text);
  font-weight: 400;
  line-height: 1.6;
}

::selection {
  background: var(--gilt);
  color: var(--on-gilt);
}

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

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

a {
  color: var(--gilt);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 8;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--gilt);
  color: var(--on-gilt);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.skip:focus,
.skip:focus-visible {
  top: 1rem;
}

.wrap {
  width: var(--page);
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.nav-mark {
  width: 96px;
  height: 24px;
  flex: none;
  image-rendering: pixelated;
  background: var(--ink);
  border: 1px solid var(--line);
}

.nav-name {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.45rem 0.1rem;
  color: var(--mute);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--t) var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gilt);
}

.hero {
  display: grid;
  grid-template-columns: minmax(17rem, 32rem) minmax(0, 1fr);
  gap: 1.5rem;
  min-height: calc(100svh - 4.2rem);
  align-items: stretch;
  padding: 1.25rem 0 2.5rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 0 2rem;
}

.kicker {
  margin: 0 0 1rem;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1.25rem;
  max-width: 11em;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 34em;
  color: var(--mute);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--gilt);
  border-radius: var(--radius);
  background: var(--gilt);
  color: var(--on-gilt);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--gilt-bright);
  border-color: var(--gilt-bright);
  color: var(--on-gilt);
}

.btn-ghost {
  background: transparent;
  color: var(--gilt);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--gilt);
  color: var(--on-gilt);
}

.hero-stage {
  position: relative;
  min-height: 28rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 70% 40%, color-mix(in srgb, var(--gilt) 10%, transparent), transparent 55%),
    var(--raised);
  overflow: hidden;
}

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

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../favicon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(70%, 26rem);
  image-rendering: pixelated;
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 400ms var(--ease);
}

.hero-stage.is-live::after {
  opacity: 0;
}

.hero-stage.is-static::after {
  opacity: 0.92;
}

.caption {
  position: absolute;
  right: 0.9rem;
  bottom: 0.7rem;
  z-index: 1;
  margin: 0;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.work {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  scroll-margin-top: 5.5rem;
}

.work-row {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) auto;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.work-id {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.work-what {
  color: var(--mute);
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-spec {
  color: var(--gilt);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-row:hover .work-id,
.work-row:focus-visible .work-id {
  color: var(--gilt);
}

.sheet {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 42rem);
  gap: 1rem 2rem;
  padding: 4rem 0 3.25rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 5.5rem;
}

.sheet-index {
  margin: 0.35rem 0 0;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sheet h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sheet p {
  margin: 0 0 1rem;
}

.sheet p:last-child {
  margin-bottom: 0;
}

.sheet code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--gilt);
}

.traces {
  display: grid;
  gap: 0.35rem;
  margin: 1.25rem 0 0;
}

.traces span {
  display: block;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
}

.traces span:nth-child(1) { width: 92%; }
.traces span:nth-child(2) { width: 61%; }
.traces span:nth-child(3) { width: 84%; }
.traces span:nth-child(4) { width: 47%; }
.traces span:nth-child(5) { width: 76%; }
.traces span:nth-child(6) { width: 38%; }
.traces span:nth-child(7) { width: 70%; }
.traces span:nth-child(8) { width: 55%; }

.contact {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  gap: 1rem 2rem;
  padding: 4rem 0 3.5rem;
  scroll-margin-top: 5.5rem;
}

.contact h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.85rem);
}

.mail {
  font-size: 1.35rem;
  text-underline-offset: 0.2em;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.4rem 0 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.9rem;
}

.foot p {
  margin: 0;
}

.foot a {
  color: var(--gilt);
  text-underline-offset: 0.2em;
}

@media (max-width: 860px) {
  :root {
    --page: min(72rem, calc(100% - 2rem));
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
    padding-top: 0;
  }

  .hero-stage {
    min-height: 46svh;
    order: -1;
  }

  .hero-copy {
    padding: 1.6rem 0 1.4rem;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10vw, 3.2rem);
  }

  .work-row,
  .sheet,
  .contact {
    grid-template-columns: 1fr;
  }

  .work-spec {
    display: none;
  }
}

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

  .top,
  .btn,
  .work-row,
  .nav-links a,
  .hero-stage::after {
    transition: none;
  }
}
