/* ============================================
   MAS — PURE MINIMALIST DESIGN SYSTEM
   Editorial Dark Mode (Swiss Typographic Style)
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

:root {
  --bg: #000000;
  --fg: #FFFFFF;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --header-h: 64px;
  --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
  --border-light: 1px solid rgba(255, 255, 255, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  letter-spacing: -0.01em;
}

main, section, article, header, footer, div, p, h1, h2, h3, h4, ul, li, pre, code {
  max-width: 100%;
  box-sizing: border-box;
}

p, h1, h2, h3, h4, span, a, li, code, pre {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }
img { max-width: 100%; display: block; }

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- HEADER (GLASS MINIMAL) ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-subtle);
  transition: transform 0.5s var(--ease);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 3rem;
  max-width: 1500px;
  margin: 0 auto;
}

/* Logo */
.logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  line-height: 1;
  transition: opacity 0.25s var(--ease);
}

.logo:hover { opacity: 0.6; }

/* Nav */
.main-nav { flex: 1; display: flex; justify-content: center; }

.nav-list {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.55;
  position: relative;
  padding: 4px 0;
  transition: opacity 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--fg);
  transition: width 0.35s var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-icons {
  display: flex;
  gap: 0.5rem;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.icon-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.search-divider {
  width: 1px;
  height: 16px;
  background: var(--fg);
  opacity: 0.15;
  margin: 0 0.25rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.menu-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.menu-toggle[aria-expanded="true"] .menu-bar:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ---------- HERO STRIP ---------- */
.hero-strip {
  margin-top: var(--header-h);
  border-bottom: var(--border-subtle);
  padding: 6rem 3rem 4.5rem;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  opacity: 0.45;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.25rem;
}

.hero-line {
  font-size: clamp(2.4rem, 9.5vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.92;
  overflow: hidden;
}

/* Hero line reveal animation */
.hero-line[data-reveal] {
  clip-path: inset(0 100% 0 0);
  animation: revealLine 0.9s var(--ease) forwards;
}

.hero-line:nth-child(2) { animation-delay: 0.15s; }

@keyframes revealLine {
  to { clip-path: inset(0 0 0 0); }
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 1.5rem;
  border-top: var(--border-subtle);
  margin-top: 1rem;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  opacity: 0.4;
  animation: nudge 2.5s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.hero-index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  opacity: 0.3;
}

/* ---------- CONTENT GRID ---------- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1500px;
  margin: 0 auto;
  border-bottom: var(--border-subtle);
}

.col-left {
  border-bottom: var(--border-subtle);
}

/* ---------- MODULES (MINIMALIST EDITORIAL) ---------- */
.module {
  border-bottom: var(--border-subtle);
  padding: 4rem 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.module.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.module:last-child {
  border-bottom: none;
}

.module-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.module-index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  opacity: 0.35;
  flex-shrink: 0;
}

.module-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inline-icons {
  display: inline-flex;
  gap: 0.375rem;
  opacity: 0.3;
}

/* Two-col text */
.two-col-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.two-col-text p {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.7;
  margin-bottom: 1.25rem;
  font-weight: 300;
}

.two-col-text strong {
  font-weight: 600;
  opacity: 1;
}

/* ---------- INTERACTIVE CODE TERMINAL ---------- */
.code-terminal {
  margin-top: 3rem;
  border: var(--border-subtle);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  border-bottom: var(--border-subtle);
  background: rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 1rem;
}

.terminal-status {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.6rem;
  transition: all 0.3s var(--ease);
}

.status-dot.custom {
  background: var(--fg);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.status-dot.template {
  background: rgba(255, 255, 255, 0.3);
}

.terminal-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.terminal-tab {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  transition: all 0.25s var(--ease);
  opacity: 0.45;
}

.terminal-tab:hover {
  opacity: 0.8;
}

.terminal-tab.active {
  opacity: 1;
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.terminal-code-area {
  padding: 1.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.75;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.85);
}

.terminal-code-area pre {
  margin: 0;
}

.terminal-code-area code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}

.terminal-footer {
  padding: 0.75rem 1.5rem;
  border-top: var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  opacity: 0.5;
  background: rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
  .terminal-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- PERFORMANCE CARDS (HAIRLINE TABLE) ---------- */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: var(--border-subtle);
  margin-bottom: 2rem;
}

.perf-card {
  background: var(--bg);
  padding: 2.25rem 1.25rem;
  text-align: center;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.perf-card:hover {
  background: var(--fg);
  color: var(--bg);
}

.perf-metric {
  margin-bottom: 0.75rem;
}

.perf-number {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-family: var(--font-mono);
}

.perf-unit {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.5;
  margin-left: 2px;
}

.perf-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.5;
  opacity: 0.5;
}

.module-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.45;
  border-left: 1px solid var(--fg);
  padding-left: 1.25rem;
}

/* ---------- ADVANTAGE / DISADVANTAGE LISTS ---------- */
.advantage-list {
  display: flex;
  flex-direction: column;
}

.advantage-list li {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.advantage-list li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.advantage-list li:last-child { border-bottom: none; }

.adv-marker {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  flex-shrink: 0;
  width: 1.5rem;
  opacity: 0.4;
}

.advantage-list strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.advantage-list p {
  font-size: 0.9375rem;
  line-height: 1.7;
  opacity: 0.6;
  font-weight: 300;
}

.disadvantage-list .adv-marker {
  opacity: 0.3;
}

/* ---------- ANATOMY MODULE ---------- */
.anatomy-module {
  border-bottom: none;
}

.anatomy-diagram {
  margin-bottom: 2.5rem;
}

.anatomy-browser {
  border: var(--border-subtle);
  border-radius: 4px 4px 0 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.browser-url {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  opacity: 0.45;
  flex: 1;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.anatomy-page {
  border: var(--border-subtle);
  border-top: none;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.anat-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.anat-section:last-child { border-bottom: none; }

.anat-block-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.3;
  margin-bottom: 0.75rem;
}

.anat-placeholder-bar {
  height: 2px;
  background: var(--fg);
  opacity: 0.12;
  width: 40%;
}

.anat-placeholder-bar--short {
  width: 25%;
}

.anat-placeholder-dots {
  display: flex;
  gap: 8px;
  margin-top: 0.6rem;
}

.anat-placeholder-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fg);
  opacity: 0.12;
}

.anat-hero {
  padding: 1.75rem 1.5rem;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 49.5%,
    rgba(255, 255, 255, 0.02) 49.5%,
    rgba(255, 255, 255, 0.02) 50.5%,
    transparent 50.5%,
    transparent 100%
  );
}

.anat-hero-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.anat-line {
  height: 6px;
  background: var(--fg);
  border-radius: 1px;
}

.anat-line--lg { width: 85%; opacity: 0.8; }
.anat-line--md { width: 60%; opacity: 0.4; }
.anat-line--sm { width: 35%; opacity: 0.15; }

.anat-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.anat-card {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.anat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.04) 100%);
}

