:root {
  color-scheme: light dark;
  --page: #f4f2ec;
  --page-raised: #faf9f6;
  --tint: #e8eef8;
  --ink: #17181b;
  --muted: #5f626a;
  --subtle: #686c74;
  --line: #d4d1c9;
  --line-strong: #b8b6b0;
  --accent: #1478e8;
  --accent-strong: #075fbe;
  --accent-soft: #dbeafe;
  --energy: #ff9f0a;
  --movement: #25bf5a;
  --on-accent: #ffffff;
  --header: #f4f2ec;
  --shadow: 0 24px 70px rgba(33, 34, 38, 0.1);
  --header-height: 74px;
  --radius-small: 10px;
  --radius-medium: 20px;
  --radius-large: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111317;
    --page-raised: #181b21;
    --tint: #171d29;
    --ink: #f2efe8;
    --muted: #b8bac2;
    --subtle: #989ca7;
    --line: #30343d;
    --line-strong: #464b57;
    --accent: #61a7ff;
    --accent-strong: #8bbdff;
    --accent-soft: #18345c;
    --energy: #ffb33d;
    --movement: #4ed67b;
    --on-accent: #081526;
    --header: #111317;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
p,
figure,
dl,
dd,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  width: min(calc(100% - 2rem), 76rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-small);
  background: var(--ink);
  color: var(--page);
  font-weight: 700;
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--header) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  position: relative;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.wordmark > span:first-child {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--page);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.wordmark-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1.1;
}

.wordmark-title {
  font-weight: 780;
}

.wordmark-byline {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.desktop-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 650;
}

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

.desktop-nav .nav-github {
  padding-inline: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
}

.mobile-navigation {
  display: none;
}

.mobile-navigation summary {
  list-style: none;
}

.mobile-navigation summary::-webkit-details-marker {
  display: none;
}

.mobile-navigation[open] .menu-lines i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.mobile-navigation[open] .menu-lines i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  align-items: center;
  gap: clamp(3rem, 5vw, 6rem);
  padding-block: clamp(4.5rem, 8vw, 7.5rem) 2.5rem;
}

.hero-copy {
  max-width: 58rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 16ch;
  margin-top: 1.4rem;
  font-size: clamp(2.7rem, 5.9vw, 5.45rem);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.hero h1 span {
  color: var(--muted);
  font-weight: 540;
}

.hero-summary {
  max-width: 43rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  text-align: center;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 750;
}

.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--page-raised);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.scope-note {
  max-width: 40rem;
  margin-top: 1.25rem;
  color: var(--subtle);
  font-size: 0.9rem;
}

.hero-visual {
  width: min(100%, 20rem);
  justify-self: center;
}

.device-frame,
.gallery-device {
  overflow: hidden;
  border: 9px solid var(--ink);
  border-radius: 2.4rem;
  background: #060708;
  box-shadow: var(--shadow);
}

.device-frame img,
.gallery-device img {
  width: 100%;
  height: auto;
}

.hero-visual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-visual figcaption span:first-child {
  color: var(--ink);
  font-weight: 750;
}

