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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: #f0f0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1.05rem);
    line-height: 1.75;
    letter-spacing: 0.03em;
    overflow-x: hidden;
}

/* CRT Scanline Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.015) 2px,
        rgba(255,255,255,0.015) 4px
    );
}

/* === TYPOGRAPHY === */
h1, h2, .section-header {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card-label, .panel-label, .status-badge {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
}

/* === PROJECTIONS === */
.projection {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

/* === PROJECTION ALPHA === */
#projection-alpha {
    height: 100vh;
    background: #0a0a0a;
}

.reticle {
    position: absolute;
    top: 2rem;
    left: 2rem;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    border: 1px solid #f0f0f0;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    color: #f0f0f0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.status-badge.visible {
    opacity: 1;
}

.hero-container {
    text-align: center;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 12rem);
    color: #f0f0f0;
    text-shadow: 0 0 20px rgba(240,240,240,0.3), 0 0 60px rgba(240,240,240,0.1);
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    animation: charAppear 0.3s forwards;
}

@keyframes charAppear {
    0% { opacity: 1; text-shadow: 0 0 40px #ffffff; }
    100% { opacity: 1; text-shadow: 0 0 20px rgba(240,240,240,0.3), 0 0 60px rgba(240,240,240,0.1); }
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    color: #777777;
    margin-top: 1rem;
}

.cursor {
    animation: blink 530ms infinite;
}

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

/* === PROJECTION BETA === */
.benday-field {
    background:
        radial-gradient(circle, #333333 1.5px, transparent 1.5px);
    background-size: 8px 8px;
}

.scan-cards {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1100px;
}

.scan-card {
    width: 300px;
    padding: 2rem;
    background: #1a1a1a;
    border: 1px solid #333333;
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scan-card:hover {
    border-color: #f0f0f0;
}

.card-icon {
    margin-bottom: 1rem;
}

.card-text {
    color: #777777;
}

/* === HUD PANEL BRACKETS === */
.hud-panel {
    position: relative;
}

.hud-panel::before,
.hud-panel::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #f0f0f0;
    border-style: solid;
    transition: width 0.3s, height 0.3s;
}

.hud-panel::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.hud-panel::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.hud-panel:hover::before,
.hud-panel:hover::after {
    width: 28px;
    height: 28px;
}

/* === PROJECTION GAMMA === */
#projection-gamma {
    min-height: 100vh;
}

.core-eye {
    margin-bottom: 3rem;
}

.data-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
}

.data-panel {
    padding: 2rem;
    background: #1a1a1a;
    border: 1px solid #333333;
    transition: border-color 0.3s, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.data-panel:hover {
    border-color: #f0f0f0;
}

.panel-text {
    color: #777777;
    margin-top: 0.5rem;
}

/* === PROJECTION DELTA === */
#projection-delta {
    min-height: 80vh;
}

.section-header {
    font-size: clamp(1.5rem, 3vw, 3rem);
    margin-bottom: 3rem;
    text-shadow: 0 0 20px rgba(240,240,240,0.3), 0 0 60px rgba(240,240,240,0.1);
}

.icon-ribbon {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.icon-tile {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #333333;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.icon-tile:last-child {
    border-right: none;
}

.icon-tile:hover {
    background: radial-gradient(circle, #333333 1.5px, transparent 1.5px);
    background-size: 6px 6px;
}

.icon-tile:hover svg {
    stroke: #ff2d2d;
}

.icon-tile:hover svg * {
    stroke: #ff2d2d;
}

/* === PROJECTION EPSILON === */
#projection-epsilon {
    min-height: 40vh;
    justify-content: center;
}

.end-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    text-shadow: 0 0 20px rgba(240,240,240,0.3), 0 0 60px rgba(240,240,240,0.1);
}

.end-cursor {
    font-family: 'Share Tech Mono', monospace;
}

.footer-copyright {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-size: 0.75rem;
    color: #777777;
}

/* === SPEECH BUBBLES === */
.speech-bubble {
    position: absolute;
    background: #f0f0f0;
    color: #0a0a0a;
    font-family: 'Bungee', cursive;
    font-size: 24px;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transform: scale(0) rotate(-15deg);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #f0f0f0;
}

.speech-bubble.visible {
    transform: scale(1) rotate(var(--bubble-tilt, 0deg));
}

.bubble-1 {
    top: 3rem;
    right: 10%;
    --bubble-tilt: -4deg;
}

.bubble-2 {
    top: 4rem;
    left: 8%;
    --bubble-tilt: 5deg;
}

.bubble-3 {
    top: 2rem;
    right: 15%;
    --bubble-tilt: -6deg;
}

/* === SCROLL REVEAL === */
.projection {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.projection.revealed {
    opacity: 1;
    transform: translateY(0);
}

#projection-alpha {
    opacity: 1;
    transform: none;
}

/* === BENDAY DOT HOVER on cards === */
.scan-card, .data-panel {
    --dot-size: 1.5px;
    background-image: radial-gradient(circle, #333333 var(--dot-size), transparent var(--dot-size));
    background-size: 8px 8px;
    background-color: #1a1a1a;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .scan-cards {
        flex-direction: column;
        align-items: center;
    }

    .data-panels {
        grid-template-columns: 1fr;
    }

    .icon-ribbon {
        flex-wrap: wrap;
    }

    .icon-tile {
        width: 120px;
        height: 120px;
    }
}
