:root {
  color-scheme: dark;
  --black: #080808;
  --paper: #f5f1e9;
  --paper-soft: #d8d2c8;
  --muted: #9b968e;
  --rust: #a43a21;
  --rust-dark: #772412;
  --line: #4a4640;
  --page: min(86rem, calc(100% - 3rem));
  font-size: 100%;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.hero-media {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  background: #742712;
  box-shadow: 0 4.5rem 5.5rem 1.4rem var(--black);
}

.hero-media::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  box-shadow: 0 -1.4rem 4rem 2.35rem rgba(8, 8, 8, 0.92);
  content: "";
  pointer-events: none;
}

.hero-media img {
  display: block;
  width: 100%;
  height: min(41.65vw, 34.5rem);
  object-fit: cover;
  object-position: center;
}

.home-intro {
  position: relative;
  z-index: 3;
  display: flex;
  width: var(--page);
  max-width: 74rem;
  align-items: center;
  flex-direction: column;
  margin: clamp(-1.75rem, -2vw, -0.5rem) auto 0;
  padding: clamp(3rem, 4.5vw, 4rem) 0 clamp(2.5rem, 4vw, 3.25rem);
  text-align: center;
}

.home h1 {
  margin: 0;
  font-size: clamp(3rem, 6.15vw, 5.6rem);
  font-weight: 760;
  letter-spacing: -0.062em;
  line-height: 0.92;
}

.home h1 span {
  white-space: nowrap;
}

.signal {
  margin: 1rem 0 0;
  color: #c94b2d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.summary {
  max-width: 61rem;
  margin: 1.1rem auto 0;
  color: var(--paper-soft);
  font-size: clamp(1.125rem, 1.75vw, 1.35rem);
  line-height: 1.55;
}

.home-actions {
  display: grid;
  width: min(100%, 64rem);
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
}

.action {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border: 1px solid var(--paper);
  font-size: clamp(1.125rem, 1.7vw, 1.35rem);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease,
    transform 150ms ease;
}

.action-primary {
  border-color: var(--rust);
  background: var(--rust);
}

.action:hover {
  transform: translateY(-2px);
}

.action-primary:hover {
  border-color: #c34b2c;
  background: #c34b2c;
}

.action-secondary:hover {
  background: var(--paper);
  color: var(--black);
}

.action:focus-visible,
.text-link:focus-visible,
.home-link:focus-visible {
  outline: 3px solid #e46645;
  outline-offset: 4px;
}

.privacy {
  margin: clamp(2rem, 3.5vw, 2.75rem) 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

.site-footer {
  display: flex;
  width: var(--page);
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0 auto;
  border-top: 1px solid #2d2a27;
  color: #827d76;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

/* Project map */

.explore {
  background: var(--paper);
  color: #131210;
}

.explore-shell {
  width: var(--page);
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(4rem, 8vw, 8rem);
}

.explore-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #918a80;
}

.wordmark,
.home-link,
.section-label,
.project-index,
.project-kind,
.explore-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.09em;
}

.wordmark,
.home-link {
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.explore-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 0.55fr);
  gap: clamp(3rem, 8vw, 8rem);
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.section-label {
  margin: 0 0 1.5rem;
  color: var(--rust-dark);
  font-size: 0.875rem;
  font-weight: 700;
}

.explore h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7.4rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.explore-lead {
  align-self: end;
  margin: 0;
  color: #403c37;
  font-size: clamp(1.125rem, 1.7vw, 1.35rem);
  line-height: 1.6;
}

.project-list {
  border-top: 2px solid #131210;
}

.project {
  display: grid;
  grid-template-columns: 5rem minmax(15rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.25rem, 5vw, 4rem) 0;
  border-bottom: 1px solid #aaa399;
}

.project-index {
  color: var(--rust-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.project h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.project-kind {
  margin: 0.8rem 0 0;
  color: #5a554f;
  font-size: 0.85rem;
  line-height: 1.5;
}

.project-copy p {
  max-width: 42rem;
  margin: 0;
  color: #35322e;
  font-size: 1.125rem;
  line-height: 1.65;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 1.35rem;
}

.text-link {
  border-bottom: 1px solid currentColor;
  color: #151311;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
}

.github-mark {
  display: block;
  width: 1.125rem;
  height: auto;
  flex: 0 0 auto;
}

.text-link:hover {
  color: var(--rust-dark);
}

.explore-note {
  max-width: 56rem;
  margin: 3rem 0 0 auto;
  color: #625d56;
  font-size: 0.875rem;
  line-height: 1.65;
}

@media (max-width: 860px) {
  :root {
    --page: min(100% - 2.5rem, 46rem);
  }

  .hero-media {
    overflow: hidden;
    box-shadow: 0 3.5rem 4rem 1rem var(--black);
  }

  .hero-media img {
    width: 150%;
    max-width: none;
    height: auto;
    margin-left: -28%;
  }

  .home-intro {
    align-items: stretch;
    padding-top: 4.5rem;
    text-align: left;
  }

  .home h1 {
    font-size: clamp(3rem, 13vw, 5.2rem);
    line-height: 0.9;
  }

  .home h1 span {
    display: block;
    white-space: normal;
  }

  .signal {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .summary {
    margin-inline: 0;
    font-size: 1.125rem;
  }

  .home-actions {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .action {
    min-height: 4.75rem;
    justify-content: flex-start;
    font-size: 1.125rem;
    text-align: left;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.25rem 0;
  }

  .explore-intro {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .explore-lead {
    max-width: 38rem;
  }

  .project {
    grid-template-columns: 3.25rem 1fr;
  }

  .project-copy {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  :root {
    --page: calc(100% - 2rem);
  }

  body {
    font-size: 1rem;
  }

  .hero-media img {
    width: 185%;
    margin-left: -20%;
  }

  .home-intro {
    padding-top: 4rem;
  }

  .home h1 {
    font-size: clamp(3rem, 15vw, 4.1rem);
  }

  .privacy {
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .explore-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .explore h1 {
    font-size: clamp(3.5rem, 17vw, 5rem);
  }

  .project {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-copy {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .action {
    transition: none;
  }
}
