:root {
    --bg: #050a0e;
    --bg2: #0a1520;
    --bg3: #0f1e2e;
    --acc: #00e5ff;
    --acc2: #ff6b35;
    --acc3: #39ff14;
    --t: #e8f4f8;
    --t2: #8ba8bc;
    --bdr: rgba(0, 229, 255, 0.15);
    --nav-bg: rgba(5, 10, 14, 0.92);
    --grid-line: rgba(0, 229, 255, 0.03);
    --badge-bg: rgba(0, 229, 255, 0.08);
    --badge-bdr: rgba(0, 229, 255, 0.2);
    --tag-bg: rgba(0, 229, 255, 0.04);
    --tag-bdr: rgba(0, 229, 255, 0.12);
    --pn-color: rgba(0, 229, 255, 0.06);
    --readout-bg: rgba(0, 0, 0, 0.3);
    --code-bg: rgba(0, 0, 0, 0.5);
    --vconn-top: rgba(0, 229, 255, 0.4);
    --vconn-bot: rgba(0, 229, 255, 0.1);
    --row-even: rgba(255, 255, 255, 0.025);
    --row-hover: rgba(0, 229, 255, 0.05);
    --probe-glow: rgba(0, 229, 255, 0.3);
}

[data-theme="light"] {
    --bg: #f0f4f8;
    --bg2: #e2eaf2;
    --bg3: #d4dde8;
    --acc: #007acc;
    --acc2: #c94a10;
    --acc3: #1a7a00;
    --t: #0a1520;
    --t2: #3a5570;
    --bdr: rgba(0, 122, 204, 0.2);
    --nav-bg: rgba(240, 244, 248, 0.95);
    --grid-line: rgba(0, 122, 204, 0.06);
    --badge-bg: rgba(0, 122, 204, 0.08);
    --badge-bdr: rgba(0, 122, 204, 0.25);
    --tag-bg: rgba(0, 122, 204, 0.06);
    --tag-bdr: rgba(0, 122, 204, 0.18);
    --pn-color: rgba(0, 122, 204, 0.08);
    --readout-bg: rgba(0, 122, 204, 0.06);
    --code-bg: rgba(0, 0, 0, 0.04);
    --vconn-top: rgba(0, 122, 204, 0.5);
    --vconn-bot: rgba(0, 122, 204, 0.15);
    --row-even: rgba(0, 0, 0, 0.03);
    --row-hover: rgba(0, 122, 204, 0.08);
    --probe-glow: rgba(0, 122, 204, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--t);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

/* Grid Background */
.gbg {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                      linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bdr);
}

.nl {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.nd {
    width: 8px;
    height: 8px;
    background: var(--acc3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 6px rgba(57, 255, 20, 0);
    }
}

.nls {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nls a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t2);
    text-decoration: none;
    transition: color 0.2s;
}

.nls a:hover {
    color: var(--acc);
}

.nb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--acc3);
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.25);
    padding: 5px 14px;
    border-radius: 2px;
    letter-spacing: 0.1em;
}

/* Sections */
section {
    position: relative;
    z-index: 1;
}

.con {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Ticker Tape */
.lb {
    background: rgba(57, 255, 20, 0.04);
    border-bottom: 1px solid rgba(57, 255, 20, 0.12);
    padding: 10px 0;
    overflow: hidden;
    margin-top: 61px;
}

.tw {
    display: flex;
    gap: 50px;
    animation: tick 35s linear infinite;
    width: max-content;
}

@keyframes tick {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    white-space: nowrap;
}

.ld {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--acc3);
    animation: pulse 1.5s infinite;
}

.ll { color: var(--t2); }
.lv { color: var(--acc3); font-weight: 500; }
.vs { width: 1px; height: 16px; background: var(--bdr); }

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.hleft {
    flex: 1 1 auto;
    min-width: 0;
}

.hright {
    flex: 0 0 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fu 0.8s 0.5s forwards;
}

.probe-img {
    width: 100%;
    max-width: 700px;
    object-fit: contain;
    filter: drop-shadow(0 0 60px var(--probe-glow)) drop-shadow(0 24px 48px rgba(0, 0, 0, 0.7));
    transform: scaleX(-1) rotate(-5deg);
    transition: transform 0.6s ease;
}

.hright:hover .probe-img {
    transform: scaleX(-1) rotate(0deg) scale(1.04);
}

/* Fade-up animation */
@keyframes fu {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ht {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--acc);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fu 0.8s 0.2s forwards;
}

