/* ============================================================
   YONGZOON.NET — Deep-Space Network Terminal
   Palette: Deep Space Blue #0a1628 | Ocean Cyan #0d7377 |
            Sonar Teal #14a3a8 | Pale Signal #b8d8d8 |
            Hull Gray #2a3a4a | Warning Amber #d4a843 |
            Abyss Black #050d18
   Fonts: Rajdhani (display) | Nunito Sans (body) | Cousine (mono)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --deep-space:    #0a1628;
    --ocean-cyan:    #0d7377;
    --sonar-teal:    #14a3a8;
    --pale-signal:   #b8d8d8;
    --hull-gray:     #2a3a4a;
    --warning-amber: #d4a843;
    --abyss-black:   #050d18;
    --elastic:       cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --smooth:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-space);
    color: var(--pale-signal);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────── */
.font-display  { font-family: 'Rajdhani', sans-serif; }
.font-mono     { font-family: 'Cousine', monospace; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--abyss-black); }
::-webkit-scrollbar-thumb { background: var(--ocean-cyan); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════
   BRIDGE / HERO
   ══════════════════════════════════════════════════════════ */
.bridge {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: var(--deep-space);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Radial glow from center */
.bridge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 55% at 50% 50%,
        rgba(13, 115, 119, 0.12) 0%,
        rgba(20, 163, 168, 0.06) 40%,
        transparent 70%);
    pointer-events: none;
}

/* Star-field subtle dots */
.bridge::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 20%, rgba(184,216,216,0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 82% 13%, rgba(184,216,216,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 37% 70%, rgba(184,216,216,0.20) 0%, transparent 100%),
        radial-gradient(1px 1px at 68% 55%, rgba(184,216,216,0.30) 0%, transparent 100%),
        radial-gradient(1px 1px at 91% 78%, rgba(184,216,216,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 24% 88%, rgba(184,216,216,0.20) 0%, transparent 100%),
        radial-gradient(1px 1px at 56% 32%, rgba(184,216,216,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 74% 88%, rgba(184,216,216,0.18) 0%, transparent 100%),
        radial-gradient(1px 1px at 43% 45%, rgba(184,216,216,0.12) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 8% 60%, rgba(20,163,168,0.20) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── HUD Overlays ─────────────────────────────────────────── */
.bridge-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    z-index: 10;
}

.hud-top-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sys-id {
    font-family: 'Cousine', monospace;
    font-size: 0.85rem;
    color: var(--sonar-teal);
    letter-spacing: 0.05em;
}

.sys-status {
    font-family: 'Cousine', monospace;
    font-size: 0.7rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.1em;
}

.hud-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.hud-label {
    font-family: 'Cousine', monospace;
    font-size: 0.65rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.12em;
    opacity: 0.7;
}

.hud-value {
    font-family: 'Cousine', monospace;
    font-size: 0.8rem;
    color: var(--pale-signal);
    letter-spacing: 0.06em;
}

.status-active { color: var(--sonar-teal); }

.bridge-hud-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 1.2rem 2rem;
    z-index: 10;
    border-top: 1px solid rgba(13,115,119,0.15);
    background: linear-gradient(to top, rgba(5,13,24,0.7), transparent);
}

.hud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

/* ── HUD SVG Overlay ─────────────────────────────────────── */
.hud-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* ── Globe ────────────────────────────────────────────────── */
.globe-viewport {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    z-index: 1;
}

.globe-container {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    perspective: 800px;
    transform-style: preserve-3d;
    animation: globeRotate 30s linear infinite;
}

@keyframes globeRotate {
    from { transform: translate(-50%, -50%) rotateY(0deg); }
    to   { transform: translate(-50%, -50%) rotateY(360deg); }
}

.globe-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 1px solid rgba(13, 115, 119, 0.5);
    transform-style: preserve-3d;
}

.globe-equator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 1.5px solid rgba(20, 163, 168, 0.6);
    transform-style: preserve-3d;
    transform: rotateX(90deg);
}

.globe-tropic {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 1px solid rgba(13, 115, 119, 0.3);
    transform-style: preserve-3d;
}

/* ── Hero Text ────────────────────────────────────────────── */
.bridge-center {
    position: relative;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-text {
    text-align: center;
    margin-top: 260px;
    z-index: 7;
}

.hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 600;
    color: var(--pale-signal);
    letter-spacing: 0.15em;
    text-shadow:
        0 0 30px rgba(13,115,119,0.5),
        0 0 60px rgba(13,115,119,0.2);
    line-height: 1;
}

.hero-subtitle {
    font-family: 'Cousine', monospace;
    font-size: 0.7rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.2em;
    margin-top: 0.6rem;
    opacity: 0.8;
}

