:root {
  color-scheme: dark;
  --ink: #111418;
  --panel: #171c22;
  --panel-2: #1d232b;
  --text: #f6f7f8;
  --body: #e7eaed;
  --muted: #a3acb5;
  --accent: #42cdbd;
  --accent-bright: #a9ece5;
  --blue: #7db9f8;
  --line: rgba(184, 231, 225, 0.18);
  --line-strong: rgba(184, 231, 225, 0.34);
  --font: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --shell: min(1160px, calc(100vw - 48px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--body);
  font-family: var(--font);
  font-synthesis: none;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 0% 0%, rgba(240, 138, 75, 0.18), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(40, 179, 154, 0.2), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(40, 179, 154, 0.14), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(240, 138, 75, 0.13), transparent 42%),
    linear-gradient(180deg, #0a0e13 0%, var(--ink) 48%, #10161c 100%);
  content: "";
  pointer-events: none;
}

a { color: inherit; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--accent);
  color: #07211d;
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.theme-shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--text);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.theme-header { padding: 30px 0 0; }

.theme-nav,
.theme-footer > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
}

.theme-nav a,
.theme-footer a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.theme-nav a:hover,
.theme-footer a:hover { color: var(--text); }

.theme-nav .theme-wordmark {
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.gallery-main,
.detail-main { padding: clamp(72px, 10vw, 138px) 0 clamp(88px, 11vw, 150px); }

.gallery-intro,
.detail-intro { max-width: 820px; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

h1 { font-size: clamp(3.3rem, 7vw, 6.6rem); }

h2 { font-size: clamp(2rem, 3.6vw, 3.5rem); }

.gallery-intro > p:last-child,
.detail-lede {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--body);
  font-size: clamp(1.12rem, 2vw, 1.42rem);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 52px);
  margin-top: clamp(64px, 8vw, 104px);
}

.theme-card { min-width: 0; }

.theme-card-preview {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
  transition: border-color 180ms ease, transform 180ms ease;
}

.theme-card-preview:hover,
.theme-card-preview:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.theme-card-preview img { aspect-ratio: 4 / 3; object-fit: cover; }

.theme-card-copy { padding: 24px 4px 0; }

.theme-card h2 { font-size: clamp(2rem, 3vw, 3rem); }

.theme-card h2 a { text-decoration: none; }

.theme-card-copy > p:not(.theme-byline) {
  max-width: 43ch;
  margin: 14px 0 0;
  color: var(--body);
  font-size: 1.02rem;
}

.theme-byline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.theme-byline a { text-underline-offset: 0.2em; }

.detail-lede { font-size: clamp(1.25rem, 2.4vw, 1.65rem); }

.detail-intro .theme-byline { margin-top: 18px; }

.theme-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent) 42%, var(--blue));
  color: #07211d;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 14px 40px rgba(66, 205, 189, 0.2);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.theme-action:hover,
.theme-action:focus-visible {
  box-shadow: 0 18px 48px rgba(66, 205, 189, 0.31);
  transform: translateY(-2px);
}

.theme-included {
  margin: 30px 0 0;
  color: var(--accent-bright);
  font-weight: 650;
}

.theme-preview {
  margin: clamp(66px, 9vw, 112px) 0 0;
}

.theme-preview img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 44px 96px rgba(0, 0, 0, 0.42);
}

.theme-preview figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.theme-preview figcaption a { text-underline-offset: 0.22em; }

.theme-facts {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 7vw, 88px);
  margin-top: clamp(72px, 10vw, 130px);
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.theme-fact-copy {
  max-width: 600px;
  color: var(--body);
  font-size: 1.08rem;
}

.theme-fact-copy p { margin: 0 0 22px; }

.theme-fact-copy a { color: var(--accent-bright); text-underline-offset: 0.2em; }

.theme-footer {
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.theme-footer p { margin: 0; }

.theme-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }

@media (max-width: 760px) {
  :root { --shell: min(100% - 32px, 1160px); }

  .theme-header { padding-top: 22px; }

  .gallery-main,
  .detail-main { padding-top: 64px; }

  .theme-grid,
  .theme-facts { grid-template-columns: 1fr; }

  .theme-grid { gap: 56px; }

  .theme-preview img { border-radius: 12px; }

  .theme-footer > div { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  h1 { font-size: 3rem; }

  .theme-nav { gap: 16px; }

  .theme-card-copy { padding-inline: 0; }

  .theme-preview figcaption { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
