/* concurrent.day — Styles */
/* Anti-design deep-sea monitoring terminal aesthetic */

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

html {
    scroll-behavior: smooth;
    background: #0a0f1a;
    overflow-x: hidden;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.72;
    color: #d4dde6;
    background: #0a0f1a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========== GRADIENT MESH BACKGROUND ========== */
#gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(80px);
    will-change: transform;
}

.mesh-orb-1 {
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, #1a0a3e55, transparent 70%);
    top: 10%;
    left: 15%;
    animation: meshDrift1 30s ease-in-out infinite;
}

.mesh-orb-2 {
    width: 400px;
    height: 600px;
    background: radial-gradient(ellipse, #0a2e1f55, transparent 70%);
    top: 50%;
    left: 60%;
    animation: meshDrift2 30s ease-in-out infinite;
}

.mesh-orb-3 {
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, #2e0a1f55, transparent 70%);
    top: 70%;
    left: 30%;
    animation: meshDrift3 30s ease-in-out infinite;
}

.mesh-orb-4 {
    width: 350px;
    height: 500px;
    background: radial-gradient(ellipse, #1a0a3e44, transparent 70%);
    top: 20%;
    left: 75%;
    animation: meshDrift4 30s ease-in-out infinite;
}

.mesh-orb-5 {
    width: 550px;
    height: 350px;
    background: radial-gradient(ellipse, #0a2e1f44, transparent 70%);
    top: 80%;
    left: 5%;
    animation: meshDrift5 30s ease-in-out infinite;
}

.mesh-orb-6 {
    width: 300px;
    height: 450px;
    background: radial-gradient(ellipse, #2e0a1f44, transparent 70%);
    top: 5%;
    left: 45%;
    animation: meshDrift6 30s ease-in-out infinite;
}

@keyframes meshDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, 40px) scale(1.1); }
    66% { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes meshDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, -30px) scale(1.05); }
    66% { transform: translate(40px, -60px) scale(1.1); }
}

@keyframes meshDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(70px, -50px) scale(1.08); }
    66% { transform: translate(-40px, 30px) scale(0.92); }
}

@keyframes meshDrift4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-80px, 50px) scale(1.12); }
    66% { transform: translate(30px, -40px) scale(0.9); }
}

@keyframes meshDrift5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -70px) scale(1.05); }
    66% { transform: translate(-20px, 60px) scale(1.1); }
}

@keyframes meshDrift6 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 80px) scale(0.95); }
    66% { transform: translate(60px, -30px) scale(1.08); }
}

/* ========== FISH LAYER ========== */
#fish-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.fish {
    position: absolute;
    pointer-events: none;
    offset-rotate: auto;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.15;
    will-change: offset-distance;
}

.fish svg {
    display: block;
}

.fish.startled {
    animation-duration: 3s !important;
}

@keyframes swimPath {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

/* ========== SIDEBAR ========== */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 72px;
    height: 100vh;
    background: #0a0f1a;
    border-right: 1px solid rgba(42, 125, 110, 0.3);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    transition: width 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

#sidebar:hover {
    width: 240px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    margin-bottom: 48px;
    white-space: nowrap;
}

.brand-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00e5c7;
    opacity: 0;
    transition: opacity 300ms ease 100ms;
}

#sidebar:hover .brand-text {
    opacity: 1;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.sidebar-nav li {
    display: block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 4px;
    transition: background 200ms ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(42, 125, 110, 0.1);
}

.nav-marker {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7a8fa3;
    flex-shrink: 0;
    transition: background 300ms ease, box-shadow 300ms ease;
}

.nav-link.active .nav-marker {
    background: #14ffb4;
    box-shadow: 0 0 8px rgba(20, 255, 180, 0.5);
}

.nav-label {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a8fa3;
    opacity: 0;
    transition: opacity 300ms ease 100ms;
}

#sidebar:hover .nav-label {
    opacity: 1;
}

.nav-link.active .nav-label {
    color: #14ffb4;
}

.sidebar-depth {
    padding: 0 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.depth-track {
    width: 4px;
    height: 80px;
    background: rgba(42, 125, 110, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-left: 12px;
}

.depth-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #00e5c7, #2a7d6e);
    border-radius: 2px;
    transition: height 300ms ease;
}

.depth-readout {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #7a8fa3;
    opacity: 0;
    transition: opacity 300ms ease 100ms;
}

#sidebar:hover .depth-readout {
    opacity: 1;
}