.hero-coords {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.coord-item {
    font-family: 'Cousine', monospace;
    font-size: 0.65rem;
    color: var(--hull-gray);
    letter-spacing: 0.08em;
}

.coord-val {
    color: var(--sonar-teal);
}

/* ── Signal Bars ──────────────────────────────────────────── */
.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.signal-bars .bar {
    display: block;
    width: 4px;
    background: var(--hull-gray);
    border-radius: 1px;
}

.signal-bars .bar:nth-child(1) { height: 4px; }
.signal-bars .bar:nth-child(2) { height: 6px; }
.signal-bars .bar:nth-child(3) { height: 9px; }
.signal-bars .bar:nth-child(4) { height: 12px; }
.signal-bars .bar:nth-child(5) { height: 14px; }
.signal-bars .bar.active { background: var(--sonar-teal); }

/* ══════════════════════════════════════════════════════════
   BLINK ANIMATIONS
   ══════════════════════════════════════════════════════════ */
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sonar-teal);
    flex-shrink: 0;
}

.blink {
    animation: blink 1.2s step-end infinite;
}

.blink-slow {
    animation: blink 2.5s step-end infinite;
}

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

/* ══════════════════════════════════════════════════════════
   DATA STREAM TICKER
   ══════════════════════════════════════════════════════════ */
.data-stream {
    background: var(--abyss-black);
    border-top: 1px solid rgba(13,115,119,0.2);
    border-bottom: 1px solid rgba(13,115,119,0.2);
    padding: 0.5rem 0;
    overflow: hidden;
}

.stream-label {
    font-family: 'Cousine', monospace;
    font-size: 0.6rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.18em;
    text-align: center;
    padding: 0.4rem 0 0.2rem;
    opacity: 0.6;
}

.stream-row {
    overflow: hidden;
    white-space: nowrap;
    padding: 0.15rem 0;
}

.stream-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.track-1 {
    animation: ticker 18s linear infinite;
}

.track-2 {
    animation: ticker 24s linear infinite reverse;
}

.track-3 {
    animation: ticker 30s linear infinite;
}

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

.stream-item {
    font-family: 'Cousine', monospace;
    font-size: 0.72rem;
    color: var(--pale-signal);
    letter-spacing: 0.06em;
    opacity: 0.6;
}

.stream-sep {
    font-family: 'Cousine', monospace;
    font-size: 0.72rem;
    color: var(--ocean-cyan);
    opacity: 0.5;
    margin: 0 0.3rem;
}

/* ══════════════════════════════════════════════════════════
   INSTRUMENT PANELS — HEXAGONAL GRID
   ══════════════════════════════════════════════════════════ */
.panels-section {
    padding: 4rem 2rem 6rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-ident {
    font-family: 'Cousine', monospace;
    font-size: 0.7rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.15em;
    white-space: nowrap;
    opacity: 0.7;
}

.header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(13,115,119,0.4), transparent);
}

/* ── Hex Grid ─────────────────────────────────────────────── */
.hex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
    align-items: start;
}

/* Offset even cells to simulate honeycomb */
.hex-cell:nth-child(3n+2) {
    margin-top: 3rem;
}

.hex-cell {
    position: relative;
    aspect-ratio: 1 / 1.15;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--hull-gray);
    transition: transform 0.6s var(--elastic), box-shadow 0.4s var(--smooth);
    cursor: default;
}

.hex-cell:hover {
    transform: translateY(-8px) scale(1.03);
}

.hex-cell::before {
    content: '';
    position: absolute;
    inset: 3px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--deep-space);
    z-index: 0;
}

.hex-inner {
    position: absolute;
    inset: 3px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 18% 12% 10%;
    z-index: 1;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(42,58,74,0.9) 0%, rgba(10,22,40,0.95) 100%);
}

/* Hex cell border glow on hover */
.hex-cell:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(13,115,119,0.06);
    z-index: 2;
    pointer-events: none;
}

/* ── Panel SVG Header ─────────────────────────────────────── */
.panel-svg-header {
    width: 60%;
    max-width: 80px;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.panel-svg-header svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Panel Identifier ─────────────────────────────────────── */
.panel-ident {
    font-family: 'Cousine', monospace;
    font-size: 0.55rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.12em;
    margin-bottom: 0.6rem;
    text-align: center;
    opacity: 0.8;
}

/* ── Panel Content ────────────────────────────────────────── */
.panel-content {
    width: 100%;
    flex: 1;
}

.panel-content p {
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--pale-signal);
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

/* ── Panel Status ─────────────────────────────────────────── */
.panel-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.status-text {
    font-family: 'Cousine', monospace;
    font-size: 0.5rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* ── Data List (Projects) ─────────────────────────────────── */
.data-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.item-id {
    font-family: 'Cousine', monospace;
    font-size: 0.55rem;
    color: var(--ocean-cyan);
    opacity: 0.7;
}

.item-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pale-signal);
    letter-spacing: 0.04em;
}

.item-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.6rem;
    color: var(--pale-signal);
    opacity: 0.6;
    line-height: 1.3;
}

/* ── Skill Matrix ─────────────────────────────────────────── */
.skill-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.skill-name {
    font-family: 'Cousine', monospace;
    font-size: 0.55rem;
    color: var(--pale-signal);
    opacity: 0.8;
    white-space: nowrap;
    min-width: 80px;
    flex-shrink: 0;
}

.skill-bar {
    flex: 1;
    height: 3px;
    background: rgba(42,58,74,0.8);
    border-radius: 2px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ocean-cyan), var(--sonar-teal));
    border-radius: 2px;
    transition: width 1.2s var(--smooth);
}

