/* ============================================================
   Atypisch.org — Main stylesheet
   Based on Atypisch Design System
   ============================================================ */

/* --- Fonts -------------------------------------------------- */
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/noto-sans-1.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/noto-sans-2.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/noto-sans-3.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/noto-sans-4.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/noto-serif-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/noto-serif-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/noto-serif-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-500.woff2') format('woff2');
}

/* --- Keyframes --------------------------------------------- */
@keyframes atypDrift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
@keyframes atypGlow {
  from { transform: translate3d(-7%, -5%, 0) scale(1); opacity: 0.55; }
  to   { transform: translate3d(7%, 5%, 0) scale(1.15); opacity: 0.8; }
}
@keyframes atypIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes atypSheet {
  from { opacity: 0; transform: translateY(-10px); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@keyframes atypSheetItem {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* --- Reset & base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #374151;
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  [data-reveal] { animation: none; opacity: 1; transform: none; }
}

a { color: #0ea5e9; text-decoration: none; }
a:hover { color: #0284c7; }
::selection { background: #cfe9f8; }
:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
dl { margin: 0; }
table { border-collapse: collapse; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* --- Reveal animation -------------------------------------- */
[data-reveal] {
  animation: atypIn 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}
[data-reveal-delay="90"]  { animation-delay: 90ms; }
[data-reveal-delay="180"] { animation-delay: 180ms; }

/* --- Layout helpers ---------------------------------------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 25px;
}

/* --- Gradient top bar -------------------------------------- */
.site-top-bar {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #26a69a 0%, #5c6bc0 32%, #8e24aa 58%, #d81b60 82%, #e91e63 100%);
}

/* --- Header ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 25px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex: none;
  color: inherit;
}

.site-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.site-logo__suffix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1rem;
  white-space: nowrap;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  color: #374151;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #0ea5e9;
}

.site-header__spacer { flex: 1; }

.site-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #6b7280;
}

.site-header__meta a { color: #6b7280; }
.site-header__meta a:hover { color: #0ea5e9; }
.site-header__meta .sep { color: #cbd5e1; }
.site-header__meta .lang-active { color: #1f2937; font-weight: 500; }
.site-header__meta .lang-inactive { color: #9ca3af; }

/* Burger button */
.site-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: none;
}

.site-burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #1f2937;
  transition: transform 220ms cubic-bezier(0.2, 0.75, 0.2, 1), opacity 160ms;
}

/* Mobile menu */
.site-mobile-menu {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.75rem 25px 1.5rem;
  flex-direction: column;
  animation: atypSheet 280ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.site-mobile-menu.is-open { display: flex; }

.site-mobile-menu a {
  padding: 0.9rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: #1f2937;
  border-bottom: 1px solid #eef1f4;
}

.site-mobile-menu a:last-of-type { border-bottom: 0; }

.site-mobile-menu__meta {
  display: flex;
  gap: 1.25rem;
  padding-top: 1.15rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #6b7280;
}

.site-mobile-menu__meta a { color: #6b7280; }

/* Burger animation states */
.site-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-burger.is-open span:nth-child(2) { opacity: 0; }
.site-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Responsive: show burger, hide desktop nav */
@media (max-width: 960px) {
  .site-nav,
  .site-header__meta { display: none; }
  .site-burger { display: flex; }
}

/* --- Footer ------------------------------------------------ */
.site-footer {
  border-top: 1px solid #e2e8f0;
  background: #eef1f4;
  margin-top: auto;
}

.site-footer__grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 25px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer__logo img {
  height: 20px;
  width: auto;
  display: block;
  margin-bottom: 0.85rem;
}

.site-footer__tagline {
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.6;
  max-width: 26ch;
}

.site-footer__col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.site-footer__col {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 2.1;
}

.site-footer__col a { color: #6b7280; }
.site-footer__col a:hover { color: #0ea5e9; }

.site-footer__bottom {
  border-top: 1px solid #cbd5e1;
}

.site-footer__bottom-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 25px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #9ca3af;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* --- Hero section ------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(128deg, #020617 0%, #0c1929 22%, #164e63 44%, #26a69a 62%, #5c6bc0 78%, #d81b60 92%, #e91e63 100%);
  background-size: 220% 220%;
  animation: atypDrift 14s ease-in-out infinite alternate;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(128deg, rgba(2,6,23,0.72) 0%, rgba(2,6,23,0.5) 45%, rgba(2,6,23,0.28) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 5.5rem 25px 4rem;
}

.hero__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248,250,252,0.72);
  margin-bottom: 1.5rem;
  animation: atypIn 400ms cubic-bezier(0.2, 0.75, 0.2, 1) 120ms both;
}

.hero__h1 {
  font-family: Inter, 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin-bottom: 1.5rem;
  max-width: 21ch;
  text-wrap: balance;
  animation: atypIn 400ms cubic-bezier(0.2, 0.75, 0.2, 1) 260ms both;
}

.hero__desc {
  max-width: 40rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(248,250,252,0.82);
  margin-bottom: 2.25rem;
  animation: atypIn 400ms cubic-bezier(0.2, 0.75, 0.2, 1) 390ms both;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
  animation: atypIn 400ms cubic-bezier(0.2, 0.75, 0.2, 1) 500ms both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: #2dd4bf;
  color: #050f14;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 220ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.btn-primary:hover {
  background: #5eead4;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(45,212,191,0.35);
  color: #050f14;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 220ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.45);
  color: #f8fafc;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem;
  animation: atypIn 400ms cubic-bezier(0.2, 0.75, 0.2, 1) 620ms both;
}

.hero__stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 1.35rem;
}

.hero__stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248,250,252,0.6);
  margin-bottom: 0.5rem;
}

.hero__stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
}

/* --- Quote block ------------------------------------------- */
.quote-block {
  background: #eef1f4;
  border-bottom: 1px solid #e2e8f0;
}

.quote-block__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 25px;
}

.quote-block__text {
  max-width: 46rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #374151;
  border-left: 2px solid #cbd5e1;
  padding-left: 1.25rem;
}

/* --- Section headers --------------------------------------- */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  color: #1f2937;
}

