/* ---- Fonts ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var.woff2") format("woff2");
}

/* ---- Tokens (from the original theme) ---- */
:root {
  --bg: #ffffff;
  --text: #1e1e1e;
  --muted: #bbbbbb;
  --surface: #eeeeee;
  --accent: #000000;
  --font: "Inter", system-ui, sans-serif;
  --measure: 42rem;
  --pad: clamp(1rem, 4vw, 2.5rem);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* Contains the full-bleed hero so 100vw can't add a horizontal scrollbar. */
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.179), 16px);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--pad);
  top: 0.5rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* ---- Header / nav ---- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem var(--pad);
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
}
.wordmark {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-decoration: none;
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--text);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

/* ---- Main ---- */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem var(--pad) 4rem;
}
.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose h1 {
  font-size: clamp(1.9rem, 1.5rem + 2vw, 2.6rem);
  line-height: 1.15;
  margin: 0.5rem 0 1.5rem;
}
.prose h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
}
.prose h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: #555;
}
.prose p { margin: 0 0 1.1rem; }
.prose section { margin-top: 1rem; }

/* ---- Home ---- */
/* Full-bleed: escape the centred, padded .site-main column. */
.hero {
  position: relative;
  display: flex;
  /* Text sits in the dark end of the scrim so the photo stays visible above it. */
  align-items: flex-end;
  text-align: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /* Cancel .site-main's top padding so the banner sits flush under the header. */
  margin-top: -1rem;
  min-height: clamp(20rem, 52vh, 32rem);
  /* Extra bottom padding clears the photo credit. */
  padding: clamp(2rem, 7vw, 4.5rem) var(--pad) clamp(3rem, 7vw, 4.5rem);
  overflow: hidden;
  color: #fff;
}
.hero picture {
  display: contents;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}
/* Scrim: weighted to the bottom, so it only darkens the band the text occupies. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0.7) 74%,
    rgba(0, 0, 0, 0.86) 100%
  );
}
.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}
.hero-name {
  font-size: clamp(2rem, 1.5rem + 3vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.hero-tagline {
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.3rem);
  line-height: 1.45;
  margin: 0 auto;
  max-width: 34rem;
}
.hero-credit {
  position: absolute;
  z-index: 1;
  bottom: 0.6rem;
  right: var(--pad);
  margin: 0;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Narrow screens get the square crop (see the <picture> on the home page), so the
   framing, the scrim and the text band all need retuning for a near-square banner. */
@media (max-width: 40em) {
  .hero {
    /* svh, not vh: vh is measured against the *expanded* viewport on iOS Safari,
       which makes the banner overshoot while the address bar is showing. */
    min-height: clamp(20rem, 62svh, 30rem);
    padding-bottom: 2.75rem;
  }
  /* The square crop is already framed on the staircases; the 60% offset is only
     needed to keep them in view when the wide crop is cropped to the box. */
  .hero-image {
    object-position: center;
  }
  /* The tagline wraps to three or four lines here, so the dark band starts higher. */
  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0.22) 30%,
      rgba(0, 0, 0, 0.72) 62%,
      rgba(0, 0, 0, 0.88) 100%
    );
  }
  .hero-tagline {
    text-wrap: balance;
  }
  .hero-credit {
    font-size: 0.7rem;
    bottom: 0.4rem;
  }
}

/* ---- About ---- */
.portrait {
  width: 100%;
  border-radius: 2px;
  margin: 0 0 2rem;
}
.funding {
  margin: 2.5rem 0;
}
.funding img { width: 100%; max-width: 20rem; }
.funding figcaption {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.5rem;
}
.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
}

/* ---- Portfolio ---- */
.portfolio .pieces {
  list-style: none;
  padding: 0;
  margin: 0;
}
.portfolio .pieces li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--surface);
}
.portfolio cite { font-style: italic; }
.byline {
  display: block;
  font-size: 0.85rem;
  color: #555;
}

/* ---- Contact form ---- */
.button {
  display: inline-block;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 2px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}
.button:hover { opacity: 0.85; }
.cta { margin-top: 2.5rem; }

/* ---- Footer ---- */
.site-footer {
  padding: 2rem var(--pad);
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--surface);
  font-size: 0.85rem;
  color: #555;
}
.site-footer p { margin: 0; }