.ht::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--acc);
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(52px, 7vw, 96px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fu 0.8s 0.4s forwards;
}

h1 .g { color: var(--acc); }
h1 .s { -webkit-text-stroke: 2px var(--t); color: transparent; }
h1 .sub {
    display: block;
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 400;
    color: var(--t2);
    letter-spacing: -1px;
    margin-top: 8px;
}

.hd {
    max-width: 540px;
    font-size: 17px;
    color: var(--t2);
    line-height: 1.7;
    margin-bottom: 48px;
    opacity: 0;
    animation: fu 0.8s 0.6s forwards;
}

.hb {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fu 0.8s 0.8s forwards;
}

.bp {
    background: var(--acc);
    color: var(--bg);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    padding: 16px 36px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    transition: all 0.2s;
    display: inline-block;
}
.bp:hover { background: #33ecff; transform: translateY(-2px); }

.bs {
    background: transparent;
    color: var(--t);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.05em;
    padding: 16px 36px;
    border: 1px solid var(--bdr);
    cursor: pointer;
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    transition: all 0.2s;
    display: inline-block;
}
.bs:hover { border-color: var(--acc); color: var(--acc); }

.hs {
    position: absolute;
    right: 60px;
    bottom: 80px;
    display: flex;
    gap: 40px;
    opacity: 0;
    animation: fu 0.8s 1s forwards;
}

.st { text-align: right; }
.sn {
    font-family: 'Syne', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--acc);
    line-height: 1;
}
.sl {
    font-size: 12px;
    color: var(--t2);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sh {
    position: absolute;
    bottom: 40px;
    left: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--t2);
    letter-spacing: 0.12em;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    opacity: 0;
    animation: fu 0.8s 1.2s forwards;
}

.sln {
    width: 1px;
    height: 40px;
    background: var(--t2);
    position: relative;
    overflow: hidden;
}
.sln::after {
    content: '';
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 100%;
    background: var(--acc);
    animation: scan 2s infinite;
}

@keyframes scan {
    to { top: 100%; }
}

@keyframes scan {
    to { left: 100%; }
}

/* Shared Section Styles */
.shd { margin-bottom: 80px; }

.stg {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--acc);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.stg::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--acc);
}

h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 20px;
}

.sd {
    font-size: 16px;
    color: var(--t2);
    max-width: 560px;
    line-height: 1.7;
}

/* Reveal Animation (Intersection Observer) */
.rev {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s, transform 0.7s;
}
.rev.vis {
    opacity: 1;
    transform: none;
}

/* Problem Section */
#problem { padding: 120px 0; border-top: 1px solid var(--bdr); }
.pg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--bdr);
    border: 1px solid var(--bdr);
}
.pc {
    background: var(--bg2);
    padding: 48px;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}
.pc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--acc2);
    transition: height 0.4s;
}
.pc:hover::before { height: 100%; }
.pc:hover { background: var(--bg3); }
.pn {
    font-family: 'Syne', sans-serif;
    font-size: 72px;
    font-weight: 800;
    color: var(--pn-color);
    line-height: 1;
    margin-bottom: 16px;
}
.pt {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}
.px {
    font-size: 14px;
    color: var(--t2);
    line-height: 1.7;
}

/* Architecture Section */
#architecture {
    padding: 120px 0;
    border-top: 1px solid var(--bdr);
    --al1-ac: #00c896;
    --al2-ac: #3b82f6;
    --al3-ac: #f97316;
    --al4-ac: #a855f7;
    --al1-lt: rgba(0,200,150,0.12);
    --al2-lt: rgba(59,130,246,0.12);
    --al3-lt: rgba(249,115,22,0.12);
    --al4-lt: rgba(168,85,247,0.12);
}
.arc-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
    margin-bottom: 56px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--bdr);
}
.arc-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--t2);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.arc-eyebrow::before {
    content: '02';
    font-size: 11px;
    background: var(--acc);
    color: var(--bg);
    padding: 3px 8px;
    border-radius: 4px;
}
.arc-h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(52px, 7vw, 88px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -2px;
    color: var(--t);
    margin: 0;
}
.arc-h2 span {
    -webkit-text-stroke: 2px var(--t);
    color: transparent;
}
.arc-header-right { max-width: 300px; text-align: right; }
.arc-layer-count {
    font-family: 'Syne', sans-serif;
    font-size: 64px;
    font-weight: 800;
    color: var(--bdr);
    line-height: 1;
    margin-bottom: 8px;
}
.arc-header-right p { font-size: 13px; color: var(--t2); line-height: 1.75; }