.skill-pct {
    font-family: 'Cousine', monospace;
    font-size: 0.5rem;
    color: var(--sonar-teal);
    white-space: nowrap;
}

/* ── Transmissions (Log Items) ────────────────────────────── */
.tx-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(13,115,119,0.12);
}

.tx-item:last-child {
    border-bottom: none;
}

.tx-date {
    font-family: 'Cousine', monospace;
    font-size: 0.55rem;
    color: var(--warning-amber);
    opacity: 0.8;
    letter-spacing: 0.08em;
}

.tx-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.65rem;
    color: var(--pale-signal);
    line-height: 1.4;
    opacity: 0.85;
}

/* ── Stack Manifest ───────────────────────────────────────── */
.stack-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.45rem;
}

.stack-layer {
    font-family: 'Cousine', monospace;
    font-size: 0.55rem;
    color: var(--ocean-cyan);
    white-space: nowrap;
    opacity: 0.8;
    min-width: 44px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.stack-items {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.62rem;
    color: var(--pale-signal);
    opacity: 0.8;
    line-height: 1.4;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 0.5rem;
}

.contact-label {
    font-family: 'Cousine', monospace;
    font-size: 0.5rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.contact-link {
    font-family: 'Cousine', monospace;
    font-size: 0.62rem;
    color: var(--sonar-teal);
    text-decoration: none;
    transition: color 0.3s var(--smooth);
    letter-spacing: 0.02em;
}

.contact-link:hover {
    color: var(--pale-signal);
}

.contact-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════
   REVEAL ANIMATIONS (Elastic Entry)
   ══════════════════════════════════════════════════════════ */
.reveal-el {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--smooth), transform 0.8s var(--elastic);
}

.reveal-el.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger for grid cells */
.hex-cell:nth-child(1) { transition-delay: 0.0s; }
.hex-cell:nth-child(2) { transition-delay: 0.1s; }
.hex-cell:nth-child(3) { transition-delay: 0.2s; }
.hex-cell:nth-child(4) { transition-delay: 0.3s; }
.hex-cell:nth-child(5) { transition-delay: 0.4s; }
.hex-cell:nth-child(6) { transition-delay: 0.5s; }

/* ══════════════════════════════════════════════════════════
   ENGINEERING LOG (FOOTER)
   ══════════════════════════════════════════════════════════ */
.eng-log {
    background: var(--abyss-black);
    padding: 2rem;
    font-family: 'Cousine', monospace;
    border-top: 1px solid rgba(13,115,119,0.15);
}

.log-divider {
    font-size: 0.65rem;
    color: rgba(13,115,119,0.35);
    letter-spacing: 0.18em;
    margin-bottom: 1rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
}

.log-entry {
    margin-bottom: 0.8rem;
}

.log-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.log-label {
    font-size: 0.6rem;
    color: var(--ocean-cyan);
    letter-spacing: 0.12em;
    opacity: 0.6;
}

.log-num, .log-ts, .log-op {
    font-size: 0.65rem;
    color: var(--pale-signal);
    opacity: 0.7;
}

.log-sep {
    font-size: 0.6rem;
    color: var(--ocean-cyan);
    opacity: 0.4;
    margin: 0 0.2rem;
}

.log-body {
    padding-left: 0.5rem;
    border-left: 2px solid rgba(13,115,119,0.3);
}

.log-msg {
    font-size: 0.65rem;
    color: var(--pale-signal);
    opacity: 0.55;
    letter-spacing: 0.06em;
    line-height: 1.6;
}

.log-system {
    margin-top: 1rem;
    font-size: 0.55rem;
    color: var(--ocean-cyan);
    opacity: 0.35;
    letter-spacing: 0.1em;
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .hex-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 1.5rem;
    }

    .hex-cell:nth-child(3n+2) {
        margin-top: 0;
    }

    .hex-cell:nth-child(2n) {
        margin-top: 2rem;
    }

    .bridge-hud-bottom {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    .hex-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hex-cell {
        clip-path: none;
        aspect-ratio: auto;
        background: var(--hull-gray);
        border-radius: 4px;
        border: 1px solid rgba(13,115,119,0.2);
    }

    .hex-cell::before {
        clip-path: none;
        border-radius: 3px;
    }

    .hex-inner {
        clip-path: none;
        padding: 1.5rem;
        position: relative;
        inset: auto;
        border-radius: 3px;
    }

    .hex-cell:nth-child(2n) {
        margin-top: 0;
    }

    .hex-cell:nth-child(3n+2) {
        margin-top: 0;
    }

    .hero-text {
        margin-top: 200px;
    }

    .globe-viewport {
        width: 200px;
        height: 200px;
    }

    .globe-container {
        width: 150px;
        height: 150px;
    }

    .globe-ring,
    .globe-equator,
    .globe-tropic {
        width: 150px;
        height: 150px;
        margin: -75px 0 0 -75px;
    }

    .bridge-hud {
        padding: 1rem;
    }

    .panels-section {
        padding: 2rem 1rem 4rem;
    }
}
