/* gabs.bar - Nocturnal Academic Tower */
/* Navy-Metallic Palette */
:root {
    --abyssal-navy: #060A12;
    --midnight-navy: #0A0F1A;
    --deep-navy: #0D1321;
    --gunmetal: #1A2332;
    --slate-steel: #2D3A4A;
    --pewter: #4A6785;
    --brushed-steel: #7C8BA0;
    --polished-silver: #B8C4D4;
    --arctic-chrome: #D4DEE8;
    --liquid-mercury: #E8EDF3;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background-color: var(--midnight-navy);
    color: var(--brushed-steel);
    overflow-x: hidden;
    line-height: 1.75;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
}

/* Floor Indicator */
.floor-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.floor-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--pewter);
    font-weight: 300;
}

.floor-code {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--polished-silver);
    letter-spacing: 0.05em;
}

/* Floor Base */
.floor {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Floor B1: The Vault */
.floor-vault {
    background-color: var(--midnight-navy);
    flex-direction: column;
}

.vault-content {
    text-align: center;
}

.vault-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: -0.02em;
    color: var(--arctic-chrome);
    text-shadow: 0 0 60px rgba(124, 139, 160, 0.15);
    margin-bottom: 2rem;
}

.vault-rule {
    width: 60vw;
    height: 1px;
    background-color: var(--slate-steel);
    margin: 0 auto;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.scroll-chevron {
    position: absolute;
    bottom: 3rem;
    animation: chevronBounce 2s infinite;
}

@keyframes chevronBounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(12px); }
    50% { transform: translateY(6px); }
    70% { transform: translateY(10px); }
    85% { transform: translateY(8px); }
}

/* Floor Dividers */
.floor-divider {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floor-divider.visible {
    opacity: 1;
}

.divider-rule {
    width: 80vw;
    height: 1px;
    background-color: var(--slate-steel);
}

.divider-glyph {
    flex-shrink: 0;
}

/* Floor 0: The Lobby */
.floor-lobby {
    background-color: var(--deep-navy);
    display: flex;
    align-items: center;
    padding: 0 5vw;
    gap: 4vw;
}

.lobby-text {
    flex: 0 0 55%;
    max-width: 60ch;
}

.lobby-epigraph {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--pewter);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.lobby-body {
    color: var(--brushed-steel);
    font-weight: 400;
    line-height: 1.75;
}

.lobby-body strong {
    color: var(--polished-silver);
    font-weight: 500;
}

.lobby-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

.lobby-image-wrapper {
    width: 100%;
    max-width: 280px;
    height: 70vh;
    position: relative;
    border: 2px solid var(--brushed-steel);
    overflow: hidden;
}

.duotone-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--gunmetal) 0%, var(--slate-steel) 30%, var(--gunmetal) 60%, var(--midnight-navy) 100%);
    filter: grayscale(1) brightness(0.7) contrast(1.3);
    mix-blend-mode: luminosity;
}

#lobby-photo {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(124,139,160,0.05) 3px, rgba(124,139,160,0.05) 4px),
        linear-gradient(180deg, var(--slate-steel) 0%, var(--gunmetal) 40%, var(--slate-steel) 70%, var(--midnight-navy) 100%);
}

.duotone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10,15,26,0.4), rgba(124,139,160,0.15));
    z-index: 1;
    pointer-events: none;
}

/* Floor 1: The Reading Room */
.floor-reading {
    background-color: var(--gunmetal);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 8vw;
    gap: 0;
}

.reading-block {
    border: 1px solid rgba(124, 139, 160, 0.15);
    padding: 2rem 2.5rem;
    max-width: 55ch;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-bottom: 1.5rem;
}

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

.reading-block-1 { margin-left: 5%; }
.reading-block-2 { margin-left: 20%; }
.reading-block-3 { margin-left: 35%; }
.reading-block-4 { margin-left: 15%; }