/* Flow bar */
.arc-flow-bar { display: flex; align-items: center; margin-bottom: 12px; }
.arc-flow-step { flex: 1; }
.arc-flow-node {
    padding: 12px 16px;
    text-align: center;
    border: 1px solid var(--bdr);
    border-radius: 8px;
    background: var(--bg2);
    cursor: pointer;
    transition: all 0.2s ease;
}
.arc-flow-node:hover { border-color: var(--acc); transform: translateY(-2px); }
.arc-flow-node-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--t2);
    text-transform: uppercase;
    margin-bottom: 3px;
}
.arc-flow-node-name { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; }
.arc-fn-1 .arc-flow-node-name { color: var(--al1-ac); }
.arc-fn-2 .arc-flow-node-name { color: var(--al2-ac); }
.arc-fn-3 .arc-flow-node-name { color: var(--al3-ac); }
.arc-fn-4 .arc-flow-node-name { color: var(--al4-ac); }
.arc-flow-arrow { width: 32px; display: flex; align-items: center; justify-content: center; color: var(--t2); font-size: 16px; flex-shrink: 0; }
.arc-flow-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--t2);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 32px;
}

/* Tabs */
.arc-tabs {
    display: flex;
    border: 1px solid var(--bdr);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}
.arc-tab {
    flex: 1;
    padding: 14px 20px;
    cursor: pointer;
    border-right: 1px solid var(--bdr);
    background: var(--bg2);
    transition: background 0.2s ease;
    text-align: center;
    user-select: none;
}
.arc-tab:last-child { border-right: none; }
.arc-tab-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--t2);
    margin-bottom: 4px;
    transition: color 0.2s;
}
.arc-tab-name { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--t); line-height: 1; transition: color 0.2s; }
.arc-tab-sub { font-size: 10px; color: var(--t2); margin-top: 2px; transition: color 0.2s; }
.arc-tab.active.arc-t1 { background: var(--al1-ac); }
.arc-tab.active.arc-t2 { background: var(--al2-ac); }
.arc-tab.active.arc-t3 { background: var(--al3-ac); }
.arc-tab.active.arc-t4 { background: var(--al4-ac); }
.arc-tab.active .arc-tab-num,
.arc-tab.active .arc-tab-name,
.arc-tab.active .arc-tab-sub { color: #fff; }
.arc-tab:not(.active):hover { background: var(--bg3); }

/* Panels */
.arc-panel { display: none; }
.arc-panel.active { display: block; animation: arcSlideIn 0.35s ease both; }
@keyframes arcSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.arc-panel-hero {
    border-radius: 16px 16px 0 0;
    padding: 40px 48px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
}
.arc-p1 .arc-panel-hero { background: #062418; border-top: 3px solid var(--al1-ac); }
.arc-p2 .arc-panel-hero { background: #061428; border-top: 3px solid var(--al2-ac); }
.arc-p3 .arc-panel-hero { background: #281206; border-top: 3px solid var(--al3-ac); }
.arc-p4 .arc-panel-hero { background: #160628; border-top: 3px solid var(--al4-ac); }
.arc-panel-hero::before {
    content: attr(data-num);
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-family: 'Syne', sans-serif;
    font-size: 160px;
    font-weight: 800;
    color: rgba(255,255,255,0.04);
    line-height: 1;
    pointer-events: none;
}
.arc-hero-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}
.arc-hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.arc-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.25);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.08);
    white-space: nowrap;
}
.arc-panel-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    border: 1px solid var(--bdr);
    border-top: none;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}
.arc-pitem {
    padding: 24px 24px 20px;
    border-right: 1px solid var(--bdr);
    border-bottom: 1px solid var(--bdr);
    position: relative;
    transition: background 0.2s;
    background: var(--bg2);
}
.arc-pitem:hover { background: var(--bg3); }
.arc-pitem::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}
.arc-p1 .arc-pitem::before { background: var(--al1-ac); }
.arc-p2 .arc-pitem::before { background: var(--al2-ac); }
.arc-p3 .arc-pitem::before { background: var(--al3-ac); }
.arc-p4 .arc-pitem::before { background: var(--al4-ac); }
.arc-pitem:hover::before { opacity: 1; }
.arc-pitem-icon { font-size: 26px; margin-bottom: 12px; display: block; line-height: 1; transition: transform 0.25s; }
.arc-pitem:hover .arc-pitem-icon { transform: scale(1.12) rotate(-6deg); }
.arc-pitem-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--t); margin-bottom: 7px; }
.arc-pitem-desc { font-size: 12px; color: var(--t2); line-height: 1.7; margin-bottom: 14px; }
.arc-pitem-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}
.arc-p1 .arc-pitem-tag { background: var(--al1-lt); color: var(--al1-ac); }
.arc-p2 .arc-pitem-tag { background: var(--al2-lt); color: var(--al2-ac); }
.arc-p3 .arc-pitem-tag { background: var(--al3-lt); color: var(--al3-ac); }
.arc-p4 .arc-pitem-tag { background: var(--al4-lt); color: var(--al4-ac); }

