﻿/* --- 1. CORE VARIABLES & RESET --- */
:root {
  --bg: #0f0f10;
  --card: #121214;
  --muted: #9aa0a6;
  --accent: #c9d6ff;
  --oracle-cyan: #00ffcc;
  --max-width: 1100px;
  --radius: 8px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: #e6eef8; font-family: var(--font-sans); margin: 0; line-height: 1.5; overflow-x: hidden; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 24px; }

/* --- 2. NAVIGATION & HEADER --- */
.site-header {
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 2000;
    overflow: visible !important; /* CRITICAL for dropdown */
}

.top-nav { display: flex; align-items: center; overflow: visible; }
.top-nav a, .dropbtn { color: var(--muted); margin-right: 16px; text-decoration: none; transition: 0.2s; cursor: pointer; }
.top-nav a:hover, .dropdown:hover .dropbtn { color: var(--oracle-cyan); }

/* --- 3. MUSEUM WINGS (DROPDOWN SYSTEM) --- */
.dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 20px; /* The Invisible Bridge */
    margin-bottom: -20px; /* Pulls content back up to the nav line */
}

/* THE MISSING TRIGGER: This makes the menu actually show up */
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0d0d0d;
    min-width: 240px;
    z-index: 9999 !important;
    border: 1px solid #333;
    border-radius: 6px;
    top: 40px; /* Adjust based on your header height */
    left: 0;
    box-shadow: 0px 8px 32px rgba(0, 255, 204, 0.2);
    overflow: hidden;
}

.dropdown-content a {
    color: #b3b3b3;
    padding: 14px 20px;
    margin: 0;
    display: block;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: #1a0b2e;
    color: var(--oracle-cyan);
    padding-left: 25px;
    border-left: 3px solid var(--oracle-cyan);
}

/* --- 4. GRID & CARDS --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.card { background: var(--card); padding: 12px; border-radius: 10px; text-decoration: none; transition: transform 0.2s ease; border: 1px solid transparent; }
.card:hover { transform: translateY(-5px); border-color: #333; }
.card img { width: 100%; height: 200px; object-fit: cover; border-radius: 6px; display: block; }

/* --- 5. THE ORACLE MEDIA (INDIVIDUAL POSTS) --- */
.post-figure {
    margin: 2rem auto;
    background: #000;
    border-radius: var(--radius);
    border: 1px solid #333;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* THE UPGRADE: Forces data arrays to scale up and stay crisp */
.post-figure img, .post-figure video, .oracle-video {
    width: 100% !important; /* CRITICAL: Forces it to stretch to the box bounds */
    max-width: 1000px !important; /* Caps the maximum size so it doesn't look absurd on 4K monitors */
    height: auto !important;
    max-height: 80vh; 
    object-fit: cover; /* Fills the space better */
    image-rendering: pixelated; /* Keeps scientific data grids sharp when scaled up */
    margin: 0 auto; 
    display: block;
}

/* This targets EVERY image and video on an individual post page */
.post-figure img, .post-figure video, .oracle-video {
    max-width: 100% !important; /* CRITICAL: Never wider than the screen */
    height: auto !important;
    max-height: 75vh; /* Prevents it from being too tall */
    object-fit: contain; /* Shrinks it to fit without cropping */
    margin: 0 auto; /* Dead center alignment */
    display: block;
}

.oracle-video {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: 75vh;
    object-fit: contain; /* Ensures the high-res data isn't cropped */
}

/* --- 6. INDIVIDUAL POST PAGES LAYOUT --- */
.post-layout { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.post-title { font-size: 2.5rem; color: #fff; margin: 10px 0; }
.post-subtitle { color: var(--oracle-cyan); font-style: italic; opacity: 0.8; }
.description-text { font-size: 1.15rem; line-height: 1.8; color: #ccc; margin: 2rem 0; }
.extended-details { color: #aaa; line-height: 1.6; border-top: 1px solid #222; padding-top: 2rem; }

/* Dress the card links in Holodeck colors */
.card h3 a {
    color: var(--accent); /* Keeps them a crisp, sleek color */
    text-decoration: none; /* Removes the underline */
    transition: color 0.2s;
}

.card h3 a:hover {
    color: var(--oracle-cyan); /* Gives them the neon glow when hovered */
}

/* --- 9. MOBILE RESPONSIVENESS (THE PHONE FIX) --- */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column; /* Stacks the links vertically */
        align-items: flex-start;
        gap: 15px; /* Adds breathing room for tapping */
    }
    
    .dropdown {
        margin-bottom: 0;
        padding-bottom: 0;
        width: 100%;
    }

    /* Unrolls the menu permanently on mobile */
    .dropdown-content {
        display: block !important; 
        position: relative; /* Stops it from floating over your images */
        top: 10px;
        width: 100%;
        background-color: transparent;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--oracle-cyan); /* Cool neon line to show they belong to the Archives */
        border-radius: 0;
    }

    .dropdown-content a {
        padding: 10px 15px;
        border-bottom: none;
    }
}