.hero-meta {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-meta div {
  padding: 1.25rem 1.5rem;
}

.hero-meta div + div {
  border-left: 1px solid var(--line);
}

.hero-meta dt {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-meta dd {
  margin-top: 0.25rem;
  font-weight: 720;
}

.section {
  padding-block: clamp(5.5rem, 9vw, 9rem);
}

.section-heading {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: start;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.section-number {
  padding-top: 0.15rem;
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.section-heading h2,
.status-grid h2,
.lineage-grid h2,
.contact-grid h2 {
  max-width: 21ch;
  margin-top: 0.8rem;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.overview-copy {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.overview-lede {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.overview-copy > p:not(.overview-lede) {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.status-note {
  margin-top: 2.25rem;
  padding: 1.3rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.status-note > span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-note p {
  margin-top: 0.55rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.project-details {
  border-top: 1px solid var(--line-strong);
}

.project-details > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.36fr) minmax(0, 0.64fr);
  gap: 2rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--line);
}

.project-details dt {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-details dd {
  color: var(--muted);
}

.loop-section,
.gallery-section,
.build-section {
  background: var(--tint);
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.loop-card {
  position: relative;
  min-height: 22rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--page-raised);
}

.loop-card:nth-child(1) {
  border-top: 4px solid var(--movement);
}

.loop-card:nth-child(2) {
  border-top: 4px solid var(--energy);
}

.loop-card:nth-child(3) {
  border-top: 4px solid var(--accent);
}

.loop-number,
.feature-number {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.loop-symbol {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-top: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 800;
}

.loop-card:nth-child(1) .loop-symbol {
  background: color-mix(in srgb, var(--movement) 16%, transparent);
  color: var(--movement);
}

.loop-card:nth-child(2) .loop-symbol {
  background: color-mix(in srgb, var(--energy) 18%, transparent);
  color: var(--energy);
}

.loop-card h3,
.feature-card h3 {
  max-width: 14ch;
  margin-top: 1.5rem;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.loop-card > p,
.feature-card > p:last-child {
  margin-top: 1rem;
  color: var(--muted);
}

.formula-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: 1rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: var(--radius-medium);
  background: var(--ink);
  color: var(--page);
}

.formula-card .eyebrow {
  color: color-mix(in srgb, var(--energy) 78%, white);
}

.formula {
  max-width: 19ch;
  margin-top: 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.formula-card > p {
  color: color-mix(in srgb, var(--page) 76%, transparent);
  font-size: 1.05rem;
}

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

.feature-card {
  min-height: 18rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--page-raised);
}

.feature-card h3 {
  margin-top: 3.5rem;
}

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

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

.gallery-card:nth-child(even) {
  padding-top: 3rem;
}

.gallery-device {
  width: min(100%, 16rem);
  margin-inline: auto;
  border-width: 7px;
  border-radius: 2rem;
}

.gallery-card figcaption {
  max-width: 17rem;
  margin: 1.3rem auto 0;
}

.gallery-card figcaption span {
  font-weight: 760;
}

.gallery-card figcaption p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.build-intro > p {
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin-top: 2rem;
  list-style: none;
}

.tech-tags li {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--page-raised);
  font-size: 0.82rem;
  font-weight: 700;
}

.lesson-list {
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.lesson-list li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.lesson-list li > span {
  padding-top: 0.15rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.lesson-list h3 {
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}

.lesson-list p {
  margin-top: 0.45rem;
  color: var(--muted);
}

.status-section {
  border-top: 1px solid var(--line);
}

.status-grid,
.lineage-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(3rem, 8vw, 8rem);
}

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

.status-columns > div {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--page-raised);
}

.status-columns h3 {
  font-size: 1rem;
}

.status-columns ul {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.15rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.status-columns li::marker {
  color: var(--accent);
}

.lineage-section {
  background: var(--ink);
  color: var(--page);
}

.lineage-section .eyebrow {
  color: color-mix(in srgb, var(--accent) 72%, white);
}

.lineage-copy > p {
  color: color-mix(in srgb, var(--page) 76%, transparent);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.button-light {
  background: var(--page);
  color: var(--ink);
}

.button-light:hover {
  background: color-mix(in srgb, var(--page) 88%, transparent);
}

.button-outline-light {
  border-color: color-mix(in srgb, var(--page) 44%, transparent);
  color: var(--page);
}

.button-outline-light:hover {
  border-color: var(--page);
}

.contact-section {
  border-top: 1px solid var(--line);
}

.contact-copy {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-links {
  display: grid;
  margin-top: 2rem;
  border-top: 1px solid var(--line-strong);
}

.contact-links a {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 750;
}

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

.contact-links a span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
  text-align: right;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer .shell {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer a {
  text-decoration: none;
  font-weight: 700;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 0.85rem;
  }

  .desktop-nav a {
    font-size: 0.81rem;
  }

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

  .gallery-card:nth-child(even) {
    padding-top: 0;
  }
}

@media (max-width: 940px) {
  .desktop-nav {
    display: none;
  }

  .mobile-navigation {
    display: block;
  }

  .menu-button {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 750;
  }

  .menu-lines {
    display: grid;
    gap: 5px;
    width: 18px;
  }

  .menu-lines i {
    display: block;
    height: 1.5px;
    background: var(--ink);
    transition: transform 160ms ease;
  }

  .mobile-menu {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: grid;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--header);
    box-shadow: var(--shadow);
  }

  .mobile-menu a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    font-weight: 700;
  }

  .mobile-menu a:last-child {
    border-bottom: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.58fr);
    gap: 2.5rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 7.2vw, 4.8rem);
  }

  .overview-grid,
  .build-grid,
  .status-grid,
  .lineage-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .overview-copy {
    position: static;
  }

  .loop-card {
    min-height: 20rem;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 4rem;
  }

  .hero-visual {
    width: min(78%, 19rem);
    justify-self: start;
  }

  .hero-meta {
    margin-top: 2rem;
  }

  .loop-grid,
  .feature-grid,
  .gallery-grid,
  .status-columns {
    grid-template-columns: 1fr;
  }

  .loop-card {
    min-height: 0;
  }

  .formula-card {
    grid-template-columns: 1fr;
  }

  .gallery-card + .gallery-card {
    margin-top: 2.5rem;
  }

  .gallery-device {
    width: min(78%, 17rem);
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 68px;
  }

  .shell {
    width: min(calc(100% - 1.4rem), 76rem);
  }

  .wordmark-byline {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 13vw, 3.8rem);
  }

  .action-row,
  .action-row .button {
    width: 100%;
  }

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

  .hero-meta div {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    padding: 1rem 0;
  }

  .hero-meta div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-meta dd {
    margin-top: 0;
  }

  .section-heading {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .section-heading h2,
  .status-grid h2,
  .lineage-grid h2,
  .contact-grid h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .project-details > div {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .loop-card,
  .feature-card,
  .formula-card,
  .status-columns > div {
    padding: 1.4rem;
  }

  .lesson-list li {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .contact-links a {
    display: grid;
    gap: 0.25rem;
    padding-block: 0.8rem;
  }

  .contact-links a span {
    text-align: left;
  }

  .site-footer .shell {
    display: grid;
    justify-content: start;
    gap: 0.5rem;
    padding-block: 1.25rem;
  }
}

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

  .menu-lines i {
    transition: none;
  }
}
