:root {
  --bg: #07090e;
  --fg: #e8ebf0;
  --muted: #7d8696;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #a9bccf;
  --radius: 6px;
  --pad: clamp(16px, 5vw, 72px);
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.1; letter-spacing: -0.02em; }

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--pad);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 9, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 500; font-size: 17px; }
.logo svg { color: var(--accent); }
.menu { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--muted); font-size: 14px; transition: color .2s; }
.menu a:hover { color: var(--fg); }

/* Hero */
.hero {
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-wrap: balance;
  padding: 140px var(--pad) 96px;
}
.hero h1 { font-size: clamp(40px, 7vw, 104px); }
.rotator { color: var(--accent); }
.caret {
  display: inline-block;
  width: 0.06em;
  height: 0.82em;
  margin-left: 0.04em;
  vertical-align: -0.04em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
.caret.typing { animation: none; }
@keyframes blink { 50% { opacity: 0; } }
.lede { max-width: 640px; color: #b3bccb; font-family: var(--display); font-weight: 500; font-size: clamp(18px, 1.7vw, 24px); letter-spacing: -0.01em; line-height: 1.4; margin: 32px 0 0; }
.hero > * { opacity: 0; transform: translateY(16px); animation: rise 1.1s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .lede { animation-delay: .2s; }
.fonts-pending .hero > * { animation-play-state: paused; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: clamp(80px, 10vw, 140px) var(--pad); background: var(--bg); }
.section-title {
  font-size: 13px;
  font-family: var(--body);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 24px; }
.thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform 1s cubic-bezier(.2,.7,.2,1);
  z-index: -1;
}
.work:hover .thumb::after { transform: scale(1.04); }
.t1 { background: radial-gradient(circle at 30% 70%, #3f6f66 0, transparent 50%), radial-gradient(circle at 75% 30%, #2f4470 0, transparent 55%), #0e1424; }
.t2 { background: linear-gradient(160deg, #6b4a44 0%, #3a2433 55%, #14101c 100%); }
.t3 { background: radial-gradient(circle at 50% 50%, #d9d5cc 0 14%, transparent 14.5%), radial-gradient(circle at 50% 50%, transparent 0 24%, rgba(217,213,204,.18) 24.3% 24.6%, transparent 25%), linear-gradient(135deg, #131c2c, #070a12); }
.t4 { background: radial-gradient(ellipse at 50% 130%, #4a6b78 0, transparent 60%), linear-gradient(180deg, #0b0f1c, #1a2738); }
.meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; }
.meta h3 { font-size: 18px; }
.meta span { color: var(--muted); font-size: 14px; }

.work-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 21 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.018) 14px 15px),
    rgba(255,255,255,.015);
}
.work-placeholder span {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Contact */
.big-link {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 52px);
  letter-spacing: -0.02em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s;
  word-break: break-word;
}
.big-link:hover { background-size: 100% 1px; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  background: var(--bg);
}
.footer ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer a:hover { color: var(--fg); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; gap: 36px; }
  .work-placeholder { aspect-ratio: 4 / 3; }
  .menu { gap: 20px; }
  .hero h1 { font-size: 8.4vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