/* Tech Stack Section */
#techstack { padding: 120px 0; border-top: 1px solid var(--bdr); }

/* === Tech Stack Diagram Image === */
.tsf-img {
    margin-top: 64px;
}
.tsf-diagram {
    width: 100%;
    max-width: 960px;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid var(--bdr);
}

/* legacy placeholder — keep .tsf-tags span for safety */
.tsf-tags span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 2px 6px;
    border: 1px solid var(--tag-bdr);
    background: var(--tag-bg);
    color: var(--t2);
    letter-spacing: 0.04em;
}

/* legacy chip classes */
.ts-diagram {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 60px;
    overflow-x: auto;
    padding-bottom: 12px;
}

/* Stage column */
.ts-stage {
    flex: 1 1 0;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ts-stage-wide {
    flex: 1.4 1 0;
}
.ts-stage-hdr {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--t2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ts-stage-num {
    background: var(--acc);
    color: var(--bg);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Flow column inside a stage */
.ts-flow-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Vertical connector */
.ts-vconn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
    position: relative;
    min-height: 40px;
}
.ts-vconn::before {
    content: '';
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--vconn-top), var(--vconn-bot));
}
.ts-conn-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--acc);
    letter-spacing: 0.1em;
    background: var(--bg);
    padding: 2px 8px;
    border: 1px solid var(--badge-bdr);
    white-space: nowrap;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

/* Horizontal arrow between stages */
.ts-harrow {
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 48px;
    opacity: 0.7;
}
.ts-harrow svg {
    width: 50px;
    height: 24px;
}

/* Tech node chip */
.ts-chip {
    background: var(--bg2);
    border: 1px solid var(--bdr);
    border-left: 3px solid var(--bc, var(--acc));
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.25s, box-shadow 0.25s;
    position: relative;
}
.ts-chip:hover {
    background: var(--bg3);
    box-shadow: 0 0 24px rgba(0,229,255,0.06), inset 0 0 0 1px rgba(0,229,255,0.08);
}
.ts-chip::after {
    content: '';
    position: absolute;
    inset: 0;
    border-left: 3px solid var(--bc, var(--acc));
    opacity: 0;
    transition: opacity 0.25s;
    box-shadow: inset 3px 0 12px var(--bc, var(--acc));
    pointer-events: none;
}
.ts-chip:hover::after { opacity: 0.3; }

.ts-chip-row {
    display: flex;
    gap: 0;
}
.ts-chip-half {
    flex: 1 1 0;
}

/* Chip icon */
.ts-chip-ico {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
    width: 28px;
    text-align: center;
}
.ts-chip-ico-text {
    font-family: 'Syne', sans-serif;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Chip body text */
.ts-chip-body { flex: 1; min-width: 0; }
.ts-chip-name {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--t);
    line-height: 1.3;
    margin-bottom: 2px;
}
.ts-chip-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--t2);
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    line-height: 1.3;
}
.ts-chip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ts-chip-tags span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 2px 6px;
    border: 1px solid var(--tag-bdr);
    background: var(--tag-bg);
    color: var(--t2);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Features Section */
