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

html {
    scroll-behavior: smooth;
    background: #0d1117;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #cfd8dc;
    background: #0d1117;
    line-height: 1.7;
    overflow-x: hidden;
    /* palette refs: #00BCD4 #161B22 #B2EBF2 */
}

/* === CANVAS BACKGROUND === */
#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === SECTIONS === */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

/* === OBSERVATORY / HERO === */
#observatory {
    text-align: center;
}

.compass-rose {
    margin-bottom: 2rem;
    animation: slowSpin 60s linear infinite;
    opacity: 0.8;
}

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

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    color: #e0f7fa;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 40px rgba(0, 229, 255, 0.15);
}

.site-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #00e5ff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: #546e7a;
    margin-bottom: 3rem;
}

.scroll-cue {
    animation: bobDown 2s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes bobDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* === HUD PANELS === */
.hud-panel {
    position: relative;
    background: rgba(22, 27, 34, 0.85); /* #161B22 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    padding: 2.5rem 3rem;
    max-width: 640px;
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hud-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-border {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 4px;
    pointer-events: none;
}

.panel-left {
    align-self: flex-start;
    margin-left: 8%;
}

.panel-right {
    align-self: flex-end;
    margin-right: 8%;
}

.panel-center {
    align-self: center;
}

.panel-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: #00e5ff;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1.2rem;
    opacity: 0.7;
}

/* === TYPOGRAPHY === */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: #e0f7fa;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1.02rem);
    color: #cfd8dc;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.body-text em {
    color: #b388ff;
    font-style: italic;
}

/* === BLOCKQUOTES === */
.wiki-quote {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    color: #546e7a;
    border-left: 2px solid rgba(0, 229, 255, 0.3);
    padding: 0.8rem 1.5rem;
    margin: 1rem 0;
    position: relative;
}

.quote-mark {
    color: #00e5ff;
    opacity: 0.5;
    font-size: 1.3em;
}

.wiki-quote cite {
    display: block;
    font-size: 0.85rem;
    color: #546e7a;
    margin-top: 0.5rem;
    font-style: normal;
    opacity: 0.7;
}

/* === DATA READOUT === */
.data-readout {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    flex-wrap: wrap;
}

.readout-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.readout-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #00e5ff;
    opacity: 0.6;
}

.readout-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #e0f7fa;
}

/* === ILLUSTRATION BLOCK === */
.illustration-block {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    opacity: 0.8;
}

/* === WIKI LIST === */
.wiki-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.list-marker {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #ff6b6b;
    margin-top: 0.55rem;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

.list-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.92rem;
    color: #cfd8dc;
    line-height: 1.6;
}

/* === CONNECTION GRID === */
.connection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    margin-top: 1.5rem;
}

.connection-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 4px;
    transition: background 0.3s ease;
    cursor: default;
}

.connection-node:hover {
    background: rgba(0, 229, 255, 0.05);
}

.node-ring {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(179, 136, 255, 0.5);
    position: relative;
}

.node-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b388ff;
    opacity: 0.7;
}

.node-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #e0f7fa;
}

.node-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: #546e7a;
}

.connection-node:hover .node-label {
    color: #B2EBF2;
}

.connection-node:hover .node-ring {
    border-color: #00BCD4;
}

/* === FOOTER === */
#footer {
    min-height: auto;
    padding: 4rem 2rem 3rem;
    text-align: center;
    gap: 1rem;
}

.footer-compass {
    opacity: 0.5;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: #546e7a;
    letter-spacing: 0.1em;
}

.footer-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #546e7a;
    opacity: 0.5;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hud-panel {
        padding: 2rem 1.5rem;
    }

    .panel-left,
    .panel-right {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .connection-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-readout {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .connection-grid {
        grid-template-columns: 1fr;
    }
}
