:root {
  color-scheme: dark;
  --background: #0f1621;
  --surface: #161f2e;
  --surface-raised: #1b2536;
  --line: #2b3a52;
  --text: #e8eef6;
  --muted: #9fb0c4;
  --accent: #d6b65b;
  --accent-strong: #ead27f;
  --content-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: #f7e7ad;
}

a:focus-visible {
  border-radius: 5px;
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-top: 28px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

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

.hero {
  max-width: 920px;
  padding-top: 40px;
  padding-bottom: 64px;
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.15;
}

h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(46px, 5vw, 64px);
  font-weight: 350;
  letter-spacing: -0.015em;
}

.tagline {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.35;
}

.hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  border: 1px solid rgba(214, 182, 91, 0.5);
  border-radius: 11px;
  background: rgba(214, 182, 91, 0.12);
  color: var(--accent-strong);
  padding: 10px 16px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-link:hover {
  border-color: rgba(214, 182, 91, 0.8);
  background: rgba(214, 182, 91, 0.18);
  color: #f7e7ad;
}

.requirements {
  color: var(--muted);
  font-size: 14px;
}

.intro-section {
  border-top: 1px solid var(--line);
  padding: 54px 0 14px;
}

.intro-section p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(19px, 2.3vw, 23px);
}

.intro-section p + p {
  margin-top: 24px;
}

.intro-section ol {
  max-width: 900px;
  margin: 16px 0 0;
  padding-left: 1.35em;
  color: var(--muted);
  font-size: clamp(19px, 2.3vw, 23px);
}

.intro-section li + li {
  margin-top: 10px;
}

.intro-section li::marker {
  color: var(--accent);
}

.intro-section ul {
  margin: 10px 0 0;
  padding-left: 1.35em;
  font-size: 0.78em;
}

.details-section p,
.details-section ol,
.details-section ul {
  font-size: 15px;
}

.details-section {
  border-top: 0;
}

.section {
  padding-top: 62px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading {
  margin: 0;
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 450;
}

.demo-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.shot {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: #0d1016;
}

.shot-image-link {
  display: block;
  cursor: zoom-in;
}

.shot-image-link:focus-visible {
  border-radius: 14px 14px 0 0;
  outline-offset: -5px;
}

.shot figcaption {
  min-height: 72px;
  padding: 15px 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.shot strong {
  color: var(--text);
  font-weight: 650;
}

.project-notes {
  padding-bottom: 0;
}

.screenshots-section {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.project-notes > .section-heading,
.details-section > .section-heading {
  margin-bottom: 22px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 22px;
}

.note-card h3 {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 500;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.source-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 800px) {
  .section-heading-row {
    display: block;
  }

  .demo-note {
    max-width: 560px;
    margin-top: 9px;
    text-align: left;
  }

  .gallery,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .shot figcaption {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 32px, var(--content-width));
  }

  .site-nav {
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 42px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-actions {
    display: grid;
    gap: 12px;
    margin-top: 22px;
  }

  .primary-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .requirements {
    text-align: center;
  }

  .intro-section {
    padding-top: 38px;
  }

  .section {
    padding-top: 42px;
  }

  .note-card {
    padding: 18px;
  }
}

@media (max-width: 390px) {
  body {
    font-size: 16px;
  }
}

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

  .primary-link {
    transition: none;
  }
}