#features { padding: 120px 0; border-top: 1px solid var(--bdr); }
.fl2 {
    display: flex;
    flex-direction: column;
    gap: 48px;
}
.flist { display: flex; flex-direction: column; gap: 2px; }
.fi {
    padding: 32px;
    background: var(--bg2);
    border-left: 3px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
}
.fi.act, .fi:hover {
    background: var(--bg3);
    border-left-color: var(--acc);
}
.fit {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.fic { font-size: 20px; }
.fd {
    font-size: 13px;
    color: var(--t2);
    line-height: 1.6;
}
.fv { width: 100%; }
.feature-flow-img {
    width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--bdr);
}
.ad {
    background: var(--bg2);
    border: 1px solid var(--bdr);
    padding: 40px;
    font-family: 'JetBrains Mono', monospace;
}
.adh {
    font-size: 11px;
    color: var(--t2);
    letter-spacing: 0.15em;
    margin-bottom: 32px;
    text-transform: uppercase;
}
.ale {
    padding: 20px 24px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
    transition: all 0.3s;
}
.ale.nor {
    background: rgba(57, 255, 20, 0.05);
    border-color: rgba(57, 255, 20, 0.2);
}
.ale.war {
    background: rgba(255, 200, 0, 0.05);
    border-color: rgba(255, 200, 0, 0.2);
}
.ale.dan {
    background: rgba(255, 50, 50, 0.08);
    border-color: rgba(255, 50, 50, 0.3);
    animation: dp 2s infinite;
}
@keyframes dp {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 50, 50, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 50, 50, 0.3); }
}
.als { font-size: 12px; letter-spacing: 0.1em; font-weight: 500; }
.ale.nor .als { color: #39ff14; }
.ale.war .als { color: #ffc800; }
.ale.dan .als { color: #ff3232; }
.alv { font-size: 11px; color: var(--t2); }
.sr {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ro {
    background: var(--readout-bg);
    padding: 16px;
    border: 1px solid var(--bdr);
}
.rl {
    font-size: 10px;
    color: var(--t2);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.rv {
    font-size: 20px;
    font-weight: 500;
    color: var(--acc);
}
.ru { font-size: 11px; color: var(--t2); }

/* API Section */
#api { padding: 120px 0; border-top: 1px solid var(--bdr); }
.apl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.epl { display: flex; flex-direction: column; gap: 2px; }
.ep {
    background: var(--bg2);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.ep:hover {
    background: var(--bg3);
    border-left-color: var(--acc3);
}
.mt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 2px;
    min-width: 48px;
    text-align: center;
    letter-spacing: 0.05em;
}
.mt.get {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.25);
    color: var(--acc3);
}
.epath {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--t);
}
.edesc {
    font-size: 12px;
    color: var(--t2);
    margin-top: 4px;
}
.cb {
    background: var(--code-bg);
    border: 1px solid var(--bdr);
    padding: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    overflow-x: auto;
    position: relative;
}
.cb::before {
    content: 'JSON Response Example';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 10px;
    color: var(--t2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.ck { color: #a855f7; }
.cs { color: #39ff14; }
.cn { color: #ff6b35; }
.cb2 { color: #00e5ff; }

/* Team Section */
#team { padding: 120px 0; border-top: 1px solid var(--bdr); }

/* Team group wrapper */
.tm-group {
    margin-bottom: 60px;
}
.tm-supervisor-group {
    margin-top: 20px;
    padding-top: 40px;
    border-top: 1px solid var(--bdr);
}
.tm-group-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--t2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 36px;
}

/* Row of cards */
.tm-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}
.tm-row-solo {
    margin-top: 32px;
}

/* Individual card */
.tm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 180px;
    gap: 0;
}

/* Circular avatar */
.tm-avatar-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--bdr);
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.3s;
}
.tm-card:hover .tm-avatar-wrap {
    border-color: var(--acc);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}
.tm-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.tm-initials {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--acc);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Name */
.tm-name {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--t);
    margin-bottom: 4px;
    line-height: 1.3;
}

/* ID / role */
.tm-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--t2);
    margin-bottom: 6px;
}

/* eportfolio link */
.tm-port {
    font-size: 11px;
    color: var(--t2);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
}
.tm-port:hover { color: var(--acc); }

/* Social icons row */
.tm-links {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.tm-ico {
    width: 28px;
    height: 28px;
    border: 1px solid var(--bdr);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    padding: 5px;
}
.tm-ico svg {
    width: 14px;
    height: 14px;
    display: block;
}
.tm-ico:hover {
    border-color: var(--acc);
    color: var(--acc);
}

/* ── Timeline / Gantt Section ── */
#timeline { padding: 120px 0; border-top: 1px solid var(--bdr); }

:root {
    --gms1: #00e5b4;
    --gms2: #4d9fff;
    --gms3: #ff6b4a;
    --gms4: #c77dff;
    --lbl-w: 34%;
    --row-h: 48px;
    --done-opacity: 0.55;
}

/* Legend */
.g-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 28px;
    margin-bottom: 36px;
}
.g-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--t2);
    text-transform: uppercase;
}
.g-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Gantt wrapper */
.gantt-wrap {
    margin-top: 0;
    overflow: hidden;
    overflow-x: auto;
    border: 1px solid var(--bdr);
    border-radius: 16px;
}

