:root {
  --bg: #20201e;
  --panel: #2a2a27;
  --line: #3a3a36;
  --text: #ece9d6;
  --muted: #a3a091;
  --display: "Avenir Next Condensed", "Helvetica Neue", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: #fff; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h2 { margin-top: 2.5rem; }

.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-header .brand img { height: 48px; width: auto; display: block; }
.site-header nav { display: flex; gap: 1.25rem; font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.05em; text-transform: uppercase; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }

main { flex: 1; padding-bottom: 3rem; }

/* Home */
.hero {
  min-height: calc(100svh - 74px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(2rem, 9vh, 5rem);
  text-align: center;
  position: relative;
}
/* Wider than .wrap on purpose; capped by viewport height so the bio stays above the fold */
.hero-logo { width: min(92vw, 1100px, 125vh); max-width: none; height: auto; flex-shrink: 0; display: block; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 2rem auto 0; }
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

.project {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.project:last-child { border-bottom: 0; }
.project .num {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.project h3 {
  font-size: clamp(3rem, 12vw, 6.5rem);
  margin: 0.25rem 0 1rem;
}
.project p { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 0 1.75rem; }
.project .cta {
  align-self: flex-start;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--text);
  padding: 0.6rem 1.2rem;
  transition: background 0.2s, color 0.2s;
}
.project a.cta:hover { background: var(--text); color: var(--bg); }
.project .cta.soon { border-style: dashed; border-color: var(--muted); color: var(--muted); }

/* Scroll-in animation (only when JS is running, so content is never hidden without it) */
.js .reveal > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal > *:nth-child(2) { transition-delay: 0.1s; }
.js .reveal > *:nth-child(3) { transition-delay: 0.2s; }
.js .reveal > *:nth-child(4) { transition-delay: 0.3s; }
.js .reveal.is-visible > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; }
  .js .reveal > * { opacity: 1; transform: none; transition: none; }
}

/* Legal pages */
.doc h1 { margin-top: 2.5rem; font-size: 3rem; }
.doc h2 { font-size: 1.4rem; }
.doc .updated { color: var(--muted); font-size: 0.9rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
