:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --paper: #020617;
  --paper-strong: #0f172a;
  --white: #ffffff;
  --line: rgba(148, 163, 184, 0.18);
  --red: #a3e635;
  --teal: #2dd4bf;
  --gold: #38bdf8;
  --blue: #60a5fa;
  --plum: #c084fc;
  --card: rgba(15, 23, 42, 0.74);
  --card-strong: rgba(15, 23, 42, 0.92);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, rgba(163, 230, 53, 0.1), transparent 32%),
    linear-gradient(315deg, rgba(45, 212, 191, 0.08), transparent 38%),
    var(--paper);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

a,
img,
video,
svg {
  -webkit-user-drag: none;
  user-drag: none;
}

::selection {
  background: transparent;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  background: var(--red);
  color: #06110a;
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: url("/favicon.svg?v=mark-20260704") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 0 24px rgba(163, 230, 53, 0.14);
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #cbd5e1;
  font-size: 0.96rem;
}

nav a {
  text-decoration: none;
}

nav a:hover,
nav a:focus {
  color: var(--red);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(520px, 78svh, 760px);
  display: grid;
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 4rem);
  overflow: hidden;
  background: #020617;
  color: var(--white);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.56) 0%, rgba(2, 6, 23, 0.26) 46%, rgba(2, 6, 23, 0.04) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.22));
}

.hero::after {
  z-index: 3;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), var(--teal), transparent);
}

.hero-video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: brightness(0.86) saturate(1) contrast(1.04);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(840px, 100%);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.72);
}

.kicker,
.section-label,
.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .kicker {
  color: var(--red);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.2vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
  line-height: 1.18;
}

.lede {
  max-width: 780px;
  color: #cbd5e1;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.34;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--white);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button.primary {
  border-color: var(--red);
  background: var(--red);
  color: #07110d;
  box-shadow: 0 0 28px rgba(163, 230, 53, 0.24);
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
  border-color: rgba(163, 230, 53, 0.5);
  box-shadow: 0 0 30px rgba(163, 230, 53, 0.16);
}

