:root {
    --bg:        #ffffff;
    --bg2:       #f4f7f9;
    --bg3:       #eef2f5;
    --panel:     #ffffff;
    --border:    #d0dce5;
    --accent:    #008078;
    --accent2:   #006699;
    --accent3:   #c97a00;
    --accent4:   #c93a3a;
    --text:      #334a5e;
    --muted:     #6a8ca0;
    --heading:   #112233;
    --white:     #ffffff;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
  }

  /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

  /* ── NOISE OVERLAY ── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
  }

  /* ── NAVBAR ── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-brand {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .nav-links {
    display: flex;
    gap: 0.2rem;
    list-style: none;
    flex-wrap: wrap;
  }

  .nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
  }

  .nav-links a:hover {
    color: var(--accent);
    background: rgba(0,212,200,0.07);
  }

  /* ── HERO ── */
  .hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 8rem 6rem 4rem;
    overflow: hidden;
  }

  .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(0,212,200,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,212,200,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  }

  .hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,153,230,0.12) 0%, transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none;
  }

  .hero-glow2 {
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,212,200,0.08) 0%, transparent 70%);
    bottom: 50px; left: 100px;
    pointer-events: none;
  }

  .hero-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(0,212,200,0.08);
    border: 1px solid rgba(0,212,200,0.2);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    display: inline-block;
    animation: fadeUp 0.8s ease both;
  }

  .hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: 1.1;
    color: var(--heading);
    max-width: 820px;
    animation: fadeUp 0.8s 0.1s ease both;
  }

  .hero h1 em {
    font-style: italic;
    color: var(--accent);
  }

  .hero-sub {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 580px;
    font-weight: 300;
    animation: fadeUp 0.8s 0.2s ease both;
  }

  .hero-meta {
    margin-top: 2.5rem;
    display: flex;
    gap: 2rem;
    animation: fadeUp 0.8s 0.3s ease both;
  }

  .hero-stat {
    text-align: left;
  }

  .hero-stat-val {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--accent);
    display: block;
  }

  .hero-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  .scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: fadeUp 1s 0.6s ease both;
  }

  .scroll-hint::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(var(--accent), transparent);
    animation: scrollLine 1.5s ease infinite;
  }

  @keyframes scrollLine {
    0% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(0.2); transform-origin: top; }
  }

  /* ── MAIN LAYOUT ── */
  main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
  }

  /* ── SECTION ── */
  section {
    padding-top: 5rem;
    margin-bottom: 1rem;
  }

  .section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .section-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent);
    background: rgba(0,212,200,0.08);
    border: 1px solid rgba(0,212,200,0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.1em;
    flex-shrink: 0;
  }

  .section-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--heading);
    line-height: 1.2;
  }

  /* ── CARDS ── */
  .card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.25s, transform 0.25s;
    position: relative;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.25s;
  }

  .card:hover {
    border-color: rgba(0,212,200,0.3);
    transform: translateX(4px);
  }

  .card:hover::before { opacity: 1; }

  .card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .card h3 .icon {
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  .card p, .card li {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.7;
  }

  .card ul, .card ol {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
  }

  .card li { margin-bottom: 0.3rem; }

  /* ── GRID LAYOUTS ── */
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

  /* ── ACCENT CARDS ── */
  .card-accent {
    background: linear-gradient(135deg, rgba(0,212,200,0.06) 0%, rgba(0,153,230,0.04) 100%);
    border-color: rgba(0,212,200,0.2);
  }

  .card-warning {
    background: linear-gradient(135deg, rgba(240,165,0,0.06) 0%, rgba(240,165,0,0.02) 100%);
    border-color: rgba(240,165,0,0.25);
  }

  .card-warning::before { background: var(--accent3); }

  .card-danger {
    background: linear-gradient(135deg, rgba(224,90,90,0.06) 0%, rgba(224,90,90,0.02) 100%);
    border-color: rgba(224,90,90,0.25);
  }

  .card-danger::before { background: var(--accent4); }

  /* ── TABLE ── */
  .table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin: 1.5rem 0;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
  }

  thead {
    background: var(--bg3);
  }

  th {
    padding: 0.85rem 1.1rem;
    text-align: left;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
  }

  td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text);
  }

  tr:last-child td { border-bottom: none; }
  tr:hover td { background: rgba(0,212,200,0.03); }

  /* ── CODE / MONO BLOCKS ── */
  .mono-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 1.1rem 1.4rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent);
    margin: 1rem 0;
    line-height: 1.7;
    overflow-x: auto;
  }

  /* ── CALLOUT ── */
  .callout {
    background: rgba(0,212,200,0.05);
    border: 1px solid rgba(0,212,200,0.2);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
  }

  .callout-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }

  .callout p { font-size: 0.92rem; color: var(--text); }

  .callout-warn {
    background: rgba(240,165,0,0.05);
    border-color: rgba(240,165,0,0.2);
  }

  /* ── STEP FLOW ── */
  .steps { display: flex; flex-direction: column; gap: 0; margin: 1.5rem 0; }

  .step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1.25rem;
    position: relative;
  }

  .step:not(:last-child) .step-num::after {
    content: '';
    position: absolute;
    left: 27px;
    top: 56px;
    width: 2px;
    height: calc(100% - 16px);
    background: linear-gradient(var(--border), transparent);
  }

  .step-num {
    width: 56px;
    height: 56px;
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s, background 0.2s;
  }

  .step:hover .step-num {
    background: rgba(0,212,200,0.1);
    border-color: var(--accent);
  }

  .step-body { padding: 0.7rem 0 2rem; }

  .step-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 0.4rem;
  }

  .step-body p, .step-body li {
    font-size: 0.9rem;
    color: var(--text);
  }

  .step-body ul { padding-left: 1.2rem; margin-top: 0.4rem; }
  .step-body li { margin-bottom: 0.25rem; }

  /* ── BADGE ── */
  .badge {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
  }

  .badge-teal { background: rgba(0,212,200,0.12); color: var(--accent); border: 1px solid rgba(0,212,200,0.2); }
  .badge-blue { background: rgba(0,153,230,0.12); color: #4db8ff; border: 1px solid rgba(0,153,230,0.2); }
  .badge-amber { background: rgba(240,165,0,0.12); color: #f0c040; border: 1px solid rgba(240,165,0,0.2); }
  .badge-red { background: rgba(224,90,90,0.12); color: #e08080; border: 1px solid rgba(224,90,90,0.2); }
  .badge-green { background: rgba(40,200,120,0.12); color: #40d090; border: 1px solid rgba(40,200,120,0.2); }

  /* ── PROSE ── */
  .prose p { margin-bottom: 1rem; font-size: 0.95rem; }
  .prose strong { color: var(--heading); font-weight: 600; }
  .prose em { color: var(--accent); font-style: normal; font-weight: 500; }

  /* ── DIVIDER ── */
  .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 3rem 0;
  }

  /* ── PILL TAG ── */
  .pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

  /* ── HIGHLIGHT BOX ── */
  .highlight-box {
    background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
  }

  .highlight-box h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    color: var(--heading);
    margin-bottom: 1rem;
  }

  /* ── PROGRESS BAR ── */
  .param-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }

  .param-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
    width: 180px;
    flex-shrink: 0;
  }

  .param-bar {
    flex: 1;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border);
  }

  .param-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
  }

  .param-val {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    width: 90px;
    text-align: right;
    flex-shrink: 0;
  }

  /* ── FOOTER ── */
  footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 2.5rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.04em;
  }

  footer span { color: var(--accent); }

  /* ── ANIMATIONS ── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    .hero { padding: 6rem 1.5rem 3rem; }
    main { padding: 0 1.25rem 4rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    footer { padding: 2rem 1.5rem; flex-direction: column; gap: 0.75rem; text-align: center; }
  }