.section-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #0ea5e9;
}

.section-desc {
  max-width: 42rem;
  color: #6b7280;
  margin-bottom: 2.5rem;
}

/* --- Layer label ------------------------------------------- */
.layer-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.layer-label__text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #9ca3af;
  text-transform: uppercase;
}

.layer-label__line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* --- Ecosystem card ---------------------------------------- */
.eco-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.eco-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .eco-grid-3,
  .eco-grid-2 { grid-template-columns: 1fr; }
}

.eco-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.1rem 1.15rem 1rem;
  color: #374151;
  transition: opacity 160ms cubic-bezier(0.2, 0.75, 0.2, 1), border-color 160ms cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 160ms;
}

.eco-card:hover {
  box-shadow: 0 4px 24px rgba(15,23,42,0.06);
}

.eco-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.eco-card__name {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
}

.eco-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: none;
}

.dot-live   { background: #22c55e; }
.dot-beta   { background: #f59e0b; }
.dot-dev    { background: #0ea5e9; }
.dot-concept { background: #9ca3af; }

.eco-card__tag {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #6b7280;
  min-height: 2.6em;
}

.eco-card__status {
  margin-top: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

.status-live   { color: #15803d; }
.status-beta   { color: #b45309; }
.status-dev    { color: #0369a1; }
.status-concept { color: #6b7280; }

/* --- Stack info bar ---------------------------------------- */
.stack-bar {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2rem;
}

/* --- Status legend ----------------------------------------- */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.status-legend__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}

/* --- Ecosystem SVG connector area -------------------------- */
.eco-connector {
  position: relative;
}

.eco-connector svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.eco-connector__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
}

.eco-connector__label-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #9ca3af;
  text-transform: uppercase;
  background: #ffffff;
  padding-right: 0.75rem;
}

/* --- Screenshot cards -------------------------------------- */
.shots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.shot-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 220ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.shot-card:hover { box-shadow: 0 4px 24px rgba(15,23,42,0.06); }

.shot-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  border-bottom: 1px solid #e2e8f0;
  background: #eef1f4;
  overflow: hidden;
}

.shot-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.shot-card__caption {
  padding: 1.15rem 1.35rem 1.35rem;
}

.shot-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.shot-card__name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1f2937;
}

.shot-card__role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #9ca3af;
}

.shot-card__desc {
  font-size: 0.93rem;
  line-height: 1.55;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.shot-card__domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: #0ea5e9;
}

/* --- Concept cards ----------------------------------------- */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.concept-card {
  background: #f4f6f8;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.35rem;
}

.concept-card--white { background: #ffffff; }

.concept-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.concept-card__name {
  font-weight: 600;
  font-size: 1.15rem;
  color: #1f2937;
}

.concept-card__domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #9ca3af;
  margin-bottom: 0.85rem;
}

.concept-card__desc {
  font-size: 0.93rem;
  line-height: 1.6;
  color: #6b7280;
}

/* --- Side-by-side section ---------------------------------- */
.side-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
}

@media (max-width: 720px) {
  .side-layout { grid-template-columns: 1fr; }
}

.side-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

/* --- Changelog list ---------------------------------------- */
.changelog-list { border-top: 1px solid #e2e8f0; }

.changelog-item {
  display: grid;
  grid-template-columns: 120px 100px 1fr;
  gap: 0.35rem 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid #e2e8f0;
  align-items: baseline;
}

@media (max-width: 600px) {
  .changelog-item { grid-template-columns: 1fr; }
}

.changelog-item__date,
.changelog-item__product {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.changelog-item__date    { color: #9ca3af; }
.changelog-item__product { color: #374151; }
.changelog-item__text    { color: #374151; }

/* --- Lab list ---------------------------------------------- */
.lab-list { border-top: 1px solid #cbd5e1; }

.lab-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 2rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid #e2e8f0;
  align-items: start;
  color: #374151;
}

@media (max-width: 600px) {
  .lab-entry { grid-template-columns: 1fr; }
}

.lab-entry__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: #9ca3af;
  line-height: 1.9;
}

.lab-entry__title {
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin-bottom: 0.5rem;
  text-wrap: pretty;
}

.lab-entry__title a { color: #1f2937; }
.lab-entry__title a:hover { color: #0ea5e9; }

.lab-entry__excerpt {
  color: #6b7280;
  line-height: 1.6;
}

/* Lab type colors */
.type-onderzoek { color: #0369a1; }
.type-rfc       { color: #b45309; }
.type-artikel   { color: #6b7280; }

/* --- Lab filter buttons ------------------------------------ */
.lab-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.lab-filter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 0.5rem 1rem;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: transparent;
  color: #6b7280;
  transition: all 160ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.lab-filter-btn.is-active,
.lab-filter-btn:hover {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0369a1;
}

/* --- Open source table ------------------------------------- */
.oss-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.oss-table th {
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0 1rem 0.6rem 0;
  border-bottom: 1px solid #cbd5e1;
}

.oss-table th:last-child { padding-right: 0; }

.oss-table td {
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
}

.oss-table td:last-child { padding-right: 0; }
.oss-table td:first-child { font-size: 0.85rem; }
.oss-table td:not(:first-child) { font-size: 0.8rem; color: #6b7280; }
.oss-table td:last-child { color: #9ca3af; }
.oss-table-wrap { overflow-x: auto; }

/* --- Info cards -------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem;
}

.info-card__title {
  font-weight: 600;
  font-size: 1.2rem;
  color: #1f2937;
  margin-bottom: 0.6rem;
}

.info-card__desc {
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.info-card__link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

/* --- Manifest principles ----------------------------------- */
.principle-grid {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
}

.principle__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #9ca3af;
  padding-top: 0.4rem;
}

.principle__title {
  font-family: Inter, 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin-bottom: 0.6rem;
  text-wrap: pretty;
}

.principle__body {
  color: #6b7280;
  line-height: 1.6;
}

/* --- Ecosystem detail -------------------------------------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
}

.detail-aside {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.6rem 1.7rem;
  position: sticky;
  top: 88px;
}

.detail-aside__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 1.1rem;
}

.detail-aside dl {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0;
}

.detail-fact {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem 1.1rem;
  align-items: baseline;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

.detail-aside dt {
  color: #9ca3af;
  margin: 0;
}

.detail-aside dd {
  margin: 0;
  color: #1f2937;
  font-weight: 500;
  word-break: break-word;
}

.detail-aside dd.dd-live { color: #15803d; }

.detail-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin: 0.25rem 0 0.5rem;
}

.detail-cta-domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #6b7280;
  text-decoration: none;
}

.detail-cta-domain:hover { color: #0f172a; }

.detail-main {
  max-width: 46rem;
}

.detail-shots {
  margin-bottom: 2.25rem;
}

.detail-shots__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.detail-shot {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}

.detail-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.detail-shot--placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 220px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #6b7280;
}

.detail-shot--placeholder span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #0f172a;
}

.detail-shot--placeholder p {
  margin: 0;
  max-width: 32ch;
  line-height: 1.5;
  font-size: 0.95rem;
}

.detail-link-item--primary {
  background: #f8fafc;
}

/* --- Article (lab entry) ----------------------------------- */
.article-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .article-layout { grid-template-columns: 1fr; }
}

.article-toc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 2;
  position: sticky;
  top: 88px;
}

.article-toc__label {
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

.article-toc a {
  color: #6b7280;
  display: block;
}

.article-toc a.is-active,
.article-toc a:hover { color: #0ea5e9; }

.article-body {
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #374151;
}

.article-body.serif { font-family: 'Noto Serif', Georgia, serif; }

.article-body h2 {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin: 2.5rem 0 0.85rem;
}

.article-body p { margin-bottom: 1.25rem; }

.article-body blockquote {
  border-left: 2px solid #cbd5e1;
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  color: #6b7280;
}

.article-figure {
  margin-bottom: 2rem;
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  height: clamp(200px, 26vw, 300px);
  background: #eef1f4;
}

.article-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #9ca3af;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* --- Page header ------------------------------------------- */
.page-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 25px 0;
}

.page-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}

.page-breadcrumb a { color: #9ca3af; }

.page-h1 {
  font-family: Inter, 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.page-intro {
  max-width: 42rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #374151;
  border-left: 2px solid #cbd5e1;
  padding-left: 1.25rem;
  margin-bottom: 3rem;
}

/* --- Photo band -------------------------------------------- */
.photo-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .photo-band { grid-template-columns: 1fr; }
}

.photo-frame {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #eef1f4;
}

.photo-frame img {
  width: 115%;
  height: 115%;
  max-width: none;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.photo-frame--studio {
  aspect-ratio: 1;
  min-height: 0;
}

.photo-frame--studio img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-band__note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #9ca3af;
  margin-top: 0.9rem;
}

/* --- Domain cards ------------------------------------------ */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.domain-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.2rem;
  display: block;
  color: #374151;
}

.domain-card--current {
  background: #eef1f4;
  border-color: #cbd5e1;
}

.domain-card__url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #0ea5e9;
  margin-bottom: 0.4rem;
}

.domain-card--current .domain-card__url { color: #1f2937; }

.domain-card__desc {
  font-size: 0.92rem;
  color: #6b7280;
}

/* --- Contact list ------------------------------------------ */
.contact-list { border-top: 1px solid #e2e8f0; margin-bottom: 2.5rem; }

.contact-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e2e8f0;
  align-items: baseline;
}

.contact-item__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* --- Node detail links ------------------------------------- */
.detail-links { border-top: 1px solid #e2e8f0; }

.detail-link-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e2e8f0;
  align-items: baseline;
  color: #374151;
}

@media (max-width: 600px) {
  .detail-link-item { grid-template-columns: 1fr; }
}

.detail-link-item__url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #0ea5e9;
}

.detail-link-item__desc { font-size: 0.95rem; color: #6b7280; }

/* --- All nodes grid ---------------------------------------- */
.all-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.node-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem;
  color: #374151;
  transition: box-shadow 220ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.node-card:hover { box-shadow: 0 4px 24px rgba(15,23,42,0.06); }

.node-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.node-card__name {
  font-weight: 600;
  font-size: 1.2rem;
  color: #1f2937;
}

.node-card__tag {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #6b7280;
  margin-bottom: 1rem;
}

.node-card__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #9ca3af;
  border-top: 1px solid #eef1f4;
  padding-top: 0.75rem;
}

/* --- Outside section --------------------------------------- */
.outside-list { border-top: 1px solid #e2e8f0; }

.outside-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.35rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e2e8f0;
  align-items: baseline;
}

@media (max-width: 600px) {
  .outside-item { grid-template-columns: 1fr; }
}

.outside-item__name { font-weight: 600; color: #1f2937; }

.outside-item__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #9ca3af;
}

.outside-item__desc { color: #6b7280; line-height: 1.6; }

/* --- Org meta sidebar -------------------------------------- */
.org-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 2;
}

.org-meta__label {
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

/* --- Sections spacing -------------------------------------- */
.section-white   { background: #ffffff; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.section-gray    { background: #eef1f4; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.section-plain   { background: #ffffff; border-bottom: 1px solid #e2e8f0; }

.section-pad     { padding: 4rem 0; }
.section-pad-sm  { padding: 2.5rem 0; }
.section-pad-lg  { padding: 4.5rem 0; }

/* --- Manifest TOC sidebar ---------------------------------- */
.manifest-toc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 2;
  align-self: start;
  position: sticky;
  top: 88px;
}

.manifest-toc__label {
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

.manifest-toc a { color: #6b7280; display: block; }
.manifest-toc a:hover { color: #0ea5e9; }

/* --- Principle section divider ----------------------------- */
.principle-block {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.principle-block:last-child { border-bottom: 0; margin-bottom: 0; }

/* --- Eco diagram connector spacer -------------------------- */
.eco-spacing-150 { position: relative; height: 150px; }
.eco-spacing-80  { position: relative; height: 80px; }

/* --- Homepage lab teaser ----------------------------------- */
.lab-teaser-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
}

@media (max-width: 720px) {
  .lab-teaser-grid { grid-template-columns: 1fr; }
}

.lab-teaser__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.9;
}

.lab-teaser__title {
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  color: #1f2937;
  margin-bottom: 1.25rem;
  text-wrap: pretty;
}

.lab-teaser__title a { color: #1f2937; }
.lab-teaser__title a:hover { color: #0ea5e9; }

.lab-teaser__body {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.05rem;
  color: #374151;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.lab-teaser__more {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.lab-teaser__list {
  margin-top: 2.5rem;
  border-top: 1px solid #cbd5e1;
}

.lab-teaser__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid #e2e8f0;
  color: #374151;
}

.lab-teaser__item:hover { color: #0ea5e9; }

.lab-teaser__item-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  min-width: 5rem;
}

.lab-teaser__item-title {
  flex: 1;
  min-width: 14rem;
}

.lab-teaser__item-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: #9ca3af;
}

/* --- Homepage principles preview --------------------------- */
.home-principles {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid #e2e8f0;
}

/* --- Org header image -------------------------------------- */
.org-header-image {
  margin-bottom: 2.5rem;
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  height: clamp(220px, 32vw, 380px);
  background: #eef1f4;
}

/* --- Generic h2 -------------------------------------------- */
.h2 {
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin-bottom: 0.85rem;
}

/* --- Generic section/content text -------------------------- */
.body-text {
  color: #374151;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.body-text:last-child { margin-bottom: 0; }