/* Every row */
.g-row {
    display: grid;
    grid-template-columns: var(--lbl-w) repeat(7, 1fr);
    border-bottom: 1px solid var(--bdr);
}
.g-row:last-child { border-bottom: none; }

/* Header row */
.g-head { background: rgba(255,255,255,0.02); }
.g-head .gantt-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--t2);
    font-weight: 500;
}
.g-head .gantt-col {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--t2);
    font-weight: 400;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
}

/* Label cell */
.gantt-lbl {
    padding: 0 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: rgba(232,234,240,0.75);
    border-right: 1px solid var(--bdr);
    display: flex;
    align-items: center;
    line-height: 1.4;
    min-height: var(--row-h);
}

/* Week column cells */
.gantt-col {
    border-right: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 5px;
    min-width: 60px;
    position: relative;
}
.gantt-col:last-child { border-right: none; }
.gantt-col:nth-child(even) { background: rgba(255,255,255,0.008); }

/* Tooltip */
.gantt-col[data-tip] { cursor: default; }
.gantt-col[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg3);
    color: var(--t);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--bdr);
    z-index: 10;
    pointer-events: none;
    letter-spacing: 0.05em;
}

/* Task row hover */
.g-task-row { transition: background 0.15s ease; }
.g-task-row:hover { background: rgba(255,255,255,0.015); }

/* Milestone header row */
.gantt-msrow {
    grid-column: 1 / -1;
    padding: 10px 20px;
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}
.gantt-msrow::before {
    content: '';
    width: 24px;
    height: 2px;
    border-radius: 2px;
    flex-shrink: 0;
}
.gantt-msrow.ms1 { color: var(--gms1); background: rgba(0,229,180,0.05); }
.gantt-msrow.ms1::before { background: var(--gms1); }
.gantt-msrow.ms2 { color: var(--gms2); background: rgba(77,159,255,0.05); }
.gantt-msrow.ms2::before { background: var(--gms2); }
.gantt-msrow.ms3 { color: var(--gms3); background: rgba(255,107,74,0.05); }
.gantt-msrow.ms3::before { background: var(--gms3); }
.gantt-msrow.ms4 { color: var(--gms4); background: rgba(199,125,255,0.05); }
.gantt-msrow.ms4::before { background: var(--gms4); }

/* Gantt bars */
.gbar {
    display: block;
    width: 100%;
    height: 26px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.gbar:hover { transform: scaleY(1.12); filter: brightness(1.3); }
.gbar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 60%);
    border-radius: 6px;
    pointer-events: none;
}
.gbar.ms1 { background: var(--gms1); box-shadow: 0 0 12px rgba(0,229,180,0.4); }
.gbar.ms2 { background: var(--gms2); box-shadow: 0 0 12px rgba(77,159,255,0.4); }
.gbar.ms3 { background: var(--gms3); box-shadow: 0 0 12px rgba(255,107,74,0.4); }
.gbar.ms4 { background: var(--gms4); box-shadow: 0 0 12px rgba(199,125,255,0.4); }
.gbar.done { opacity: var(--done-opacity); }
.gbar.done::before {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: rgba(0,0,0,0.55);
    z-index: 1;
}

/* Row stagger animations */
.gantt-wrap .g-row { animation: gFadeUp 0.4s ease both; }
.gantt-wrap .g-row:nth-child(1)  { animation-delay: 0.10s; }
.gantt-wrap .g-row:nth-child(2)  { animation-delay: 0.13s; }
.gantt-wrap .g-row:nth-child(3)  { animation-delay: 0.16s; }
.gantt-wrap .g-row:nth-child(4)  { animation-delay: 0.19s; }
.gantt-wrap .g-row:nth-child(5)  { animation-delay: 0.22s; }
.gantt-wrap .g-row:nth-child(6)  { animation-delay: 0.25s; }
.gantt-wrap .g-row:nth-child(7)  { animation-delay: 0.28s; }
.gantt-wrap .g-row:nth-child(8)  { animation-delay: 0.31s; }
.gantt-wrap .g-row:nth-child(9)  { animation-delay: 0.34s; }
.gantt-wrap .g-row:nth-child(10) { animation-delay: 0.37s; }
.gantt-wrap .g-row:nth-child(11) { animation-delay: 0.40s; }
.gantt-wrap .g-row:nth-child(12) { animation-delay: 0.43s; }
.gantt-wrap .g-row:nth-child(13) { animation-delay: 0.46s; }
.gantt-wrap .g-row:nth-child(14) { animation-delay: 0.49s; }
.gantt-wrap .g-row:nth-child(15) { animation-delay: 0.52s; }
.gantt-wrap .g-row:nth-child(16) { animation-delay: 0.55s; }
.gantt-wrap .g-row:nth-child(17) { animation-delay: 0.58s; }
.gantt-wrap .g-row:nth-child(18) { animation-delay: 0.61s; }
.gantt-wrap .g-row:nth-child(19) { animation-delay: 0.64s; }
.gantt-wrap .g-row:nth-child(20) { animation-delay: 0.67s; }
.gantt-wrap .g-row:nth-child(21) { animation-delay: 0.70s; }

