/* ============================================================
   UFO INCIDENT DATABASE — SHARED STYLESHEET
   Serves: ufo_database.html + case-file.html
   ============================================================ */

/* ── Google Fonts are loaded via <link> in each HTML file ── */


/* ════════════════════════════════════════════════════════════
   DATABASE PAGE  (ufo_database.html)
════════════════════════════════════════════════════════════ */

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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
            color: #e0e0e0;
            padding: 0;
            min-height: 100vh;
            transition: background 0.3s, color 0.3s;
        }

        body.light-mode {
            background: linear-gradient(135deg, #f5f5f5 0%, #e0e7ff 100%);
            color: #1a1a1a;
        }

        .navbar {
            background: rgba(0, 0, 0, 0.8);
            padding: 15px 0;
            border-bottom: 2px solid rgba(0, 212, 255, 0.3);
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
        }

        body.light-mode .navbar {
            background: rgba(255, 255, 255, 0.9);
            border-bottom: 2px solid rgba(0, 100, 200, 0.3);
        }

        .navbar-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .navbar-brand {
            font-size: 1.5em;
            font-weight: bold;
            color: #00d4ff;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        body.light-mode .navbar-brand {
            color: #0066cc;
        }

        .navbar-links {
            display: flex;
            gap: 30px;
            align-items: center;
        }

        .nav-link {
            color: #e0e0e0;
            text-decoration: none;
            font-size: 1.05em;
            transition: color 0.3s;
            padding: 8px 15px;
            border-radius: 5px;
        }

        body.light-mode .nav-link {
            color: #1a1a1a;
        }

        .nav-link:hover {
            color: #00d4ff;
            background: rgba(0, 212, 255, 0.1);
        }

        body.light-mode .nav-link:hover {
            color: #0066cc;
            background: rgba(0, 100, 200, 0.1);
        }

        .nav-link.active {
            color: #00d4ff;
            background: rgba(0, 212, 255, 0.1);
        }

        body.light-mode .nav-link.active {
            color: #0066cc;
            background: rgba(0, 100, 200, 0.1);
        }

        .theme-toggle {
            background: rgba(0, 212, 255, 0.1);
            border: 2px solid rgba(0, 212, 255, 0.3);
            color: #00d4ff;
            padding: 8px 15px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1em;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        body.light-mode .theme-toggle {
            background: rgba(0, 100, 200, 0.1);
            border: 2px solid rgba(0, 100, 200, 0.3);
            color: #0066cc;
        }

        .theme-toggle:hover {
            background: rgba(0, 212, 255, 0.2);
            border-color: #00d4ff;
        }

        body.light-mode .theme-toggle:hover {
            background: rgba(0, 100, 200, 0.2);
            border-color: #0066cc;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            text-align: center;
            margin-bottom: 40px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.light-mode header {
            background: rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        h1 {
            font-size: 2.5em;
            color: #00d4ff;
            margin-bottom: 10px;
            text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
        }

        body.light-mode h1 {
            color: #0066cc;
            text-shadow: 0 0 20px rgba(0, 100, 200, 0.3);
        }

        .subtitle {
            color: #a0a0a0;
            font-size: 1.1em;
        }

        body.light-mode .subtitle {
            color: #666;
        }

        .controls {
            background: rgba(255, 255, 255, 0.05);
            padding: 25px;
            border-radius: 15px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.light-mode .controls {
            background: rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .search-bar {
            width: 100%;
            padding: 15px;
            font-size: 1em;
            border: 2px solid rgba(0, 212, 255, 0.3);
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.3);
            color: #e0e0e0;
            margin-bottom: 20px;
            transition: border-color 0.3s;
        }

        body.light-mode .search-bar {
            background: white;
            color: #1a1a1a;
            border: 2px solid rgba(0, 100, 200, 0.3);
        }

        .search-bar:focus {
            outline: none;
            border-color: #00d4ff;
        }

        body.light-mode .search-bar:focus {
            border-color: #0066cc;
        }

        .filters {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: 10px 20px;
            border: 2px solid rgba(0, 212, 255, 0.3);
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.3);
            color: #e0e0e0;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.95em;
        }

        body.light-mode .filter-btn {
            background: white;
            color: #1a1a1a;
            border: 2px solid rgba(0, 100, 200, 0.3);
        }

        .filter-btn:hover {
            background: rgba(0, 212, 255, 0.2);
            border-color: #00d4ff;
        }

        body.light-mode .filter-btn:hover {
            background: rgba(0, 100, 200, 0.1);
            border-color: #0066cc;
        }

        .filter-btn.active {
            background: #00d4ff;
            color: #0a0a0a;
            border-color: #00d4ff;
        }

        body.light-mode .filter-btn.active {
            background: #0066cc;
            color: white;
            border-color: #0066cc;
        }

        .results-count {
            margin-bottom: 15px;
            color: #a0a0a0;
            font-size: 0.95em;
        }

        body.light-mode .results-count {
            color: #666;
        }

        .table-container {
            overflow-x: auto;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.light-mode .table-container {
            background: white;
            border: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th {
            background: rgba(0, 212, 255, 0.1);
            padding: 15px;
            text-align: left;
            color: #00d4ff;
            font-weight: 600;
            border-bottom: 2px solid rgba(0, 212, 255, 0.3);
            position: sticky;
            top: 0;
        }

        body.light-mode th {
            background: rgba(0, 100, 200, 0.1);
            color: #0066cc;
            border-bottom: 2px solid rgba(0, 100, 200, 0.3);
        }

        td {
            padding: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.light-mode td {
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        tr {
            transition: background 0.2s;
        }

        tr:hover {
            background: rgba(0, 212, 255, 0.05);
        }

        body.light-mode tr:hover {
            background: rgba(0, 100, 200, 0.05);
        }

        .event-image {
            width: 120px;
            height: 120px;
            object-fit: cover;
            border-radius: 8px;
            border: 2px solid rgba(0, 212, 255, 0.3);
            cursor: pointer;
            transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
            display: block;
        }

        .event-image:hover {
            border-color: #00d4ff;
            transform: scale(1.06);
            box-shadow: 0 0 18px rgba(0, 212, 255, 0.4);
        }

        body.light-mode .event-image:hover {
            border-color: #0066cc;
            box-shadow: 0 0 18px rgba(0, 100, 200, 0.3);
        }

        .image-cell {
            position: relative;
        }

        .open-file-hint {
            display: block;
            margin-top: 5px;
            font-size: 0.65em;
            letter-spacing: 2px;
            text-transform: uppercase;
            text-align: center;
            color: rgba(0, 212, 255, 0.5);
            font-family: monospace;
            transition: color 0.2s;
        }

        .image-cell:hover .open-file-hint {
            color: rgba(0, 212, 255, 0.9);
        }

        body.light-mode .open-file-hint { color: rgba(0, 100, 200, 0.5); }
        body.light-mode .image-cell:hover .open-file-hint { color: rgba(0, 100, 200, 0.9); }

        .event-title {
            font-weight: 600;
            color: #00d4ff;
            margin-bottom: 5px;
        }

        body.light-mode .event-title {
            color: #0066cc;
        }

        .event-description {
            color: #c0c0c0;
            font-size: 0.9em;
            line-height: 1.4;
        }

        body.light-mode .event-description {
            color: #444;
        }

        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 5px;
            font-size: 0.85em;
            margin: 2px;
        }

        .badge-military {
            background: rgba(255, 50, 50, 0.2);
            color: #ff6666;
            border: 1px solid rgba(255, 50, 50, 0.5);
        }

        .badge-mass {
            background: rgba(255, 165, 0, 0.2);
            color: #ffaa44;
            border: 1px solid rgba(255, 165, 0, 0.5);
        }

        .badge-sighting {
            background: rgba(100, 200, 100, 0.2);
            color: #88dd88;
            border: 1px solid rgba(100, 200, 100, 0.5);
        }

        .reference-link {
            color: #00d4ff;
            text-decoration: none;
            margin-right: 10px;
            margin-bottom: 5px;
            font-size: 0.9em;
            transition: color 0.3s;
            display: inline-block;
        }

        body.light-mode .reference-link {
            color: #0066cc;
        }

        .reference-link:hover {
            color: #66e6ff;
            text-decoration: underline;
        }

        body.light-mode .reference-link:hover {
            color: #0088ff;
        }

        .no-results {
            text-align: center;
            padding: 40px;
            color: #a0a0a0;
        }

        body.light-mode .no-results {
            color: #666;
        }

        .sortable {
            cursor: pointer;
            user-select: none;
            position: relative;
            padding-right: 25px;
        }

        .sortable:hover {
            opacity: 0.8;
        }

        .sort-arrow {
            position: absolute;
            right: 5px;
            font-size: 0.8em;
            opacity: 0.5;
        }

        .sort-arrow.active {
            opacity: 1;
        }

        footer {
            margin-top: 50px;
            padding: 30px 20px;
            text-align: center;
            background: rgba(0, 0, 0, 0.8);
            border-top: 2px solid rgba(0, 212, 255, 0.3);
            color: #a0a0a0;
        }

        body.light-mode footer {
            background: rgba(255, 255, 255, 0.9);
            border-top: 2px solid rgba(0, 100, 200, 0.3);
            color: #666;
        }

        footer p {
            margin: 5px 0;
            font-size: 0.95em;
        }

        footer a {
            color: #00d4ff;
            text-decoration: none;
            transition: color 0.3s;
        }

        body.light-mode footer a {
            color: #0066cc;
        }

        footer a:hover {
            color: #66e6ff;
        }

        body.light-mode footer a:hover {
            color: #0088ff;
        }

        /* Hamburger Menu */
        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
            padding: 5px;
        }

        .hamburger span {
            width: 25px;
            height: 3px;
            background: #00d4ff;
            margin: 3px 0;
            transition: all 0.3s;
            border-radius: 3px;
        }

        body.light-mode .hamburger span {
            background: #0066cc;
        }

        .hamburger.active span:nth-child(1) {
            transform: rotate(45deg) translate(8px, 8px);
        }

        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger.active span:nth-child(3) {
            transform: rotate(-45deg) translate(7px, -7px);
        }

        /* Mobile Responsive Styles */
        @media screen and (max-width: 768px) {
            .hamburger {
                display: flex;
            }

            .navbar-container {
                flex-direction: row;
                justify-content: space-between;
            }

            .navbar-links {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: rgba(0, 0, 0, 0.95);
                flex-direction: column;
                gap: 0;
                width: 100%;
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.3s ease-in-out;
                border-bottom: 2px solid rgba(0, 212, 255, 0.3);
            }

            body.light-mode .navbar-links {
                background: rgba(255, 255, 255, 0.98);
                border-bottom: 2px solid rgba(0, 100, 200, 0.3);
            }

            .navbar-links.active {
                max-height: 300px;
            }

            .nav-link {
                width: 100%;
                text-align: center;
                padding: 15px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            }

            body.light-mode .nav-link {
                border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            }

            .theme-toggle {
                width: calc(100% - 30px);
                justify-content: center;
                margin: 15px;
            }

            header {
                padding: 20px 15px;
            }

            h1 {
                font-size: 1.8em;
            }

            .subtitle {
                font-size: 1em;
            }

            .controls {
                padding: 15px;
            }

            .filters {
                justify-content: center;
            }

            .filter-btn {
                flex: 1 1 calc(50% - 10px);
                min-width: 120px;
            }

            /* Mobile table layout */
            .table-container {
                border: none;
                border-radius: 0;
            }

            table {
                display: block;
            }

            thead {
                display: none;
            }

            tbody {
                display: block;
            }

            tr {
                display: block;
                margin-bottom: 20px;
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 10px;
                padding: 15px;
                background: rgba(255, 255, 255, 0.03);
            }

            body.light-mode tr {
                border: 1px solid rgba(0, 0, 0, 0.1);
                background: white;
            }

            tr:hover {
                background: rgba(0, 212, 255, 0.08);
            }

            body.light-mode tr:hover {
                background: rgba(0, 100, 200, 0.08);
            }

            td {
                display: block;
                text-align: left;
                padding: 10px 0;
                border: none;
            }

            td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #00d4ff;
                display: block;
                margin-bottom: 5px;
                font-size: 0.9em;
            }

            body.light-mode td::before {
                color: #0066cc;
            }

            td:first-child {
                text-align: center;
                padding-bottom: 15px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                margin-bottom: 10px;
            }

            body.light-mode td:first-child {
                border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            }

            td:first-child::before {
                display: none;
            }

            .event-image {
                width: 150px;
                height: 150px;
            }

            .reference-link {
                display: inline-block;
                margin: 5px 5px 5px 0;
            }

            footer {
                margin-top: 30px;
                padding: 20px 15px;
            }

            footer p {
                font-size: 0.85em;
            }
        }

        @media screen and (max-width: 480px) {
            h1 {
                font-size: 1.5em;
            }

            .subtitle {
                font-size: 0.9em;
            }

            .filter-btn {
                flex: 1 1 100%;
            }

            .event-image {
                width: 130px;
                height: 130px;
            }
        }
    

/* ════════════════════════════════════════════════════════════
   CASE FILE PAGE  (case-file.html)
════════════════════════════════════════════════════════════ */

        :root {
            --cyan: #00d4ff;
            --cyan-dim: rgba(0,212,255,0.15);
            --cyan-glow: rgba(0,212,255,0.08);
            --red: #ff3a3a;
            --amber: #ffaa44;
            --green: #39ff8c;
            --bg-deep: #050810;
            --bg-mid: #0a0f1e;
            --bg-panel: rgba(255,255,255,0.03);
            --bg-panel-hover: rgba(0,212,255,0.04);
            --border: rgba(0,212,255,0.18);
            --border-bright: rgba(0,212,255,0.45);
            --text-primary: #dde4f0;
            --text-secondary: #8a9ab8;
            --text-mono: #a0c4d8;
            --font-display: 'Oswald', sans-serif;
            --font-body: 'Source Serif 4', serif;
            --font-mono: 'Share Tech Mono', monospace;
        }

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

        html { scroll-behavior: smooth; }

        body {
            font-family: var(--font-body);
            background-color: var(--bg-deep);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* ── Scanline overlay ── */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background: repeating-linear-gradient(
                0deg,
                transparent,
                transparent 2px,
                rgba(0,0,0,0.06) 2px,
                rgba(0,0,0,0.06) 4px
            );
            pointer-events: none;
            z-index: 9998;
        }

        /* ── Top classified banner ── */
        .classified-banner {
            background: var(--red);
            color: #fff;
            font-family: var(--font-mono);
            font-size: 0.72em;
            letter-spacing: 4px;
            text-align: center;
            padding: 7px 20px;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        /* ── Nav bar ── */
        .nav-bar {
            background: rgba(0,0,0,0.85);
            border-bottom: 1px solid var(--border);
            padding: 14px 40px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 999;
            backdrop-filter: blur(12px);
        }

        .nav-back {
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--cyan);
            font-family: var(--font-mono);
            font-size: 0.82em;
            letter-spacing: 2px;
            text-decoration: none;
            text-transform: uppercase;
            transition: opacity 0.2s;
        }

        .nav-back:hover { opacity: 0.7; }
        .nav-back svg { flex-shrink: 0; }

        .nav-title {
            font-family: var(--font-mono);
            font-size: 0.78em;
            color: var(--text-secondary);
            letter-spacing: 3px;
            text-transform: uppercase;
        }

        .nav-case-id {
            font-family: var(--font-mono);
            font-size: 0.78em;
            color: var(--text-secondary);
            letter-spacing: 2px;
        }

        /* ── Hero ── */
        .hero {
            position: relative;
            width: 100%;
            height: 520px;
            overflow: hidden;
        }

        .hero-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            filter: brightness(0.55) saturate(0.7);
            transition: transform 8s ease;
        }

        .hero:hover .hero-img { transform: scale(1.03); }

        .hero-overlay {
            position: absolute;
            inset: 0;
            background:
                linear-gradient(to top, var(--bg-deep) 0%, transparent 45%),
                linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 30%);
        }

        /* grid lines on hero */
        .hero-grid {
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
            background-size: 60px 60px;
        }

        .hero-content {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 0 60px 48px;
        }

        .hero-eyebrow {
            font-family: var(--font-mono);
            font-size: 0.72em;
            letter-spacing: 5px;
            color: var(--cyan);
            text-transform: uppercase;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .hero-eyebrow::before {
            content: '';
            display: block;
            width: 40px;
            height: 1px;
            background: var(--cyan);
        }

        .hero-title {
            font-family: var(--font-display);
            font-size: clamp(2.4em, 5vw, 4em);
            font-weight: 700;
            letter-spacing: 1px;
            color: #fff;
            line-height: 1.05;
            text-transform: uppercase;
            text-shadow: 0 0 60px rgba(0,212,255,0.3);
            margin-bottom: 18px;
            max-width: 800px;
        }

        .hero-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 20px;
            align-items: center;
        }

        .hero-meta-item {
            font-family: var(--font-mono);
            font-size: 0.78em;
            color: rgba(255,255,255,0.6);
            letter-spacing: 1px;
        }

        .hero-meta-item strong {
            color: var(--cyan);
            margin-right: 6px;
        }

        .hero-status {
            font-family: var(--font-mono);
            font-size: 0.72em;
            font-weight: 700;
            letter-spacing: 3px;
            text-transform: uppercase;
            padding: 4px 14px;
            border-radius: 3px;
            border: 1px solid;
        }

        .status-unresolved {
            color: var(--amber);
            border-color: var(--amber);
            background: rgba(255,170,68,0.1);
        }

        .status-closed {
            color: var(--green);
            border-color: var(--green);
            background: rgba(57,255,140,0.08);
        }

        .status-classified {
            color: var(--red);
            border-color: var(--red);
            background: rgba(255,58,58,0.1);
        }

        /* ── Page layout ── */
        .page-wrap {
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 40px 100px;
        }

        /* ── Type badges row ── */
        .badges-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 24px 0;
            border-bottom: 1px solid var(--border);
            margin-bottom: 48px;
        }

        .badge {
            font-family: var(--font-mono);
            font-size: 0.72em;
            letter-spacing: 2px;
            text-transform: uppercase;
            padding: 5px 14px;
            border-radius: 3px;
            border: 1px solid;
        }

        .badge-military { color: #ff6666; border-color: rgba(255,80,80,0.4); background: rgba(255,50,50,0.08); }
        .badge-mass     { color: #ffaa44; border-color: rgba(255,165,0,0.4); background: rgba(255,165,0,0.08); }
        .badge-sighting { color: #88dd88; border-color: rgba(100,200,100,0.4); background: rgba(100,200,100,0.08); }
        .badge-photo    { color: #66aaff; border-color: rgba(50,150,255,0.4); background: rgba(50,150,255,0.08); }
        .badge-video    { color: #ba8bff; border-color: rgba(138,43,226,0.4); background: rgba(138,43,226,0.08); }

        /* ── Two-column layout ── */
        .content-grid {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 48px;
            align-items: start;
        }

        /* ── Section blocks ── */
        .cf-section {
            margin-bottom: 56px;
        }

        .section-label {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 20px;
        }

        .section-num {
            font-family: var(--font-mono);
            font-size: 0.68em;
            color: var(--cyan);
            letter-spacing: 3px;
            text-transform: uppercase;
            opacity: 0.6;
            flex-shrink: 0;
        }

        .section-title {
            font-family: var(--font-display);
            font-size: 1.1em;
            font-weight: 500;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: var(--cyan);
        }

        .section-line {
            flex: 1;
            height: 1px;
            background: linear-gradient(to right, var(--border-bright), transparent);
        }

        .section-stamp {
            font-family: var(--font-mono);
            font-size: 0.65em;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: var(--text-secondary);
            opacity: 0.5;
            flex-shrink: 0;
        }

        .section-body {
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 30px 32px;
            position: relative;
        }

        .section-body::before {
            content: '';
            position: absolute;
            top: 0; left: 0;
            width: 3px;
            height: 100%;
            background: linear-gradient(to bottom, var(--cyan), transparent);
            border-radius: 4px 0 0 4px;
        }

        .section-body p {
            font-size: 1.01em;
            line-height: 1.85;
            color: var(--text-primary);
            margin-bottom: 1.1em;
        }

        .section-body p:last-child { margin-bottom: 0; }

        /* Conclusion styling */
        .conclusion-body {
            background: rgba(0,212,255,0.04);
            border-color: rgba(0,212,255,0.3);
        }

        .conclusion-body::before {
            background: linear-gradient(to bottom, var(--cyan), var(--cyan));
            opacity: 1;
        }

        /* Open questions */
        .questions-list {
            list-style: none;
        }

        .questions-list li {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            padding: 14px 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 0.97em;
            line-height: 1.6;
            color: var(--text-primary);
        }

        .questions-list li:last-child { border-bottom: none; padding-bottom: 0; }

        .q-num {
            font-family: var(--font-mono);
            font-size: 0.75em;
            color: var(--amber);
            letter-spacing: 1px;
            flex-shrink: 0;
            margin-top: 3px;
        }

        .unknowns-body {
            background: rgba(255,170,68,0.03);
            border-color: rgba(255,170,68,0.25);
        }

        .unknowns-body::before {
            background: linear-gradient(to bottom, var(--amber), transparent);
        }

        /* ── Sidebar ── */
        .sidebar {
            position: sticky;
            top: 90px;
        }

        .sidebar-card {
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 20px;
        }

        .sidebar-card-header {
            background: rgba(0,212,255,0.07);
            border-bottom: 1px solid var(--border);
            padding: 10px 16px;
            font-family: var(--font-mono);
            font-size: 0.68em;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: var(--cyan);
        }

        .sidebar-card-body {
            padding: 16px;
        }

        .meta-row {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .meta-item {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .meta-label {
            font-family: var(--font-mono);
            font-size: 0.65em;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .meta-value {
            font-size: 0.88em;
            color: var(--text-primary);
            line-height: 1.4;
        }

        .meta-divider {
            height: 1px;
            background: var(--border);
            margin: 4px 0;
        }

        /* ── Media gallery ── */
        .media-section {
            margin-bottom: 56px;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .gallery-item {
            position: relative;
            aspect-ratio: 4/3;
            overflow: hidden;
            border-radius: 3px;
            border: 1px solid var(--border);
            cursor: pointer;
            background: #0a0f1e;
        }

        .gallery-item:first-child {
            grid-column: 1 / -1;
            aspect-ratio: 16/7;
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: brightness(0.75) saturate(0.8);
            transition: filter 0.3s, transform 0.4s;
            display: block;
            cursor: zoom-in;
        }

        .gallery-item:hover img {
            filter: brightness(0.95) saturate(1.1);
            transform: scale(1.04);
        }

        .gallery-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
            opacity: 0;
            transition: opacity 0.3s;
            display: flex;
            align-items: flex-end;
            padding: 12px;
            pointer-events: none; /* let clicks pass through to the img */
        }

        .gallery-item:hover .gallery-overlay { opacity: 1; }

        .gallery-caption {
            font-family: var(--font-mono);
            font-size: 0.68em;
            letter-spacing: 2px;
            color: rgba(255,255,255,0.8);
            text-transform: uppercase;
        }

        .gallery-video-item {
            position: relative;
            aspect-ratio: 16/9;
            grid-column: 1 / -1;
            border-radius: 3px;
            border: 1px solid var(--border);
            overflow: hidden;
            background: #000;
        }

        .gallery-video-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 16px;
            background: linear-gradient(135deg, #050810 0%, #0a1020 100%);
            border: 2px dashed rgba(0,212,255,0.2);
            border-radius: 3px;
        }

        .video-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            border: 2px solid rgba(0,212,255,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--cyan);
            font-size: 1.5em;
        }

        .video-label {
            font-family: var(--font-mono);
            font-size: 0.75em;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        /* ── References ── */
        .refs-section {
            margin-top: 48px;
            padding-top: 32px;
            border-top: 1px solid var(--border);
        }

        .refs-label {
            font-family: var(--font-mono);
            font-size: 0.68em;
            letter-spacing: 4px;
            text-transform: uppercase;
            color: var(--text-secondary);
            margin-bottom: 16px;
        }

        .refs-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .ref-link {
            font-family: var(--font-mono);
            font-size: 0.78em;
            color: var(--cyan);
            text-decoration: none;
            padding: 6px 14px;
            border: 1px solid var(--border);
            border-radius: 3px;
            letter-spacing: 1px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ref-link:hover {
            background: var(--cyan-dim);
            border-color: var(--cyan);
        }

        /* ── Footer ── */
        .case-footer {
            background: rgba(0,0,0,0.6);
            border-top: 1px solid var(--border);
            margin-top: 80px;
            padding: 28px 40px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
        }

        .footer-text {
            font-family: var(--font-mono);
            font-size: 0.7em;
            letter-spacing: 2px;
            color: var(--text-secondary);
            text-transform: uppercase;
        }

        /* ── Lightbox ── */
        #lightbox {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.96);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 16px;
            animation: lightbox-fade-in 0.2s ease;
        }

        @keyframes lightbox-fade-in {
            from { opacity: 0; }
            to   { opacity: 1; }
        }

        #lightbox.active { display: flex; }

        .lightbox-img {
            max-width: 90vw;
            max-height: 80vh;
            object-fit: contain;
            border: 1px solid rgba(0,212,255,0.25);
            box-shadow: 0 0 80px rgba(0,0,0,0.8), 0 0 30px rgba(0,212,255,0.08);
            border-radius: 2px;
            animation: lightbox-img-in 0.25s ease;
        }

        @keyframes lightbox-img-in {
            from { transform: scale(0.94); opacity: 0; }
            to   { transform: scale(1);    opacity: 1; }
        }

        .lightbox-caption {
            font-family: var(--font-mono);
            font-size: 0.72em;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: rgba(255,255,255,0.45);
            text-align: center;
            max-width: 80vw;
            line-height: 1.6;
        }

        .lightbox-close {
            position: fixed;
            top: 24px;
            right: 32px;
            background: rgba(0,0,0,0.5);
            border: 1px solid rgba(0,212,255,0.3);
            color: var(--cyan);
            font-size: 1.1em;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, border-color 0.2s;
            backdrop-filter: blur(4px);
        }

        .lightbox-close:hover {
            background: rgba(0,212,255,0.15);
            border-color: var(--cyan);
        }

        .lightbox-hint {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            font-family: var(--font-mono);
            font-size: 0.65em;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: rgba(255,255,255,0.2);
        }

        /* ── Placeholder content styling ── */
        .placeholder-note {
            display: inline-block;
            background: rgba(255,170,68,0.08);
            border: 1px dashed rgba(255,170,68,0.3);
            border-radius: 3px;
            padding: 2px 8px;
            font-family: var(--font-mono);
            font-size: 0.75em;
            color: var(--amber);
            letter-spacing: 1px;
        }

        /* ── Responsive ── */
        @media (max-width: 900px) {
            .content-grid { grid-template-columns: 1fr; }
            .sidebar { position: static; }
            .hero { height: 380px; }
            .hero-content { padding: 0 24px 36px; }
            .hero-title { font-size: 2em; }
            .page-wrap { padding: 0 20px 80px; }
            .nav-bar { padding: 12px 20px; }
            .gallery-grid { grid-template-columns: repeat(2, 1fr); }
            .gallery-item:first-child { grid-column: 1 / -1; }
            .case-footer { padding: 20px; }
        }

        @media (max-width: 600px) {
            .classified-banner { font-size: 0.62em; letter-spacing: 2px; }
            .hero { height: 300px; }
            .hero-title { font-size: 1.6em; }
            .nav-title, .nav-case-id { display: none; }
            .gallery-grid { grid-template-columns: 1fr; }
            .section-body { padding: 20px; }
        }
    