/* ---------- ANATOMY DETAIL CARDS ---------- */
.anatomy-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: var(--border-subtle);
}

.anatomy-card {
  background: var(--bg);
  padding: 2.25rem 1.75rem;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

.anatomy-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anatomy-card:hover {
  background: var(--fg);
  color: var(--bg);
}

.anatomy-card:hover .meter-track { background: rgba(0, 0, 0, 0.12); }
.anatomy-card:hover .tag { border-color: rgba(0, 0, 0, 0.25); }
.anatomy-card:hover .bp { border-color: rgba(0, 0, 0, 0.15); }
.anatomy-card:hover .check-icon { border-color: rgba(0, 0, 0, 0.25); }

.anatomy-card-icon {
  display: flex;
  gap: 4px;
  margin-bottom: 1.25rem;
  opacity: 0.6;
}

.anatomy-card h3 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}

.anatomy-card p {
  font-size: 0.8125rem;
  line-height: 1.75;
  opacity: 0.55;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

/* Meter */
.anatomy-card-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meter-track {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--fg);
  width: 0;
  transition: width 1s var(--ease);
}

.anatomy-card:hover .meter-fill { background: var(--bg); }

.meter-value {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  opacity: 0.5;
  flex-shrink: 0;
}

/* Tags */
.anatomy-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
}

/* Breakpoints */
.anatomy-card-breakpoints {
  display: flex;
  gap: 6px;
}

.bp {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.bp-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.4;
  margin-bottom: 2px;
}

.bp-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
}

/* Checklist */
.anatomy-card-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

.check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  font-size: 0.5rem;
  flex-shrink: 0;
}

/* ---------- CONTACT STRIP ---------- */
.contact-strip {
  max-width: 1500px;
  margin: 0 auto;
  padding: 7rem 3rem;
  text-align: center;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  opacity: 0.4;
}