.intro-band,
.featured-section,
.principles,
.math-band,
.about-strip,
.article-page,
.writing-page {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  margin-top: 2rem;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(163, 230, 53, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(45, 212, 191, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-heading {
  max-width: 620px;
}

.intro-band h2 {
  max-width: 620px;
  font-size: clamp(2rem, 3.3vw, 3.6rem);
  line-height: 1.06;
}

.intro-copy {
  align-self: center;
  justify-self: center;
  padding-top: 0;
}

.intro-copy > p {
  max-width: 720px;
  margin-inline: auto;
  color: #cbd5e1;
  font-size: 1.16rem;
  text-align: center;
}

.intro-thread-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.intro-thread {
  display: grid;
  gap: 0.35rem;
  min-height: 116px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.44);
}

.intro-thread span {
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-thread strong {
  color: var(--white);
  font-size: 1.08rem;
  line-height: 1.2;
}

.intro-thread p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.48;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.featured-section,
.principles,
.math-band,
.about-strip {
  padding: 4.5rem 0;
}

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

.garden-strip {
  margin-top: 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.garden-strip h3 {
  margin-bottom: 0.35rem;
}

.garden-strip p {
  max-width: 800px;
  color: #cbd5e1;
}

.garden-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.garden-link {
  display: block;
  min-height: 100%;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.42);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.garden-link:hover,
.garden-link:focus {
  border-color: rgba(163, 230, 53, 0.38);
  background: rgba(15, 23, 42, 0.86);
  transform: translateY(-1px);
}

.garden-link time,
.garden-link span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.garden-link strong {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.2;
}

.story-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.story-card:hover,
.story-card:focus-within {
  border-color: rgba(163, 230, 53, 0.32);
  background: var(--card-strong);
  transform: translateY(-2px);
}

.story-card-large {
  grid-row: span 2;
}

.story-card-link {
  display: grid;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
}

.story-card-link:hover h3,
.story-card-link:focus h3 {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

.story-thumb {
  min-height: 190px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.story-card-large .story-thumb {
  min-height: 310px;
}

.image-thumb {
  background:
    linear-gradient(rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.42)),
    var(--thumb-image) center / cover no-repeat;
}

.care-thumb {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(163, 230, 53, 0.1), rgba(45, 212, 191, 0.14)),
    var(--paper-strong);
}

.care-thumb span {
  width: 2.3rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--red), var(--teal));
}

.story-card-body {
  padding: 1.35rem;
}

.story-card-body p:last-child {
  margin-bottom: 0;
}

.story-meta {
  display: block;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.text-link {
  color: var(--white);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.principles {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.principle-grid article {
  padding: 1.35rem;
  border-left: 6px solid var(--teal);
  background: var(--card);
}

.principle-grid article:nth-child(2) {
  border-left-color: var(--gold);
}

.principle-grid article:nth-child(3) {
  border-left-color: var(--blue);
}

.about-strip {
  border-top: 1px solid var(--line);
}

.about-strip p {
  max-width: 780px;
  font-size: 1.12rem;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, auto);
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.64);
}

.site-footer p {
  margin: 0;
}

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

.video-credit {
  grid-column: 1 / -1;
  max-width: 960px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.footer-credit {
  grid-column: 1 / -1;
  max-width: 960px;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.55;
}

.footer-credit span {
  display: block;
}

.writing-page,
.article-page {
  padding: 4.5rem 0;
}

.page-kicker {
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  max-width: 920px;
  font-size: clamp(3rem, 8vw, 7rem);
  overflow-wrap: break-word;
}

.page-intro {
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.post-list {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.garden-note {
  max-width: 860px;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border-left: 6px solid var(--teal);
  background: var(--card);
  color: #cbd5e1;
  box-shadow: var(--shadow);
}

.post-listing {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.post-listing:hover,
.post-listing:focus-within {
  border-color: rgba(163, 230, 53, 0.32);
  background: var(--card-strong);
  transform: translateY(-1px);
}

.post-listing time,
.post-listing .post-type {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 760;
}

.post-listing h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.5rem, 2.6vw, 2.6rem);
}

.post-listing p {
  max-width: 760px;
  margin-bottom: 0.8rem;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(160px, 0.22fr) minmax(0, 760px);
  gap: 2rem;
}

.article-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-content {
  min-width: 0;
  font-size: 1.1rem;
}

.article-content .page-title {
  font-size: 4.25rem;
  line-height: 0.95;
}

.article-content .lead {
  color: #e2e8f0;
  font-size: 1.32rem;
  line-height: 1.45;
}

.article-content h2 {
  margin-top: 3rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.article-content h3 {
  margin-top: 2rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.article-content p,
.article-content li {
  max-width: 760px;
}

.article-content code {
  padding: 0.12rem 0.3rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: #d9f99d;
}

.note {
  padding: 1rem;
  border-left: 5px solid var(--gold);
  background: var(--card);
}

.article-callout,
.source-note,
.link-panel,
.resource-box {
  max-width: 100%;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.article-callout {
  border-left: 6px solid var(--teal);
}

.article-callout.gold {
  border-left-color: var(--gold);
}

.article-callout.blue {
  border-left-color: var(--blue);
}

.source-note {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 1.3rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.code-block {
  max-width: 100%;
  margin: 1.25rem 0;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #020617;
  color: #d9f99d;
  font-size: 0.92rem;
  line-height: 1.55;
}

.code-block code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.math-block {
  max-width: 100%;
  margin: 1.5rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.article-figure {
  max-width: 100%;
  margin: 1.75rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.article-figure img {
  display: block;
  width: 100%;
}

.article-figure figcaption {
  padding: 0.8rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.resource-box {
  margin: 1.5rem 0;
}

.resource-list {
  display: grid;
  gap: 0.8rem;
  padding-left: 1.2rem;
}

.profile-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.profile-links a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.profile-links svg,
.footer-links svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-links a:hover,
.profile-links a:focus,
.footer-links a:hover,
.footer-links a:focus,
.garden-link:hover strong,
.garden-link:focus strong {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.12)),
      linear-gradient(90deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.02));
  }

  .intro-band,
  .math-band,
  .article-shell,
  .post-listing {
    grid-template-columns: 1fr;
  }

  .intro-heading {
    position: static;
  }

  .feature-grid,
  .principle-grid,
  .intro-thread-grid,
  .garden-links {
    grid-template-columns: 1fr;
  }

  .story-card-large {
    grid-row: auto;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .video-credit {
    grid-column: auto;
  }

  .article-content .page-title {
    font-size: 3.2rem;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  h1 {
    font-size: 4rem;
  }

  .article-content .page-title {
    font-size: 2.65rem;
  }
}