@keyframes gFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Gantt footer */
.g-footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.g-footer-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--t2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.g-done-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,229,180,0.08);
    border: 1px solid rgba(0,229,180,0.22);
    border-radius: 20px;
    padding: 5px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--gms1);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.g-done-badge::before {
    content: '●';
    font-size: 6px;
}

/* Footer */
footer {
    padding: 80px 0 0;
    border-top: 1px solid var(--bdr);
}
.ftr-grid {
    display: flex;
    gap: 64px;
    padding-bottom: 60px;
    align-items: flex-start;
}
.ftr-brand {
    flex: 0 0 260px;
}
.ftr-cols {
    flex: 1;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}
.ftr-logos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}
.ftr-site-name {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--t);
}
.ftr-site-name span {
    color: var(--acc);
}
.ftr-dept-logo {
    height: 48px;
    width: auto;
    opacity: 0.85;
    filter: brightness(1.1);
}
.ftr-desc {
    font-size: 13px;
    color: var(--t2);
    line-height: 1.7;
    max-width: 280px;
}
.ftr-col {}
.ftr-heading {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--acc);
    margin-bottom: 20px;
}
.ftr-address {
    font-style: normal;
    font-size: 13px;
    color: var(--t2);
    line-height: 1.8;
}
.ftr-address p + p {
    margin-top: 12px;
}
.ftr-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ftr-link {
    font-size: 13px;
    color: var(--t2);
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}
.ftr-link:hover {
    color: var(--acc);
}
.ftr-bottom {
    border-top: 1px solid var(--bdr);
    padding: 24px 0;
}
.ftr-copy {
    font-size: 12px;
    color: var(--t2);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

/* Budget Section */
#budget { padding: 120px 0; border-top: 1px solid var(--bdr); }

.bgt-wrap {
    margin-top: 48px;
    overflow-x: auto;
    border: 1px solid var(--bdr);
}

.bgt {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Header row */
.bgt thead tr {
    background: var(--bg3);
    border-bottom: 1px solid var(--bdr);
}
.bgt thead th {
    padding: 18px 24px;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--acc);
    text-align: center;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.bgt thead th.bgt-name {
    text-align: left;
    width: 55%;
}

/* Body rows */
.bgt tbody tr {
    border-bottom: 1px solid rgba(0, 229, 255, 0.07);
    transition: background 0.2s;
}
.bgt tbody tr:nth-child(even) {
    background: var(--row-even);
}
.bgt tbody tr:hover {
    background: var(--row-hover);
}
.bgt tbody td {
    padding: 15px 24px;
    color: var(--t2);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}
.bgt-item {
    text-align: left !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    color: var(--t) !important;
}

/* Total row */
.bgt-total {
    background: var(--badge-bg) !important;
    border-top: 2px solid var(--acc) !important;
}
.bgt-total td {
    padding: 20px 24px !important;
    font-family: 'Syne', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--acc) !important;
    text-align: right !important;
}
.bgt-total td:first-child {
    text-align: left !important;
}
.bgt-total td:last-child {
    color: var(--acc) !important;
    font-size: 18px !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--bdr);
    color: var(--t2);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    padding: 0;
    flex-shrink: 0;
    margin-left: 12px;
}
.theme-toggle:hover {
    border-color: var(--acc);
    color: var(--acc);
    background: var(--badge-bg);
}
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Light mode: page transition */
html {
    transition: background-color 0.3s, color 0.3s;
}