.contact-heading {
  font-size: clamp(2.2rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.blink-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.contact-email {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 3px;
  opacity: 0.8;
  transition: opacity 0.25s var(--ease);
}

.contact-email:hover {
  opacity: 0.4;
}

.footer-social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: center;
}

.footer-social-icons a {
  color: var(--fg);
  opacity: 0.35;
  transition: opacity 0.25s var(--ease);
}

.footer-social-icons a:hover {
  opacity: 1;
}

.contact-line {
  width: 48px;
  height: 1px;
  background: var(--fg);
  opacity: 0.12;
  margin: 2rem 0;
}

.contact-footer {
  display: flex;
  gap: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  opacity: 0.35;
}

/* ---------- LANGUAGE SWITCHER ---------- */
.lang-switcher {
  display: flex;
  align-items: center;
  margin-left: 0.25rem;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  cursor: pointer;
  transition: opacity 0.25s var(--ease);
  opacity: 0.35;
}

.lang-btn.active { opacity: 1; }
.lang-btn:hover { opacity: 0.7; }

.lang-sep {
  width: 1px;
  height: 12px;
  background: var(--fg);
  opacity: 0.15;
}

/* ---------- RESPONSIVE MASTERCLASS ---------- */
@media (max-width: 1100px) {
  .nav-list { gap: 1.25rem; }
  .two-col-text { grid-template-columns: 1fr; gap: 1.5rem; }
  .perf-grid { grid-template-columns: 1fr 1fr; }
  .anatomy-details { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .header-inner { padding: 0 1.5rem; }
  .social-icons { display: none; }
  .search-divider { display: none; }
  .menu-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: var(--border-subtle);
    padding: 2rem 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
    z-index: 999;
  }

  .main-nav.is-open { transform: translateY(0); }
  .nav-list { flex-direction: column; gap: 1.25rem; }
  .nav-link { display: block; padding: 0.5rem 0; font-size: 1rem; }
  .hero-strip { padding: 4rem 1.5rem 3rem; text-align: center; }
  .hero-inner { align-items: center; text-align: center; gap: 1.5rem; }
  .hero-meta { justify-content: center; text-align: center; }
  .module { padding: 3.5rem 1.5rem; }
  .contact-strip { padding: 5rem 1.5rem; text-align: center; }
  .contact-inner { align-items: center; text-align: center; }
  .contact-footer { justify-content: center; text-align: center; }
}

@media (max-width: 600px) {
  .hero-line { font-size: clamp(2.3rem, 11.5vw, 3.5rem); }
  .header-inner { padding: 0 1.25rem; }
  .hero-strip { padding: 3rem 1.25rem 2.5rem; text-align: center; }
  .hero-inner { align-items: center; text-align: center; }
  
  /* Hero meta dead center stacked on phone */
  .hero-meta {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
  }
  .hero-scroll-hint {
    justify-content: center;
  }
  .hero-index {
    text-align: center;
  }

  .module { padding: 2.75rem 1.25rem; }
  
  /* Code Terminal Responsive */
  .terminal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .terminal-tabs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .terminal-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 6px 8px;
    font-size: 0.6rem;
  }
  .terminal-code-area {
    padding: 1.25rem 1rem;
    font-size: 0.7rem;
  }
  .terminal-footer {
    padding: 0.75rem 1rem;
  }

  /* Performance cards & Anatomy */
  .perf-grid { grid-template-columns: 1fr; }
  .perf-card { padding: 1.5rem; }
  .anatomy-browser { padding: 10px 12px; gap: 0.75rem; }
  .browser-url { font-size: 0.55rem; padding: 4px 8px; }
  .anat-content-grid { grid-template-columns: 1fr; }
  .anatomy-card { padding: 1.5rem 1.25rem; }
  .anatomy-card-breakpoints { flex-wrap: wrap; }
  .anatomy-card-checklist { grid-template-columns: 1fr; }

  /* Contact strip & footer dead center stacked on phone */
  .contact-strip { padding: 4rem 1.25rem; text-align: center; }
  .contact-inner { align-items: center; text-align: center; }
  .contact-footer { 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    text-align: center; 
    gap: 0.65rem; 
    width: 100%;
  }
}

@media (max-width: 400px) {
  .hero-line { font-size: clamp(2rem, 11vw, 2.8rem); }
  .header-inner { padding: 0 1rem; }
  .hero-strip { padding: 2.5rem 1rem 2rem; text-align: center; }
  .module { padding: 2.25rem 1rem; }
  .contact-strip { padding: 3.5rem 1rem; text-align: center; }
  .terminal-tabs { flex-direction: column; }
  .terminal-tab { width: 100%; }
}
