:root {
  color-scheme: light dark;
  --ink: #101318;
  --ink-2: #181b21;
  --paper: #f2f5f2;
  --paper-2: #e5ebe8;
  --surface: #fffdf8;
  --muted: #596465;
  --line: #ccd6d2;
  --signal: #b9f06a;
  --teal: #28b8a7;
  --coral: #e9654f;
  --gold: #cba24a;
  --blue: #7785ff;
  --ink-rgb: 16, 19, 24;
  --signal-rgb: 185, 240, 106;
  --teal-rgb: 40, 184, 167;
  --coral-rgb: 233, 101, 79;
  --gold-rgb: 203, 162, 74;
  --blue-rgb: 119, 133, 255;
  --shadow: 0 28px 80px rgba(var(--ink-rgb), 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration-color: rgba(var(--teal-rgb), 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

a:hover {
  text-decoration-color: currentColor;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  background: var(--signal);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(var(--ink-rgb), 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--signal);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  font-weight: 680;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: #fff;
}

.hero {
  position: relative;
  min-height: 82svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.95) 0%, rgba(var(--ink-rgb), 0.84) 52%, rgba(var(--ink-rgb), 0.46) 100%),
    var(--ink);
  color: #fff;
  isolation: isolate;
}

#signalCanvas,
.hero-grid {
  position: absolute;
  inset: 0;
}

#signalCanvas {
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero-grid {
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent 0%, black 22%, black 100%);
}

.hero-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 128px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.58fr);
  align-items: center;
  gap: 58px;
}

.hero-copy-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow,
.contact-section .eyebrow {
  color: var(--signal);
}

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

h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.6rem;
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: 2.75rem;
  font-weight: 820;
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  font-size: 1.24rem;
  font-weight: 820;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 790px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.42rem;
  line-height: 1.5;
}

.portrait-system {
  position: relative;
  width: min(100%, 390px);
  margin: 0 0 0 auto;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--signal-rgb), 0.16), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
}

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

.portrait-system::before {
  inset: 26px 12px 12px 58px;
  border: 1px solid rgba(var(--signal-rgb), 0.34);
  border-radius: 8px;
  transform: translate(8px, 8px);
  z-index: -1;
}

.portrait-system::after {
  width: 58px;
  height: 58px;
  right: 10px;
  top: 42px;
  background:
    linear-gradient(90deg, rgba(var(--signal-rgb), 0.9) 2px, transparent 2px),
    linear-gradient(rgba(var(--signal-rgb), 0.9) 2px, transparent 2px);
  background-size: 14px 14px;
  opacity: 0.42;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #1f1d1a;
  aspect-ratio: 7 / 9;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 58%, rgba(var(--ink-rgb), 0.34) 100%),
    linear-gradient(90deg, rgba(var(--signal-rgb), 0.08), transparent 22%, transparent 78%, rgba(var(--coral-rgb), 0.1));
  mix-blend-mode: screen;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.96) contrast(1.04);
}

.portrait-system figcaption {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.portrait-system figcaption span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 820;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid rgba(var(--ink-rgb), 0.16);
  border-radius: 8px;
  font-weight: 820;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--signal);
  color: var(--ink);
  border-color: var(--signal);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.button.ghost {
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.signal-caption {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signal-caption span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 760;
}

.manifesto {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 34px;
  padding: 42px max(20px, calc((100% - 1180px) / 2));
  background: var(--signal);
  color: var(--ink);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.16);
}

.manifesto-label {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manifesto p {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.45;
  font-weight: 760;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 112px 0;
}

.split-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 64px;
  align-items: start;
}

.section-heading {
  position: sticky;
  top: 112px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.mode-grid {
  display: grid;
  gap: 16px;
}

.mode-card {
  position: relative;
  min-height: 210px;
  padding: 28px 28px 28px 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(var(--ink-rgb), 0.07);
}

.mode-card span {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-weight: 880;
}

.mode-card:nth-child(2) span {
  background: var(--teal);
}

.mode-card:nth-child(3) span {
  background: var(--coral);
}

.mode-card p,
.artifact p,
.repo-card p,
.syllabus-copy p,
.syllabus-grid p,
.note-grid p,
.proof-tile p {
  margin-bottom: 0;
  color: var(--muted);
}

.lab-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 112px;
}

.lab-intro {
  max-width: 860px;
  margin-bottom: 38px;
}

.lab-intro p {
  max-width: 760px;
  color: var(--muted);
  margin-bottom: 0;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.repo-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(var(--ink-rgb), 0.07);
}

.repo-card:nth-child(1) {
  border-top: 6px solid var(--blue);
}

.repo-card:nth-child(2) {
  border-top: 6px solid var(--teal);
}

.repo-card:nth-child(3) {
  border-top: 6px solid var(--gold);
}

.repo-kicker {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 54px;
  padding: 6px 10px;
  background: #eef4ef;
  border: 1px solid #d0ddd6;
  border-radius: 8px;
  color: #2c4038;
  font-size: 0.78rem;
  font-weight: 840;
}

.text-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  color: var(--blue);
  font-weight: 820;
}

.syllabus-section {
  padding: 100px max(20px, calc((100% - 1180px) / 2));
  background: #f3f1ff;
  border-top: 1px solid #d7d3f0;
  border-bottom: 1px solid #d7d3f0;
}

