@font-face {
  font-family: "Host Grotesk";
  src: url("/assets/fonts/host-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("/assets/fonts/host-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("/assets/fonts/host-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("/assets/fonts/noto-sans-sc-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("/assets/fonts/noto-sans-sc-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Serif SC";
  src: url("/assets/fonts/noto-serif-sc-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

:root {
  --cream: #f7f7ee;
  --cream-dim: rgba(247, 247, 238, 0.68);
  --line: rgba(247, 247, 238, 0.16);
  --ink: #090806;
  --accent: #ff4d1a;
  --sans: "Host Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --italic: "Instrument Serif", "Noto Serif SC", serif;
  --nav: 64px;
  --pad: max(20px, 4vw);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(255, 77, 26, 0.28), transparent 58%),
    radial-gradient(720px 480px at 88% 92%, rgba(196, 140, 72, 0.22), transparent 55%),
    linear-gradient(160deg, #14110e, #090806 46%, #1a0e0a);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, a { font: inherit; color: inherit; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--cream);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 30;
}
.skip:focus { top: 12px; }

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--pad);
  background: linear-gradient(180deg, rgba(9, 8, 6, 0.55), rgba(9, 8, 6, 0));
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.nav.is-solid {
  background: transparent;
  border-bottom-color: var(--line);
}
.nav.is-solid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(9, 8, 6, 0.78);
  backdrop-filter: blur(16px);
}
.brand {
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 18px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 10px;
  font-size: 14px;
  color: var(--cream-dim);
  transition: color 0.25s ease, box-shadow 0.25s ease;
}
.nav-links a:hover { color: var(--cream); }
.nav-links a[aria-current] {
  color: var(--cream);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
  place-items: center;
  gap: 6px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--cream);
}

.rail {
  position: fixed;
  z-index: 15;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
}
.rail a {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  border: 1px solid rgba(247, 247, 238, 0.55);
  background: transparent;
}
.rail a[aria-current] {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(255, 77, 26, 0.7);
}

.scroll { position: relative; z-index: 1; }
.panel {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 8, 6, 0.12), rgba(9, 8, 6, 0.34) 42%, rgba(9, 8, 6, 0.16));
}

.home {
  display: grid;
  align-items: center;
}
.frame {
  position: absolute;
  z-index: 2;
  top: calc(var(--nav) + 12px);
  left: 18px;
  right: 18px;
  bottom: 16px;
  border: 1px solid rgba(247, 247, 238, 0.28);
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 77, 26, 0.08), transparent 32%),
    linear-gradient(300deg, rgba(247, 247, 238, 0.05), transparent 40%);
}
.home-copy {
  position: relative;
  z-index: 3;
  justify-self: end;
  width: min(520px, 42vw);
  margin-right: max(72px, 8vw);
}
.home-copy > * { animation: rise 0.85s ease both; }
.home-copy > :nth-child(2) { animation-delay: 0.1s; }
.home-copy > :nth-child(3) { animation-delay: 0.2s; }
.home h1, .page h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
  background: linear-gradient(115deg, #f7f7ee 8%, #ffe4d8 42%, #ff8a62 78%, #f7f7ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home h1 { font-size: clamp(64px, 8vw, 112px); }
.home-role {
  margin: 16px 0 0;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
}
.home-line {
  margin: 22px 0 0;
  max-width: 12em;
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.25;
}
.pull {
  position: absolute;
  z-index: 3;
  left: var(--pad);
  bottom: 36px;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--cream-dim);
  transition: opacity 0.4s ease;
}
.pull.is-gone { opacity: 0; pointer-events: none; }
.pull::after {
  content: "";
  display: block;
  width: 1px;
  height: 48px;
  margin: 12px 0 0 8px;
  background: linear-gradient(var(--accent), transparent);
  transform-origin: top;
  animation: drop 1.8s ease-in-out infinite;
}

.page {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav) + 56px) var(--pad) 80px;
  max-width: 1120px;
  margin: 0 auto;
}
.kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.page h1 { font-size: clamp(56px, 8vw, 96px); }
.page-note {
  margin: 14px 0 0;
  color: var(--cream-dim);
  font-family: var(--serif);
  font-size: 20px;
}
.page-intro {
  max-width: 38rem;
  margin: 28px 0 0;
  color: var(--cream-dim);
}

.blocks { margin-top: 48px; display: grid; gap: 14px; }
.block { padding: 22px 0 8px; border-top: 1px solid var(--line); }
.block h2, .card h2, .entry h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}
.placeholder, .card p, .entry p, .meta dd {
  margin: 0;
  color: var(--cream-dim);
}

.cards {
  margin-top: 40px;
  display: grid;
  gap: 14px;
}
.card, .entry {
  background: linear-gradient(165deg, rgba(247, 247, 238, 0.1), rgba(12, 10, 9, 0.38));
  border: 1px solid var(--line);
  padding: 22px;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.card:hover, .entry:hover {
  border-color: rgba(255, 138, 98, 0.55);
  background: linear-gradient(165deg, rgba(255, 77, 26, 0.16), rgba(12, 10, 9, 0.5));
  transform: translateY(-3px);
}
.card .tag, .entry .tag {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.local-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.local-nav a {
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--cream-dim);
  background: rgba(9, 8, 6, 0.28);
}
.local-nav a:hover { color: var(--cream); border-color: rgba(255, 138, 98, 0.7); }

.meta { margin: 16px 0 0; }
.meta div {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.meta dt { color: var(--cream); font-size: 14px; }
.shot {
  margin-top: 4px;
  aspect-ratio: 16 / 10;
  border: 1px dashed rgba(247, 247, 238, 0.28);
  display: grid;
  place-items: center;
  color: var(--cream-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.poster-band { margin: 36px 0 0; overflow: hidden; }
.poster-band img {
  width: 100%;
  height: min(46vh, 420px);
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.04);
  transition: transform 1.1s ease;
}
.poster-band.is-in img { transform: scale(1); }

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px var(--pad) 36px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px 32px;
  align-items: start;
}
.site-footer p { margin: 0; color: var(--cream-dim); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a { font-size: 14px; color: var(--cream-dim); }
.footer-links a:hover { color: var(--cream); }

@media (min-width: 861px) {
  .cards.tools { grid-template-columns: repeat(4, 1fr); }
  .cards.explore { grid-template-columns: repeat(3, 1fr); }
  .cards.projects { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .cards.tools { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .rail { display: none; }
  .menu-toggle { display: grid; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px var(--pad) 32px;
    background: #090806;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: auto;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a {
    font-size: 28px;
    letter-spacing: -0.04em;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--cream);
    box-shadow: none;
  }
  .home-copy {
    justify-self: start;
    width: auto;
    margin: 0 28px 72px;
  }
  .footer-inner { flex-direction: column; }
  .meta div { grid-template-columns: 1fr; gap: 4px; }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-in { opacity: 1; transform: none; }
.card.reveal.is-in:hover,
.entry.reveal.is-in:hover { transform: translateY(-3px); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes drop {
  0% { transform: scaleY(0.2); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