/* Mobile Nav Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--bdr);
    border-radius: 4px;
    padding: 8px 9px;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
}
.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--t);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Responsive Design */
@media (max-width: 900px) {
    /* ── Navigation ── */
    nav {
        padding: 12px 20px;
    }
    .nav-hamburger {
        display: flex;
    }
    .nls {
        display: none;
    }
    .nls.open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        padding: 80px 32px 40px;
    }
    .nls.open li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--bdr);
        padding-bottom: 20px;
    }
    .nls.open a {
        font-size: 18px;
        letter-spacing: 0.06em;
    }

    /* ── Container ── */
    .con {
        padding: 0 20px;
    }

    /* ── Hero ── */
    #hero {
        display: block;
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 20px;
    }
    .hero-inner {
        flex-direction: column-reverse;
        gap: 24px;
        padding-top: 24px;
        padding-bottom: 16px;
    }
    .hright {
        flex: 0 0 auto;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }
    .probe-img {
        max-width: 260px;
        transform: scaleX(-1) rotate(0deg);
    }
    .hs {
        position: static;
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 24px;
        padding: 20px 20px 24px;
        animation: none;
        opacity: 1;
    }
    .st { text-align: left; }
    .sn { font-size: 28px; }
    .sh { display: none; }

    /* ── Section padding ── */
    #problem, #architecture, #techstack, #features, #team, #timeline, #budget {
        padding: 80px 0;
    }
    .shd { margin-bottom: 48px; }

    /* ── Problem ── */
    .pg { grid-template-columns: 1fr; }
    .pc { padding: 32px 24px; }
    .pn { font-size: 56px; }

    /* ── Architecture ── */
    .arc-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    .arc-tab {
        min-width: 110px;
        padding: 12px 14px;
    }
    .arc-tab-name { font-size: 15px; }
    .arc-panel-hero {
        padding: 28px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .arc-panel-items {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    /* ── Tech Stack ── */
    .ts-diagram { flex-direction: column; }
    .ts-harrow { display: none; }
    .ts-chip-row { flex-direction: column; }
    .ts-stage { min-width: 0; }

    /* ── Features ── */
    .fl2 { gap: 32px; }
    .fi { padding: 24px 20px; }

    /* ── Team ── */
    .tm-row { gap: 16px; }
    .tm-card { width: 140px; }
    .tm-avatar-wrap { width: 96px; height: 96px; }
    .tm-name { font-size: 12px; }

    /* ── Timeline / Gantt ── */
    .gantt-wrap { border-radius: 10px; }
    .g-row { min-width: 700px; }
    :root { --lbl-w: 200px; }
    .g-legend { gap: 16px; }
    .g-footer { flex-direction: column; align-items: flex-start; }

    /* ── Budget ── */
    .bgt thead th, .bgt tbody td { padding: 12px 16px; }

    /* ── Footer ── */
    .ftr-grid {
        flex-direction: column;
        gap: 32px;
    }
    .ftr-brand { flex: none; width: 100%; }
    .ftr-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    /* ── Navigation ── */
    .nb { display: none; }
    .nav-logo { height: 36px; }

    /* ── Hero ── */
    #hero { padding-top: 60px; }
    .hright { max-width: 200px; }
    .probe-img { max-width: 200px; }
    .hd { font-size: 15px; }
    .hb {
        flex-direction: column;
        gap: 10px;
    }
    .bp, .bs {
        text-align: center;
        width: 100%;
        padding: 14px 24px;
    }
    .hs { gap: 16px; padding: 16px 20px 20px; }
    .sn { font-size: 22px; }

    /* ── Problem ── */
    .pc { padding: 24px 16px; }
    .pn { font-size: 40px; }
    .pt { font-size: 17px; }

    /* ── Architecture ── */
    .arc-tab { min-width: 88px; padding: 10px 10px; }
    .arc-tab-name { font-size: 13px; }
    .arc-tab-sub { display: none; }
    .arc-panel-hero { padding: 20px 16px; }
    .arc-hero-badge { align-self: flex-start; }
    .arc-panel-items { grid-template-columns: 1fr 1fr; }

    /* ── Team ── */
    .tm-row { gap: 10px; }
    .tm-card { width: calc(50% - 5px); max-width: 160px; }
    .tm-avatar-wrap { width: 80px; height: 80px; }
    .tm-group-label { font-size: 10px; }

    /* ── Timeline ── */
    .g-row { min-width: 560px; }
    :root { --lbl-w: 150px; }

    /* ── Budget ── */
    .bgt thead th, .bgt tbody td { padding: 10px 12px; font-size: 11px; }
    .bgt-item { font-size: 12px !important; }
    .bgt-total td { font-size: 14px !important; }
    .bgt-total td:last-child { font-size: 15px !important; }

    /* ── Footer ── */
    .ftr-cols { grid-template-columns: 1fr; }
    .ftr-grid { gap: 24px; }
    .ftr-copy { font-size: 11px; }
    .ftr-bottom { padding: 16px 0; }
}