/* ---------- Cole Schlesinger — shared styles ---------- */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Palette pulled from the cover image: fog, sea, dark wet rock. */
  --bg: oklch(0.970 0.005 235);
  --ink: oklch(0.225 0.014 240);
  --muted: oklch(0.500 0.012 235);
  --faint: oklch(0.720 0.010 235);
  --rule: oklch(0.860 0.008 235);
  --rule-strong: oklch(0.780 0.012 240);
  --hero-scrim-top: oklch(0.78 0.012 240 / 0.05);
  --hero-scrim-bottom: oklch(0.970 0.005 235 / 1);
  --hero-image-filter: none;
  --topbar-rule: oklch(0.30 0.012 240 / 0.18);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --page-max: 1180px;
  --content-max: 880px;

  --size-mega: clamp(48px, 7.2vw, 104px);
  --size-display: clamp(36px, 4.2vw, 56px);
  --size-h2: clamp(22px, 1.8vw, 28px);
  --size-h3: 18px;
  --size-body: 17px;
  --size-small: 14px;
  --size-micro: 12px;

  --pad-x: clamp(28px, 5vw, 72px);
  --pad-top: clamp(28px, 3vw, 40px);

  --lh-tight: 1.05;
  --lh-snug: 1.25;
  --lh-body: 1.55;
}

/* Dark palette — same hues as the photograph at dusk. */
:root[data-theme="dark"] {
  --bg: oklch(0.165 0.012 240);
  --ink: oklch(0.925 0.006 235);
  --muted: oklch(0.625 0.012 235);
  --faint: oklch(0.450 0.012 240);
  --rule: oklch(0.285 0.013 240);
  --rule-strong: oklch(0.405 0.015 240);
  --hero-scrim-top: oklch(0.10 0.015 240 / 0.35);
  --hero-scrim-bottom: oklch(0.165 0.012 240 / 1);
  --hero-image-filter: brightness(0.55) saturate(0.85);
  --topbar-rule: oklch(0.85 0.012 240 / 0.20);
  color-scheme: dark;
}

html { transition: background-color 200ms ease; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--size-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover {
  border-color: var(--ink);
}

p { margin: 0 0 1em 0; max-width: 64ch; text-wrap: pretty; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- Layout ---------- */

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--pad-top) var(--pad-x) 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 88px;
  gap: 32px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
  border-bottom: none;
}
.brand .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 999px;
  margin-right: 10px;
  transform: translateY(-2px);
}

.nav {
  display: flex;
  gap: 28px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: var(--size-small);
  letter-spacing: 0.02em;
}
.nav a {
  border-bottom: none;
  color: var(--muted);
  text-transform: lowercase;
  position: relative;
  padding-bottom: 2px;
}
.nav a:hover { color: var(--ink); }
.nav a.current {
  color: var(--ink);
}
.nav a.current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -32px;
  height: 1px;
  background: var(--ink);
}

/* Theme toggle (sits in the nav) */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transition: color 120ms ease, transform 200ms ease;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ---------- Section anatomy ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: var(--size-micro);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 18px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow .num {
  color: var(--ink);
}
.eyebrow .dash {
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 80px;
}

h1.display {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--size-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin: 0 0 28px 0;
  max-width: 18ch;
}

h1.mega {
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--size-mega);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 40px 0;
  max-width: 14ch;
}

h2.section-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--size-h2);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  margin: 0 0 24px 0;
}

.lede {
  font-size: clamp(20px, 1.55vw, 24px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink);
  max-width: 36ch;
  letter-spacing: -0.005em;
}

.body-narrow {
  max-width: 60ch;
  color: var(--ink);
}
.body-narrow p { color: var(--ink); }
.muted { color: var(--muted); }

/* ---------- Footer ---------- */

footer.colophon {
  margin-top: auto;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: var(--size-micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  gap: 24px;
  flex-wrap: wrap;
}
footer.colophon a {
  border-bottom: none;
  color: var(--muted);
}
footer.colophon a:hover { color: var(--ink); }
footer.colophon .links {
  display: flex;
  gap: 24px;
}

/* ---------- Utility ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.grid-side {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: baseline;
}
.grid-side .label {
  font-family: var(--mono);
  font-size: var(--size-micro);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 6px;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 64px 0;
}

.mono { font-family: var(--mono); }
.small { font-size: var(--size-small); }
.micro { font-size: var(--size-micro); text-transform: uppercase; letter-spacing: 0.1em; }

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-side { grid-template-columns: 1fr; gap: 12px; }
  .nav a.current::after { bottom: -29px; }
  .topbar { margin-bottom: 56px; }
}

/* ---------- Full-bleed hero band (home page) ---------- */

.hero-band {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: oklch(0.78 0.008 235);
}
.hero-band__img {
  position: absolute;
  inset: 0;
  background-image: url("img/hero.png");
  background-size: cover;
  background-position: 50% 38%;
  background-repeat: no-repeat;
  z-index: -2;
  filter: var(--hero-image-filter);
  transition: filter 250ms ease;
}
.hero-band__fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      var(--hero-scrim-top) 0%,
      transparent 30%,
      transparent 55%,
      var(--bg) 100%
    );
  z-index: -1;
}
.hero-band__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--pad-top) var(--pad-x) clamp(120px, 18vh, 200px);
  min-height: clamp(640px, 82vh, 880px);
  display: flex;
  flex-direction: column;
}
.hero-band .topbar {
  border-bottom: 1px solid var(--topbar-rule);
  margin-bottom: clamp(60px, 12vh, 140px);
}
.hero-band .topbar .brand .dot { background: var(--ink); }
.hero-band .nav a.current::after { background: var(--ink); }

@media (max-width: 760px) {
  .hero-band__inner {
    min-height: 70vh;
    padding-bottom: 80px;
  }
  .hero-band__img { background-position: 60% 40%; }
}
