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

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(ellipse at center, #0f2a2e 0%, #0a1a1f 70%);
    min-height: 100vh;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    line-height: 1.65;
    letter-spacing: 0.03em;
    color: #c8e6e3;
    cursor: none;
    overflow-x: hidden;
}

/* === CUSTOM CURSOR === */
#custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #5bbfb5;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px #5bbfb5, 0 0 24px rgba(91, 191, 181, 0.3);
    transition: opacity 0.3s;
    will-change: transform;
}

/* === BACKGROUND BLOBS === */
#blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    background: #1a4040;
    border: 1px solid #2d6b6b;
    filter: blur(40px);
    opacity: 0.6;
    transition: transform 0.6s ease-out, border-color 0.6s ease-out;
    will-change: transform;
}

#blob-0 {
    width: 350px; height: 350px;
    top: 5%; left: 8%;
    border-radius: 30% 70% 60% 40% / 50% 30% 70% 50%;
    animation: drift0 60s ease-in-out infinite;
}
#blob-1 {
    width: 280px; height: 280px;
    top: 25%; right: 5%;
    border-radius: 50% 30% 45% 55% / 40% 60% 35% 65%;
    animation: drift1 55s ease-in-out infinite;
}
#blob-2 {
    width: 420px; height: 420px;
    top: 45%; left: 3%;
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 35%;
    animation: drift2 65s ease-in-out infinite;
}
#blob-3 {
    width: 300px; height: 300px;
    top: 65%; right: 10%;
    border-radius: 55% 45% 35% 65% / 45% 55% 50% 50%;
    animation: drift3 58s ease-in-out infinite;
}
#blob-4 {
    width: 500px; height: 500px;
    top: 82%; left: 15%;
    border-radius: 35% 65% 50% 50% / 60% 35% 65% 40%;
    animation: drift4 62s ease-in-out infinite;
}

@keyframes drift0 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(50px, 30px); }
    50% { transform: translate(-30px, 50px); }
    75% { transform: translate(40px, -20px); }
}
@keyframes drift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-40px, 40px); }
    50% { transform: translate(60px, -30px); }
    75% { transform: translate(-50px, 20px); }
}
@keyframes drift2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(70px, -40px); }
    50% { transform: translate(-40px, -20px); }
    75% { transform: translate(30px, 50px); }
}
@keyframes drift3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-60px, -30px); }
    50% { transform: translate(50px, 40px); }
    75% { transform: translate(-30px, -50px); }
}
@keyframes drift4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(80px, 20px); }
    50% { transform: translate(-50px, -40px); }
    75% { transform: translate(40px, 30px); }
}

/* === TERMINAL === */
#terminal {
    position: relative;
    z-index: 1;
    width: min(680px, 90vw);
    margin: 60px auto;
    background: #0f2a2e;
    border: 1px solid #3d8b8b;
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
}

/* Title bar */
.terminal-titlebar {
    height: 12px;
    background: rgba(15, 42, 46, 0.8);
    border-bottom: 1px solid #3d8b8b;
    display: flex;
    align-items: center;
    padding-left: 8px;
    gap: 5px;
}

.titlebar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red { background: #e07a5f; }
.dot-green { background: #5bbfb5; }
.dot-teal { background: #3d8b8b; }

/* Transmission blocks */
.transmission-block {
    padding: 30px 24px;
}

.hidden-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.hidden-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.block-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #5bbfb5;
    margin-bottom: 20px;
}

/* Block 1: Boot */
.boot-line {
    color: #c8e6e3;
    white-space: pre;
    overflow: hidden;
    line-height: 1.65;
}

.boot-line.flash {
    color: #5bbfb5;
}

/* Block 2: Field Theory */
.ascii-diagram {
    color: #5bbfb5;
    text-shadow: 0 0 4px rgba(91, 191, 181, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    line-height: 1.5;
    margin: 20px 0;
    text-align: center;
}

.accent-bright {
    color: #5bbfb5;
}

.terminal-text {
    color: #c8e6e3;
    margin: 12px 0;
}

.equation {
    font-family: 'Share Tech Mono', monospace;
    color: #c8e6e3;
    font-size: 1.1em;
    margin: 16px 0;
    padding-left: 20px;
}

.missing-monopole {
    color: #5bbfb5;
}

.coral-marker {
    color: #e07a5f;
    font-size: 0.85em;
}

.coral-text {
    color: #e07a5f;
}

/* Block 3: Timeline */
.timeline {
    border-left: 1px solid #3d8b8b;
    padding-left: 20px;
    margin: 10px 0;
}

.timeline-entry {
    margin: 12px 0;
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.timestamp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #5bbfb5;
    flex-shrink: 0;
    min-width: 48px;
}

.log-text {
    color: #c8e6e3;
}

/* Block 4: Dirac */
.dirac-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #e8f4f2;
    min-height: 200px;
    padding: 20px 0;
}

.dirac-text .word {
    display: inline-block;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 300ms ease-out, filter 300ms ease-out;
    margin-right: 0.25em;
}

.dirac-text .word.revealed {
    opacity: 1;
    filter: blur(0);
}

/* Block 5: Detection blobs */
.detection-blobs {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 16px 0;
}

.detection-blob {
    background: #1a4040;
    border: 1px solid #2d6b6b;
    border-radius: 30% 70% 60% 40% / 50% 30% 70% 50%;
    padding: 30px 28px;
    transition: transform 0.4s ease-out, border-color 0.4s ease-out;
}

.detection-blob:nth-child(2) {
    border-radius: 50% 30% 45% 55% / 40% 60% 35% 65%;
}

.detection-blob:nth-child(3) {
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 35%;
}

.detection-blob h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #5bbfb5;
    margin-bottom: 10px;
}

.detection-blob p {
    color: #c8e6e3;
}

/* Block 6: Man page */
.man-page {
    margin: 10px 0;
}

.man-header {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    color: #5bbfb5;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.man-section {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    color: #e8f4f2;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 16px 0 4px 0;
}

.man-body {
    color: #c8e6e3;
    white-space: pre-wrap;
}

/* Block 7: Noise / Signal */
.noise-pre {
    font-family: 'Share Tech Mono', monospace;
    color: #3d8b8b;
    line-height: 1.4;
    min-height: 120px;
    word-break: break-all;
    white-space: pre-wrap;
}

.final-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #e8f4f2;
    padding: 20px 0 0 0;
}

.cursor-blink {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    color: #5bbfb5;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Curve dividers */
.curve-divider {
    height: 40px;
    padding: 0 24px;
    overflow: visible;
}

.curve-divider svg {
    width: 100%;
    height: 40px;
    overflow: visible;
}

.curve-divider svg path {
    fill: none;
    stroke: #3d8b8b;
    stroke-width: 0.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease-out;
}

.curve-divider.drawn svg path {
    stroke-dashoffset: 0;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    #terminal {
        margin: 20px auto;
    }
    .transmission-block {
        padding: 20px 16px;
    }
    .detection-blob {
        padding: 20px 18px;
    }
}
