/* ========================================
   gabs.day — Deep-Sea Dashboard
   ======================================== */

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

:root {
    --abyss-black: #020810;
    --midnight-navy: #0d1b2a;
    --trench-blue: #2a4a6b;
    --seafog-gray: #8fa8c2;
    --arctic-steel: #c0d8e8;
    --bioluminescent-teal: #00e5c7;
    --angler-gold: #d4a843;
    --brushed-chrome: #e8edf2;
    --panel-hover: #122538;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--abyss-black);
    color: var(--seafog-gray);
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ---- SONAR PING ---- */
.sonar-ping {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 2px solid var(--bioluminescent-teal);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.sonar-ping.active {
    animation: sonarExpand 1.5s ease-out forwards;
}

@keyframes sonarExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 60vmin;
        height: 60vmin;
        opacity: 0;
    }
}

/* ---- DEPTH GAUGE ---- */
.depth-gauge {
    position: fixed;
    right: 0;
    top: 0;
    width: 4px;
    height: 100vh;
    background: rgba(42, 74, 107, 0.3);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.depth-gauge.visible {
    opacity: 1;
}

.depth-gauge-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--bioluminescent-teal), rgba(0, 229, 199, 0.3));
    transition: height 0.05s linear;
}

.depth-label {
    position: absolute;
    right: 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--bioluminescent-teal);
    letter-spacing: 0.06em;
    opacity: 0.6;
    transform: translateY(-50%);
    font-variant-numeric: tabular-nums;
}

/* ---- HERO ---- */
.hero-panel {
    position: relative;
    height: 100vh;
    display: grid;
    grid-template-columns: 2fr 1fr;
    background: linear-gradient(180deg, var(--midnight-navy) 0%, var(--abyss-black) 100%);
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    z-index: 2;
}

.site-title {
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--arctic-steel);
    text-shadow: 0 0 20px rgba(0, 229, 199, 0.15);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.site-title.visible {
    opacity: 1;
}

.subtitle-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    color: var(--bioluminescent-teal);
    letter-spacing: 0.06em;
    margin-top: 1rem;
    font-variant-numeric: tabular-nums;
    min-height: 1.5em;
}

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

@keyframes blink {
    50% { opacity: 0; }
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    border-left: 1px solid var(--trench-blue);
    z-index: 2;
}

.sidebar-readout {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.readout-label {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--trench-blue);
}

.readout-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    color: var(--bioluminescent-teal);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.status-online {
    color: var(--bioluminescent-teal);
}

/* ---- CIRCUIT TRACES ---- */
.circuit-traces {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.trace {
    fill: none;
    stroke: var(--trench-blue);
    stroke-width: 0.5;
    opacity: 0.3;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke 0.8s ease;
}

.trace.illuminated {
    stroke-dashoffset: 0;
    stroke: var(--bioluminescent-teal);
    opacity: 0.5;
}

.solder {
    fill: var(--trench-blue);
    opacity: 0.3;
}

.solder.illuminated {
    fill: var(--bioluminescent-teal);
    opacity: 0.6;
}

/* ---- DEPTH BANDS ---- */
.depth-band {
    height: 120px;
    width: 100%;
    position: relative;
}

.epipelagic {
    background: linear-gradient(180deg, var(--midnight-navy), #0f2035);
}

.mesopelagic {
    background: linear-gradient(180deg, #0b1826, #071220);
    background-image:
        radial-gradient(1px 1px at 20% 40%, rgba(0, 229, 199, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 70%, rgba(0, 229, 199, 0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 20%, rgba(0, 229, 199, 0.08) 0%, transparent 100%),
        linear-gradient(180deg, #0b1826, #071220);
}

.bathypelagic {
    background: linear-gradient(180deg, #050e18, #030a12);
    background-image:
        radial-gradient(1px 1px at 30% 50%, rgba(0, 229, 199, 0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 30%, rgba(0, 229, 199, 0.05) 0%, transparent 100%),
        linear-gradient(180deg, #050e18, #030a12);
}

.abyssopelagic {
    background: var(--abyss-black);
}

/* ---- DASHBOARD GRID ---- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0;
    padding: 0;
}

/* When 2 panels in a row */
.dashboard-grid:nth-of-type(2) {
    grid-template-columns: 1fr 2fr;
}

.dashboard-grid:nth-of-type(3) {
    grid-template-columns: 2fr 1fr;
}

/* ---- PANELS ---- */
.panel {
    position: relative;
    padding: 2.5rem;
    background: var(--midnight-navy);
    border: 1px solid var(--trench-blue);
    border-radius: 2px;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.3s ease;
}

.panel:hover {
    background: var(--panel-hover);
    border-color: rgba(0, 229, 199, 0.6);
}

.panel:hover .trace {
    stroke: var(--bioluminescent-teal);
    opacity: 0.7;
}

.panel-coords {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--trench-blue);
    letter-spacing: 0.06em;
    opacity: 0.5;
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.panel h2 {
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--arctic-steel);
    text-shadow: 0 0 20px rgba(0, 229, 199, 0.15);
    margin-bottom: 1rem;
}

.panel p {
    color: var(--seafog-gray);
    line-height: 1.72;
}

/* ---- SLIDE REVEAL ---- */
.slide-left {
    transform: translateX(-60px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.slide-right {
    transform: translateX(60px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.slide-left.revealed,
.slide-right.revealed {
    transform: translateX(0);
    opacity: 1;
}

.panel.revealed {
    border-color: var(--bioluminescent-teal);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease, border-color 0.3s ease;
}

.panel.border-settled {
    border-color: var(--trench-blue);
}

/* ---- DATA READOUTS ---- */
.data-readout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(42, 74, 107, 0.3);
}

.data-key {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--trench-blue);
}

.data-val {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    color: var(--bioluminescent-teal);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.gold-accent {
    color: var(--angler-gold);
}

/* ---- TERMINAL FOOTER ---- */
.terminal-footer {
    background: var(--abyss-black);
    padding: 3rem 2.5rem;
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
}

.terminal-content {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    color: var(--bioluminescent-teal);
    letter-spacing: 0.06em;
    line-height: 2;
    font-variant-numeric: tabular-nums;
    width: 100%;
}

.terminal-line {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.terminal-line.visible {
    opacity: 1;
}

.terminal-cursor {
    display: inline;
    animation: blink 1s step-end infinite;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-sidebar {
        border-left: none;
        border-top: 1px solid var(--trench-blue);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .dashboard-grid,
    .dashboard-grid:nth-of-type(2),
    .dashboard-grid:nth-of-type(3) {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 2rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .slide-left,
    .slide-right {
        transform: translateY(40px);
    }
}
