:root {
  --bg: #0b0d11;
  --surface: #151920;
  --line: #2c3340;
  --text: #eef1f5;
  --muted: #9aa3b2;
  --accent: #7dff9a;
  --accent-ink: #06210e;
  --focus: #ffe08a;
  --radius: 14px;
  --radius-sm: 10px;
  --max: 70rem;
  --gutter: 1.25rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 3.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--accent); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 20;
  padding: .5rem .75rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: .75rem; }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 17, .96);
  border-bottom: 1px solid var(--line);
}

.header-inner { padding-block: .4rem; }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 3.5rem;
}

.brand {
  display: block;
  min-width: 0;
  max-width: min(16.5rem, calc(100% - 3.5rem));
  line-height: 0;
}

.brand img {
  width: 100%;
  height: auto;
  max-height: 4.25rem;
  object-fit: contain;
  object-position: left center;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -.35rem; }
.nav-toggle span::after { top: .35rem; }

.nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-toggle[aria-expanded="true"] span { background: transparent; }

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: none;
  padding: .35rem 0 .65rem;
}

.site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  display: grid;
  gap: .3rem;
  margin: 0;
  padding: .4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.site-nav a {
  display: block;
  padding: .75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent);
}

main { flex: 1; }

.hero {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}

.hero h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.7rem, 5.4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -.02em;
}

.home-crumb { padding-top: 1rem; }

.home-crumb + .hero { padding-top: 1.15rem; }

.lead {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  max-width: 38rem;
}

.page-head .lead {
  margin-bottom: 0;
  max-width: 48rem;
}

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

.hero-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem 1.15rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.section { padding: var(--space-5) 0 0; }

.section:last-child { padding-bottom: var(--space-6); }

.section > h2 {
  margin: 0 0 1.15rem;
  font-size: 1.25rem;
  letter-spacing: -.015em;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  align-items: flex-end;
  margin-bottom: var(--space-4);
}

.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -.015em;
}

.section-head p {
  margin: .35rem 0 0;
}

.section-head a {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.section-head a:hover { text-decoration: underline; }

.muted { color: var(--muted); }

.grid {
  display: grid;
  gap: 1.15rem;
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card a.cover { display: block; }

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.05rem 1.1rem 1.15rem;
  flex: 1;
}

.card-body > p:last-child:has(a) { margin-top: auto; }

.card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover { color: var(--accent); }

.meta {
  margin: 0;
  font-size: .875rem;
  color: var(--muted);
}

.tag {
  justify-self: start;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #1d2a22;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.page-head { padding: 1.75rem 0 0; }

.crumb {
  margin-bottom: .55rem;
  font-size: .8125rem;
}

.crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

.crumb li:not(:last-child)::after {
  content: "/";
  margin-left: .45rem;
  color: #5c6573;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover { color: var(--accent); }

.page-title {
  margin: 0 0 .5rem;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.page-head + .section { padding-top: 1.35rem; }

.section-label {
  margin: 0 0 1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1.15rem;
}

.page-toolbar .section-label { margin: 0; }

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.filter button {
  min-height: 2.4rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.filter button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.feed {
  display: grid;
  gap: 1.15rem;
}

.feed .prose { max-width: none; }

.feed .card-body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.feed .card-body > p:last-child:has(a) { margin-top: 0; }

.intro-panel {
  width: 100%;
  padding: 1.25rem 1.3rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.intro-panel h2 {
  margin: 0 0 .7rem;
  font-size: 1.15rem;
}

.intro-panel p {
  margin: 0 0 .7rem;
  color: var(--muted);
}

.intro-panel p:last-child { margin-bottom: 0; }

[id] { scroll-margin-top: 6rem; }

.prose { max-width: 46rem; }

.prose p {
  margin: 0 0 .85rem;
  color: var(--muted);
}

.prose p:last-child { margin-bottom: 0; }

.content-band {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.content-flow {
  display: grid;
  gap: 1.15rem;
  width: 100%;
  grid-template-columns: 1fr;
}

.content-flow article {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.2rem 1.25rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 3px 0 0 var(--accent);
}

.content-flow h2 {
  margin: 0 0 .7rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.content-flow p {
  margin: 0 0 .7rem;
  color: var(--muted);
}

.content-flow p:last-child { margin-bottom: 0; }

.form-panel {
  width: 100%;
  padding: 1.3rem 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-note { margin-top: 1rem; }

.form-row {
  display: grid;
  gap: var(--space-3);
}

.form {
  display: grid;
  gap: var(--space-3);
}

label { font-weight: 600; }

input,
select,
textarea {
  width: 100%;
  margin-top: .4rem;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #10141a;
  color: var(--text);
  font: inherit;
}

textarea { min-height: 8rem; resize: vertical; }

.form button {
  justify-self: start;
  cursor: pointer;
  margin-top: .25rem;
}

.status {
  margin: 0;
  min-height: 1.4rem;
  color: var(--accent);
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.5rem;
}

.footer-brand {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .1rem;
}

.site-footer a {
  display: inline-block;
  padding: .35rem .65rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
}

.site-footer a:hover { color: var(--accent); }

.footer-copy {
  margin: .7rem auto 0;
  font-size: .8rem;
  text-align: center;
}

@media (min-width: 48rem) {
  :root { --gutter: 1.75rem; }

  .nav-toggle { display: none; }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: .55rem;
  }

  .header-bar { min-height: 0; }

  .brand { max-width: 18.5rem; }

  .brand img { max-height: 4.75rem; }

  .site-nav {
    display: block;
    padding: 0;
  }

  .site-nav ul {
    display: flex;
    align-items: center;
    gap: .15rem;
    padding: .25rem;
    border-radius: 999px;
  }

  .site-nav a { padding: .45rem .85rem; }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(16rem, .9fr);
    gap: 2.5rem;
    align-items: center;
    padding: var(--space-6) 0;
  }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr 1fr; }

  .form-row { grid-template-columns: 1fr 1fr; }

  .feed .card {
    display: grid;
    grid-template-columns: minmax(14rem, 18rem) 1fr;
    height: auto;
  }

  .feed .card img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 12rem;
  }
}

@media (min-width: 64rem) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }

  .hero { gap: 3rem; }
}

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

.hidden { display: none !important; }
