:root {
  --ink: #c8ffd2;
  --paper: #030704;
  --paper-strong: #071108;
  --muted: #88c992;
  --line: #1d6b2a;
  --charcoal: #010301;
  --charcoal-2: #071508;
  --amber: #ffd166;
  --teal: #39ff6a;
  --crimson: #ff6f61;
  --moss: #72e884;
  --white: #ffffff;
  --terminal-glow: 0 0 18px rgba(57, 255, 106, 0.18);
  --shadow: 0 0 0 1px rgba(57, 255, 106, 0.16), 0 18px 45px rgba(0, 0, 0, 0.58);
  font-family: "Lucida Console", "Courier New", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  text-shadow: 0 0 7px rgba(57, 255, 106, 0.2);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background:
    linear-gradient(rgba(57, 255, 106, 0.04) 50%, rgba(0, 0, 0, 0.16) 50%),
    radial-gradient(circle at 50% 30%, rgba(57, 255, 106, 0.08), transparent 58%);
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(16, 18, 22, 0.94);
  color: var(--ink);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--terminal-glow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #061207;
  color: var(--teal);
  border: 1px solid var(--teal);
  box-shadow: inset 0 0 18px rgba(57, 255, 106, 0.18), var(--terminal-glow);
  font-size: 0.8rem;
  letter-spacing: 0;
}

.brand-name {
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 22px);
  font-size: 0.93rem;
}

.site-nav a {
  color: rgba(200, 255, 210, 0.82);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal);
  text-shadow: 0 0 12px rgba(57, 255, 106, 0.7);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(57, 255, 106, 0.42);
  border-radius: 8px;
  background: transparent;
  padding: 10px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--teal);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--charcoal);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 3, 1, 0.98) 0%, rgba(1, 8, 2, 0.88) 42%, rgba(1, 8, 2, 0.54) 74%),
    linear-gradient(0deg, rgba(1, 3, 1, 0.95) 0%, rgba(1, 3, 1, 0.08) 48%),
    linear-gradient(rgba(57, 255, 106, 0.08), rgba(57, 255, 106, 0.08));
}

.hero-content {
  position: relative;
  max-width: 760px;
  padding: clamp(72px, 11vw, 150px) clamp(20px, 5vw, 72px);
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3.4rem, 8vw, 7.25rem);
  color: var(--teal);
  text-shadow: 0 0 20px rgba(57, 255, 106, 0.42);
}

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

h3 {
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 58ch;
  color: rgba(200, 255, 210, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--teal);
  color: #031006;
  box-shadow: var(--terminal-glow);
}

.button.ghost {
  border: 1px solid rgba(57, 255, 106, 0.48);
  color: var(--ink);
}

.button.ghost.dark {
  border-color: var(--line);
  color: var(--teal);
}

.section {
  padding: clamp(54px, 8vw, 104px) clamp(18px, 4vw, 54px);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(850px, 100%);
}

.intro-band {
  background: var(--paper-strong);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.split,
.cta-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 6vw, 84px);
  align-items: center;
}

.split p:last-child,
.page-hero p,
.content-grid p,
.feature-row p,
.journal-entry p,
.contact-grid p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.section-heading {
  margin-bottom: 28px;
}

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

.project-card,
.content-grid article,
.contact-grid article,
.journal-entry,
.gallery-grid figure,
.placeholder-shot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.project-card {
  padding: 26px;
  border-top: 5px solid var(--teal);
}

.project-card.accent-red {
  border-top-color: var(--amber);
}

.project-card.accent-gold {
  border-top-color: #9dff57;
}

.project-card p,
.project-card a {
  line-height: 1.65;
}

.project-kicker {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.project-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--teal);
  font-weight: 800;
}

.download-table a {
  color: var(--teal);
  font-weight: 800;
}

.text-link {
  color: var(--teal);
  font-weight: 800;
}

.link-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.link-list a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
}

.dark-band {
  background: var(--charcoal);
  color: var(--white);
}

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

.timeline div {
  min-height: 210px;
  padding: 26px;
  border-radius: 8px;
  background: var(--charcoal-2);
  border: 1px solid rgba(57, 255, 106, 0.24);
}

.timeline span {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--amber);
  font-weight: 900;
}

.timeline p {
  color: rgba(200, 255, 210, 0.72);
  line-height: 1.7;
}

.page-hero {
  padding: clamp(80px, 11vw, 148px) clamp(18px, 4vw, 54px);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(1, 3, 1, 0.98), rgba(3, 24, 6, 0.9)),
    url("../images/hero-workshop.png") center / cover;
}

.page-hero.compact {
  padding-block: clamp(66px, 9vw, 110px);
}

.page-hero.stem-hero {
  min-height: min(720px, calc(100vh - 72px));
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(1, 3, 1, 0.96) 0%, rgba(1, 8, 2, 0.82) 42%, rgba(1, 8, 2, 0.32) 78%),
    linear-gradient(0deg, rgba(1, 3, 1, 0.94) 0%, rgba(1, 3, 1, 0.08) 55%),
    url("../images/stem-lightstar-hero.png") center / cover;
}

.page-hero h1 {
  max-width: 14ch;
}

.page-hero p {
  max-width: 720px;
  color: rgba(200, 255, 210, 0.82);
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.feature-row:first-child {
  border-top: 1px solid var(--line);
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid article,
.contact-grid article,
.journal-entry {
  padding: 28px;
}

.journal-list {
  display: grid;
  gap: 18px;
}

.journal-entry time {
  display: block;
  margin-bottom: 10px;
  color: var(--amber);
  font-weight: 900;
}

.download-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.table-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 16px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.table-row:first-child {
  border-top: 0;
}

.table-row.header {
  background: var(--charcoal);
  color: var(--teal);
  font-weight: 900;
}

.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
}

.gallery-grid img,
.placeholder-shot {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 700;
}

.placeholder-shot {
  display: grid;
  place-items: center;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(57, 255, 106, 0.13), rgba(255, 209, 102, 0.09)),
    var(--paper-strong);
  color: var(--muted);
  font-weight: 900;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.project-layout p,
.doc-content p,
.doc-content li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.04rem;
}

.project-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.project-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-media figcaption {
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 700;
}

.inline-actions {
  margin-top: 24px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.doc-nav {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.doc-nav a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 800;
}

.doc-content {
  display: grid;
  gap: 28px;
}

.doc-content section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.doc-content pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--charcoal);
  color: var(--teal);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rule-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(57, 255, 106, 0.04);
}

.number-list {
  padding-left: 24px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 54px);
  background: var(--charcoal);
  color: rgba(200, 255, 210, 0.74);
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  gap: 16px;
}

.site-footer a {
  color: var(--teal);
  text-decoration: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 18px 20px;
    background: var(--charcoal);
  }

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

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .split,
  .cta-row,
  .project-grid,
  .timeline,
  .content-grid,
  .contact-grid,
  .gallery-grid,
  .project-layout,
  .doc-layout,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .doc-nav {
    position: static;
  }

  .hero {
    min-height: 680px;
  }

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

@media (max-width: 620px) {
  .brand-name {
    max-width: 150px;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-content {
    padding-top: 110px;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .site-footer {
    flex-direction: column;
  }
}