/* ========== MAIN CONTENT ========== */
#content {
    margin-left: 72px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.panel {
    min-height: 100vh;
    padding: 80px 40px 80px 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

/* ========== PANEL CONTENT BLOCKS ========== */
.panel-content {
    position: relative;
    padding: 48px;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid rgba(42, 125, 110, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.panel-wide {
    width: 85%;
    max-width: 900px;
}

.panel-medium {
    width: 60%;
    max-width: 650px;
}

.panel-narrow {
    width: 45%;
    max-width: 480px;
}

.panel-offset-right {
    align-self: flex-end;
    margin-right: 0;
}

.panel-overlap-left {
    margin-top: -60px;
    margin-left: 20%;
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal-right {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed,
.reveal-up.revealed {
    clip-path: inset(0 0 0 0);
}

/* ========== TYPOGRAPHY ========== */
.panel-heading {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(28px, 5vw, 72px);
    letter-spacing: 0.04em;
    line-height: 1.05;
    color: #d4dde6;
    margin-bottom: 24px;
}

.panel-heading-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    float: left;
    margin-right: 32px;
    margin-bottom: 0;
    font-size: clamp(24px, 4vw, 56px);
}

.panel-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.72;
    color: #d4dde6;
    margin-bottom: 16px;
    max-width: 640px;
}

.panel-text:last-child {
    margin-bottom: 0;
}

.panel-epigraph {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 19px;
    line-height: 1.72;
    color: #7a8fa3;
    margin-bottom: 40px;
    max-width: 560px;
}

.panel-label {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2a7d6e;
    display: block;
    margin-bottom: 20px;
}

.panel-quote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(20px, 3vw, 36px);
    line-height: 1.35;
    color: #7a8fa3;
    border-left: 2px solid #2a7d6e;
    padding-left: 24px;
}

/* ========== THREAD SVG ========== */
.thread-svg {
    width: 100%;
    height: 250px;
    display: block;
}

/* ========== SIGNAL CANVAS ========== */
#signal-canvas {
    width: 100%;
    height: 200px;
    display: block;
    background: transparent;
}

/* ========== GLITCH BREAK ========== */
.glitch-break {
    position: relative;
}

.glitch-line {
    position: absolute;
    top: -20px;
    left: -48px;
    right: -48px;
    height: 1px;
    background: #e8734a;
    transform: rotate(7deg);
    transform-origin: left center;
}

.glitch-raw {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #e8734a;
    opacity: 0.7;
    padding: 20px 0;
    word-break: break-all;
}

.panel-glitch .panel-content {
    border-color: rgba(232, 115, 74, 0.2);
}

/* ========== EMERGENCE RINGS ========== */
.emergence-rings {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 40px auto;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringPulse 8s ease-in-out infinite;
}

.ring-1 {
    width: 80px;
    height: 80px;
    border-color: rgba(0, 229, 199, 0.5);
    animation-delay: 0s;
}

.ring-2 {
    width: 140px;
    height: 140px;
    border-color: rgba(0, 229, 199, 0.3);
    animation-delay: -2s;
}

.ring-3 {
    width: 210px;
    height: 210px;
    border-color: rgba(20, 255, 180, 0.2);
    animation-delay: -4s;
}

.ring-4 {
    width: 280px;
    height: 280px;
    border-color: rgba(42, 125, 110, 0.15);
    animation-delay: -6s;
}

@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.5; }
}

/* ========== ABYSS CODA ========== */
.abyss-coda {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.coda-domain {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 28px;
    letter-spacing: 0.04em;
    color: #00e5c7;
}

.coda-note {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a8fa3;
}

.coda-link {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: #14ffb4;
    display: inline-block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(20, 255, 180, 0.3);
    transition: border-color 300ms ease;
}

.coda-link:hover {
    border-color: #14ffb4;
}

/* ========== GLITCH OVERLAY ========== */
#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 229, 199, 0.03) 2px,
        rgba(0, 229, 199, 0.03) 4px
    );
    transition: opacity 200ms ease;
}

#glitch-overlay.active {
    opacity: 1;
}


/* Deep current accent — #0d1b2a */
.panel-drift .panel-content {
    background: rgba(13, 27, 42, 0.7);
    border-color: rgba(42, 125, 110, 0.15);
}

.panel-signal .panel-content {
    background: rgba(13, 27, 42, 0.6);
}

.panel:nth-child(even) {
    border-left: 2px solid #0d1b2a;
}
/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    #sidebar {
        width: 56px;
    }

    #sidebar:hover {
        width: 200px;
    }

    #content {
        margin-left: 56px;
    }

    .panel {
        padding: 60px 20px 60px 30px;
    }

    .panel-content {
        padding: 32px;
    }

    .panel-wide,
    .panel-medium,
    .panel-narrow {
        width: 100%;
    }

    .panel-offset-right {
        align-self: flex-start;
    }

    .panel-overlap-left {
        margin-top: 0;
        margin-left: 0;
    }

    .panel-heading {
        font-size: clamp(24px, 8vw, 48px);
    }
}