.reading-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.6rem, 0.9vw, 0.75rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--pewter);
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.reading-block p {
    color: var(--brushed-steel);
    font-weight: 400;
    line-height: 1.75;
}

/* Floor 2: The Terminal Room */
.floor-terminal {
    background-color: var(--deep-navy);
    display: flex;
    padding: 0;
    position: relative;
}

.terminal-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 47px,
        rgba(45, 58, 74, 0.03) 47px,
        rgba(45, 58, 74, 0.03) 48px
    ),
    repeating-linear-gradient(
        90deg,
        transparent,
        transparent 47px,
        rgba(45, 58, 74, 0.03) 47px,
        rgba(45, 58, 74, 0.03) 48px
    );
    pointer-events: none;
    z-index: 0;
}

.terminal-panel-left {
    flex: 0 0 62%;
    padding: 6vh 4vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

.terminal-chrome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--gunmetal);
    border: 1px solid var(--slate-steel);
    border-bottom: none;
    border-radius: 2px 2px 0 0;
}

.terminal-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--pewter);
    font-weight: 300;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--slate-steel);
}

.terminal-body {
    background-color: var(--midnight-navy);
    border: 1px solid var(--slate-steel);
    border-radius: 0 0 2px 2px;
    padding: 2rem;
    min-height: 40vh;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.8rem, 1.3vw, 0.95rem);
    line-height: 1.8;
    color: var(--polished-silver);
    position: relative;
}

.terminal-text {
    white-space: pre-wrap;
}

.terminal-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--arctic-chrome);
    vertical-align: text-bottom;
    animation: blink 1.06s step-end infinite;
}

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

.terminal-panel-right {
    flex: 0 0 38%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.terminal-image-wrapper {
    width: 80%;
    height: 70vh;
    position: relative;
    overflow: hidden;
}

#terminal-photo {
    background:
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(45,58,74,0.08) 8px, rgba(45,58,74,0.08) 9px),
        linear-gradient(135deg, var(--gunmetal) 0%, var(--slate-steel) 50%, var(--gunmetal) 100%);
    opacity: 0.7;
}

.terminal-lines-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 23px,
        rgba(45, 58, 74, 0.12) 23px,
        rgba(45, 58, 74, 0.12) 24px
    );
    pointer-events: none;
}

/* Floor R: The Observatory */
.floor-observatory {
    background-color: var(--abyssal-navy);
    flex-direction: column;
}

.observatory-content {
    text-align: center;
}

.observatory-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.5em;
    color: var(--arctic-chrome);
    margin-bottom: 2.5rem;
}

.observatory-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.observatory-rule {
    width: 40vw;
    height: 1px;
    background-color: var(--slate-steel);
    margin: 0 auto 2rem;
}

.observatory-footer {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    color: var(--pewter);
    font-weight: 300;
    letter-spacing: 0.15em;
    line-height: 2;
}

.observatory-micro {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--slate-steel);
}

/* Link Styles */
a {
    color: var(--brushed-steel);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

a:hover {
    color: var(--polished-silver);
}

/* Responsive */
@media (max-width: 768px) {
    .floor-lobby {
        flex-direction: column;
        padding: 8vh 6vw;
    }
    .lobby-text {
        flex: none;
        max-width: none;
    }
    .lobby-image-container {
        height: 40vh;
    }
    .lobby-image-wrapper {
        height: 35vh;
    }
    .floor-terminal {
        flex-direction: column;
    }
    .terminal-panel-left {
        flex: none;
        padding: 4vh 6vw;
    }
    .terminal-panel-right {
        flex: none;
        height: 40vh;
    }
    .reading-block-1,
    .reading-block-2,
    .reading-block-3,
    .reading-block-4 {
        margin-left: 0;
    }
    .floor-reading {
        padding: 6vh 5vw;
    }
    .observatory-title {
        letter-spacing: 0.2em;
    }
}