.syllabus-copy {
  max-width: 820px;
  margin-bottom: 34px;
}

.syllabus-copy .button {
  margin-top: 28px;
}

.syllabus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.syllabus-grid article {
  min-height: 255px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d7d3f0;
  border-radius: 8px;
}

.syllabus-grid span {
  display: block;
  margin-bottom: 42px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.video-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.video-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: var(--ink);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 820;
  text-decoration: none;
}

.proof-board {
  padding: 100px max(20px, calc((100% - 1180px) / 2));
  background: var(--ink);
  color: #fff;
}

.proof-intro {
  max-width: 780px;
  margin-bottom: 42px;
}

.proof-intro .eyebrow {
  color: var(--signal);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 0.85fr;
  gap: 16px;
}

.proof-tile {
  min-height: 250px;
  padding: 28px;
  background: #f8fbfa;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.proof-tile.large {
  grid-row: span 2;
  min-height: 516px;
  background:
    linear-gradient(135deg, rgba(var(--signal-rgb), 0.92), rgba(255, 255, 255, 0.92)),
    var(--signal);
}

.proof-tile.accent {
  background: #f8efe0;
}

.proof-tile.dark {
  background: var(--ink-2);
  color: #fff;
}

.proof-tile.dark p {
  color: rgba(255, 255, 255, 0.7);
}

.proof-number {
  display: block;
  margin-bottom: 34px;
  color: var(--coral);
  font-size: 4rem;
  font-weight: 900;
  line-height: 0.95;
}

.proof-tile.large .proof-number {
  color: var(--ink);
  font-size: 6.8rem;
}

.artifact-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 58px;
}

.artifact-list {
  border-top: 1px solid var(--line);
}

.artifact {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.artifact-marker {
  width: 14px;
  height: 14px;
  margin-top: 8px;
  background: var(--coral);
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(var(--coral-rgb), 0.14);
}

.artifact:nth-child(2) .artifact-marker {
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(var(--teal-rgb), 0.14);
}

.artifact:nth-child(3) .artifact-marker {
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(var(--blue-rgb), 0.12);
}

.artifact:nth-child(4) .artifact-marker {
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(var(--gold-rgb), 0.15);
}

.field-notes {
  padding: 100px max(20px, calc((100% - 1180px) / 2));
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.field-copy {
  max-width: 720px;
  margin-bottom: 42px;
}

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

.note-grid article {
  min-height: 230px;
  padding: 28px;
  background: transparent;
  border: 1px solid #b8c8c3;
  border-radius: 8px;
}

.note-grid article:nth-child(1) {
  border-top: 6px solid var(--coral);
}

.note-grid article:nth-child(2) {
  border-top: 6px solid var(--teal);
}

.note-grid article:nth-child(3) {
  border-top: 6px solid var(--gold);
}

.contact-section {
  width: min(1180px, calc(100% - 40px));
  margin: 92px auto 72px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 34px;
  align-items: center;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(var(--ink-rgb), 0.98), rgba(var(--ink-rgb), 0.88)),
    var(--ink);
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-section h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 2rem;
}

.contact-section .button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 44px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

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

  h2 {
    font-size: 2.25rem;
  }

  .hero-copy {
    font-size: 1.24rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .portrait-system {
    width: min(100%, 360px);
    margin: 0;
  }

  .manifesto,
  .split-section,
  .artifact-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .section-heading {
    position: static;
  }

  .repo-grid,
  .syllabus-grid,
  .proof-grid,
  .note-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proof-tile.large {
    grid-row: auto;
    min-height: 330px;
  }
}

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

  .nav {
    width: min(100% - 28px, 1180px);
    min-height: 66px;
  }

  .nav-links {
    gap: 14px;
    font-size: 0.86rem;
  }

  .hero {
    min-height: auto;
  }

  #signalCanvas {
    opacity: 0.5;
  }

  .hero-inner {
    width: min(100% - 28px, 1180px);
    padding: 86px 0 74px;
    gap: 34px;
  }

  h1 {
    font-size: 3.12rem;
    line-height: 1.02;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .portrait-system {
    width: min(100%, 320px);
  }

  .signal-caption {
    width: min(100% - 28px, 1180px);
  }

  .manifesto,
  .syllabus-section,
  .proof-board,
  .field-notes {
    padding-left: 14px;
    padding-right: 14px;
  }

  .manifesto {
    gap: 18px;
  }

  .manifesto p {
    font-size: 1.05rem;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 76px 0;
  }

  .lab-section {
    width: min(100% - 28px, 1180px);
    padding-bottom: 76px;
  }

  .repo-grid,
  .syllabus-grid {
    grid-template-columns: 1fr;
  }

  .repo-card,
  .syllabus-grid article {
    min-height: auto;
  }

  .repo-kicker,
  .syllabus-grid span {
    margin-bottom: 28px;
  }

  .mode-card {
    min-height: auto;
    padding: 24px;
  }

  .mode-card span {
    position: static;
    margin-bottom: 28px;
  }

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

  .proof-number,
  .proof-tile.large .proof-number {
    font-size: 3.7rem;
  }

  .contact-section {
    width: min(100% - 28px, 1180px);
    padding: 28px;
    margin-top: 72px;
  }

  .contact-section h2 {
    font-size: 1.62rem;
  }
}

@media (max-width: 480px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 2.52rem;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

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