/* prototypic.dev -- Software Blueprint */
:root {
    --midnight: #0a0f1e;
    --navy: #0d1a2d;
    --steel: #1a2744;
    --silver: #b0c4de;
    --bright: #d4e5f7;
    --green: #50fa7b;
    --amber: #f0c040;
    --coral: #ff6b6b;
    --teal: #2a8a7a;
    --cyan: #00d4ff;
    --anno: #5a7fa0;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: var(--silver);
    background: var(--midnight);
    overflow-x: hidden;
    cursor: crosshair;
}

/* Blueprint grid */
.blueprint-grid {
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(26,39,68,0.2) 19px, rgba(26,39,68,0.2) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(26,39,68,0.2) 19px, rgba(26,39,68,0.2) 20px),
        repeating-linear-gradient(0deg, transparent, transparent 99px, rgba(26,39,68,0.3) 99px, rgba(26,39,68,0.3) 100px),
        repeating-linear-gradient(90deg, transparent, transparent 99px, rgba(26,39,68,0.3) 99px, rgba(26,39,68,0.3) 100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s;
}
.blueprint-grid.visible { opacity: 1; }

/* Drawing border frame */
.drawing-border { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.border-draw {
    stroke-dasharray: 4424;
    stroke-dashoffset: 4424;
}
.border-draw.drawn { animation: draw-border 2s ease-out forwards; }
@keyframes draw-border { to { stroke-dashoffset: 0; } }

/* Title block */
.title-block {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 10;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--anno);
    border: 1px solid var(--steel);
    padding: 8px 12px;
    background: var(--midnight);
}

/* Sidebar nav */
.sidebar-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    z-index: 10;
}
.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
}
.tab-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--anno);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transition: color 0.3s;
}
.tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--steel);
    transition: background 0.3s, border-color 0.3s;
}
.nav-tab.active .tab-dot { background: var(--green); border-color: var(--green); }
.nav-tab.active .tab-label { color: var(--green); }

/* Content area */
.content-area {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 80px 120px;
}

/* Modules */
.module {
    padding: 60px 0;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.module.visible { opacity: 1; transform: translateX(0); }

.hero-module {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 36px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bright);
    margin-top: 32px;
}
.hero-sub {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--anno);
    margin-top: 8px;
}

.ascii-diagram {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--green);
    line-height: 1.4;
    white-space: pre;
    padding: 24px;
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid var(--steel);
    overflow-x: auto;
    transition: color 0.3s, border-color 0.3s;
}
.ascii-diagram:hover { color: var(--cyan); border-color: var(--teal); }

.module-header { margin-bottom: 24px; }
.module-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bright);
}
.dotted-rule { width: 100%; height: 1px; border-bottom: 1px dotted var(--steel); margin-top: 12px; }

.body-text { margin-bottom: 16px; color: var(--silver); }
.body-text:last-of-type { margin-bottom: 24px; }

/* Dimension lines */
.dimension-line { display: flex; justify-content: center; padding: 32px 0; }
.dimension-line svg { width: 400px; max-width: 100%; height: 20px; }
.dim-draw { stroke-dasharray: 400; stroke-dashoffset: 400; }
.dimension-line.visible .dim-draw { animation: draw-dim 0.6s ease-out forwards; }
@keyframes draw-dim { to { stroke-dashoffset: 0; } }

/* Connection pipes */
.connection-pipe { display: flex; justify-content: center; padding: 16px 0; }
.connection-pipe svg { width: 40px; height: 80px; }
.pipe-draw { stroke-dasharray: 100; stroke-dashoffset: 100; }
.connection-pipe.visible .pipe-draw { animation: draw-pipe 0.8s ease-out forwards; }
@keyframes draw-pipe { to { stroke-dashoffset: 0; } }

/* Terminal module */
.terminal-module { padding: 60px 0 120px; }
.terminal-window { background: #080c14; border: 1px solid var(--steel); border-radius: 6px; overflow: hidden; max-width: 600px; }
.terminal-bar { display: flex; gap: 6px; padding: 10px 14px; background: rgba(26,39,68,0.3); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-red { background: var(--coral); }
.term-yellow { background: var(--amber); }
.term-green { background: var(--green); }
.terminal-body { padding: 16px 20px; }
.term-line {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0;
}
.term-line.typed { opacity: 1; }
.term-input { color: var(--green); }
.term-output { color: var(--silver); }
.term-success { color: var(--green); font-weight: 400; }

@media (max-width: 1024px) {
    .sidebar-nav { display: none; }
    .content-area { padding: 0 24px 80px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 24px; }
    .module-title { font-size: 20px; }
    .title-block { display: none; }
    .drawing-border { display: none; }
}
