:root {
    /* Color Palette */
    --bg: #0a0a0c;
    --surface: #111113;
    --text-main: #ebebeb;
    --text-muted: #888888;
    --accent: #ccff00; /* Acid Lime */
    --border: #333333;
    
    /* Typography */
    --font-display: 'Syne', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --pad-container: 4vw;
}

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

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- Utilities --- */
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.05;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* --- Navigation --- */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--pad-container);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none; 
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
}

/* Mobile Responsiveness (Nav Specific) */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
        font-family: var(--font-mono);
        cursor: pointer;
        font-size: 0.8rem;
        border: 1px solid var(--text-main);
        padding: 5px 10px;
        color: var(--text-main);
    }
    
    .nav-links {
        display: none; 
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--bg);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-item {
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }
}

.nav-item {
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-item:hover {
    opacity: 1;
    color: var(--accent);
}

/* Active State */
.nav-item.active-link {
    color: var(--accent);
    font-weight: bold;
    opacity: 1;
}
.nav-item.active-link::before {
    content: '> ';
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg);
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid var(--text-main);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(255,255,255,0.1);
}

.btn-outline {
    display: inline-block;
    border: 1px solid var(--border);
    padding: 1rem 2rem;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    letter-spacing: 1px;
}

/* --- Hero Section --- */
.hero-section { border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1fr; }

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1fr 300px; min-height: 85vh; }
}

.hero-main {
    padding: var(--pad-container);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border);
}

.reveal-container { overflow: hidden; }

.hero-title {
    font-family: var(--font-display);
    /* DEFAULT DESKTOP SIZE */
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.9;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    transform: translateY(100%);
    transition: opacity 0.5s ease;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title.fade-out {
    opacity: 0;
}

.hero-subtitle {
    max-width: 500px;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    transform: translateY(100%);
    opacity: 0;
    animation: slideUpFade 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mono-badge {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-right: 8px;
    color: var(--accent);
}

/* --- Sidebar Data --- */
.hero-side {
    display: none;
}

@media (min-width: 900px) {
    .hero-side {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; 
        padding: 2rem;
        height: 100%;
        min-height: 500px;
    }
}

.data-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.data-block .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.data-block .value {
    font-size: 1rem;
    font-weight: 500;
}

.blink {
    color: var(--accent);
    animation: blinker 1.5s linear infinite;
}

/* --- SYSTEM BADGE --- */
.system-badge {
    margin-top: auto; 
    align-self: center; 
    margin-left: auto;
    margin-right: auto;
    
    border: 3px solid #ffffff;
    padding: 15px 25px;
    text-align: center;
    color: #ffffff;
    font-weight: 800;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.system-badge:hover {
    background: #ffffff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.badge-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.badge-core {
    font-size: 1.5rem;
    letter-spacing: 2px;
    font-weight: 900;
}

.system-badge::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    box-shadow: 0 0 5px var(--accent);
}

/* --- Marquee --- */
.marquee-strip {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: var(--accent);
    color: var(--bg);
    padding: 0.5rem 0;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    font-family: var(--font-display);
}
.marquee-content { display: flex; gap: 2rem; animation: scroll 20s linear infinite; white-space: nowrap; }

/* --- Mission / Bento --- */
.mission-section { padding: var(--pad-container); }
.section-header { margin-bottom: 3rem; display: flex; align-items: center; gap: 1rem; }
.section-header h2 { font-family: var(--font-display); font-size: 2rem; white-space: nowrap; }
.section-header .line { height: 1px; background: var(--border); width: 100%; }

.bento-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) {
    .bento-grid { grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; }
    .card-large { grid-row: span 2; }
}

.card {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.card.visible { opacity: 1; transform: translateY(0); }
.card:hover { border-color: var(--accent); transform: translateY(-5px); }

.card-icon { font-size: 0.8rem; color: var(--text-muted); border: 1px solid var(--border); width: fit-content; padding: 2px 6px; margin-bottom: 1rem; }
.card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.9rem; max-width: 90%; }
.card-large { background: radial-gradient(circle at top right, #1a1a1e, #111113); }
.link-arrow { margin-top: 1rem; font-size: 0.8rem; text-decoration: underline; text-underline-offset: 4px; }

/* --- Footer --- */
footer { border-top: 1px solid var(--border); padding: 3rem var(--pad-container); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.footer-right a { margin-left: 1.5rem; font-size: 0.8rem; text-transform: uppercase; opacity: 0.5; }
.footer-right a:hover { opacity: 1; color: var(--accent); }

/* --- Animations --- */
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideUpFade { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blinker { 50% { opacity: 0; } }

/* --- PAGE SPECIFIC: EVENTS --- */
.page-wrapper { padding: var(--pad-container); max-width: 1000px; margin: 0 auto; }
.page-header { margin: 4rem 0; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1; margin-bottom: 0.5rem; }

/* Glitch */
.glitch-text { position: relative; }
.glitch-text::before, .glitch-text::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); }
.glitch-text:hover::before { left: 2px; text-shadow: -1px 0 red; animation: glitch-anim-1 2s infinite linear alternate-reverse; }
.glitch-text:hover::after { left: -2px; text-shadow: -1px 0 blue; animation: glitch-anim-2 3s infinite linear alternate-reverse; }

/* Terminal Filter */
.filter-terminal { background: #000; border: 1px solid var(--border); padding: 1rem; font-family: var(--font-mono); color: var(--accent); margin-bottom: 3rem; display: flex; align-items: center; gap: 10px; }
.cursor { width: 8px; height: 16px; background: var(--accent); animation: blinker 1s infinite; }

/* Timeline */
.timeline-container { position: relative; padding-left: 2rem; border-left: 1px dashed var(--border); }
.timeline-block { position: relative; margin-bottom: 4rem; padding-left: 2rem; }
.marker { position: absolute; left: -2.4rem; top: 0; width: 12px; height: 12px; background: var(--bg); border: 2px solid var(--text-muted); border-radius: 50%; transition: all 0.3s ease; }
.timeline-block:hover .marker { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent); }
.timeline-content { background: var(--surface); border: 1px solid var(--border); padding: 2rem; transition: transform 0.2s; }
.timeline-content:hover { transform: translateX(10px); border-color: var(--text-muted); }
.event-meta { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 0.8rem; color: var(--text-muted); border-bottom: 1px solid #222; padding-bottom: 0.5rem; }
.event-title { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 0.5rem; }

.timeline-block.incoming .marker { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 15px var(--accent); }
.timeline-block.incoming .timeline-content { border: 1px solid var(--accent); background: linear-gradient(45deg, var(--surface), #1a1a00); }
.timeline-block.incoming .status-tag { color: var(--accent); font-weight: bold; animation: blinker 1s infinite; }

.tech-stack { display: flex; gap: 0.5rem; margin: 1rem 0; }
.tech-stack span { background: rgba(255,255,255,0.05); padding: 2px 8px; font-size: 0.75rem; border-radius: 2px; }
.countdown-timer { font-family: var(--font-mono); font-size: 1.2rem; color: var(--text-main); margin-top: 1rem; border-top: 1px dashed var(--border); padding-top: 1rem; }
.stats-row { display: flex; gap: 2rem; margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }

/* Glitch Anim Frames */
@keyframes glitch-anim-1 { 0% { clip: rect(20px, 9999px, 10px, 0); } 100% { clip: rect(50px, 9999px, 80px, 0); } }
@keyframes glitch-anim-2 { 0% { clip: rect(80px, 9999px, 100px, 0); } 100% { clip: rect(10px, 9999px, 40px, 0); } }

/* --- PAGE SPECIFIC: WINNERS --- */
.center-text { text-align: center; }
.podium-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin: 4rem 0; align-items: center; }
@media (min-width: 768px) { .podium-grid { grid-template-columns: 1fr 1.2fr 1fr; align-items: end; } }

.bounty-card { background: var(--surface); border: 1px solid var(--border); position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; perspective: 1000px; }
.bounty-card:hover { transform: translateY(-10px) scale(1.02); z-index: 10; box-shadow: 0 20px 40px rgba(0,0,0,0.5); border-color: var(--accent); }
.card-inner { padding: 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 2; background: var(--surface); height: 100%; }

.rank-badge { position: absolute; top: -10px; right: -10px; background: var(--bg); border: 1px solid var(--border); padding: 5px 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.mugshot-container { width: 100%; height: 200px; background: #000; margin-bottom: 1.5rem; position: relative; overflow: hidden; border: 1px solid #333; }
.mugshot { width: 100%; height: 100%; background-color: #222; background-image: repeating-linear-gradient(45deg, #222 25%, transparent 25%, transparent 75%, #222 75%, #222), repeating-linear-gradient(45deg, #222 25%, #111 25%, #111 75%, #222 75%, #222); background-position: 0 0, 10px 10px; background-size: 20px 20px; opacity: 0.5; }
.scanner-line { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: scan 3s linear infinite; opacity: 0.5; }

.hacker-name { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.2rem; text-transform: uppercase; }
.event-name { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
.bounty-amt { font-family: var(--font-mono); color: var(--accent); font-weight: bold; border: 1px dashed var(--accent); padding: 0.5rem 1rem; margin-bottom: 1rem; display: inline-block; }

.rank-1 { border-color: #ffd700; transform: scale(1.05); }
.rank-1 .card-inner { padding-top: 3rem; }
.crown-icon { font-size: 2rem; position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); }
.holo-overlay { position: absolute; inset: -2px; background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000); background-size: 400%; z-index: 1; animation: glowing 20s linear infinite; opacity: 0; transition: opacity 0.3s; }
.rank-1:hover .holo-overlay { opacity: 1; }

.archive-list { margin-top: 4rem; }
.archive-list h3 { margin-bottom: 1rem; color: var(--text-muted); }
.list-row-header, .list-row { display: grid; grid-template-columns: 0.5fr 1.5fr 1.5fr 1fr; padding: 1rem; border-bottom: 1px solid #222; font-family: var(--font-mono); font-size: 0.9rem; }
.list-row-header { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 1px; }
.list-row:hover { background: rgba(255,255,255,0.02); }
.status-cleared { color: #4d7cfe; }

@keyframes scan { 0% { top: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes glowing { 0% { background-position: 0 0; } 50% { background-position: 400% 0; } 100% { background-position: 0 0; } }

/* --- PAGE SPECIFIC: ROSTER --- */
.roster-controls { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 3rem; border-bottom: 1px solid #222; padding-bottom: 1rem; }
.search-box { display: flex; align-items: center; background: #000; padding: 0.5rem 1rem; border: 1px solid var(--border); font-family: var(--font-mono); }
.cmd-input { background: transparent; border: none; color: var(--text-main); font-family: var(--font-mono); outline: none; margin-left: 0.5rem; width: 150px; }
.filter-tags { display: flex; gap: 0.5rem; }
.filter-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 0.25rem 0.75rem; font-family: var(--font-mono); font-size: 0.75rem; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover, .filter-btn.active { background: var(--text-main); color: var(--bg); }

.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.node-card { background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.node-card:hover { border-color: var(--text-muted); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.node-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.role-badge { font-size: 0.6rem; border: 1px solid var(--border); padding: 2px 6px; color: var(--text-muted); }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; }
.online { background-color: var(--accent); box-shadow: 0 0 5px var(--accent); }
.busy { background-color: #ff4d00; }
.offline { background-color: #333; border: 1px solid #555; }

.node-avatar { width: 80px; height: 80px; margin-bottom: 1rem; border-radius: 50%; background: #000; border: 1px solid var(--border); padding: 5px; }
.node-avatar img { width: 100%; height: 100%; border-radius: 50%; filter: grayscale(100%); transition: filter 0.3s; }
.node-card:hover .node-avatar img { filter: grayscale(0%); }

.node-info h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.2rem; }
.node-id { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.node-specs { margin-top: 1.5rem; border-top: 1px dashed var(--border); padding-top: 1rem; font-size: 0.75rem; font-family: var(--font-mono); }
.spec-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; color: var(--text-muted); }
.spec-row .val { color: var(--text-main); }
.root-access { border-color: var(--accent); }
.root-access .role-badge { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: bold; }

/* --- PAGE SPECIFIC: BLOGS (LOGS) --- */
.blog-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 900px) { .blog-layout { grid-template-columns: 250px 1fr; } }

.blog-sidebar { border-right: 1px solid var(--border); padding-right: 2rem; display: none; }
@media (min-width: 900px) { .blog-sidebar { display: block; } }

.sidebar-header { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 1rem; letter-spacing: 1px; }
.file-list li { padding: 0.5rem; margin-bottom: 0.5rem; font-size: 0.85rem; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.active-file { background: var(--surface); border-color: var(--border); color: var(--accent); }
.disabled-file { opacity: 0.5; cursor: not-allowed; }
.file-icon { opacity: 0.7; }

.article-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; display: flex; gap: 2rem; border-bottom: 1px dashed var(--border); padding-bottom: 1rem; }
.article-title { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 2rem; line-height: 1.1; }
.article-body { font-family: 'Georgia', serif; font-size: 1.1rem; line-height: 1.8; color: #ccc; max-width: 700px; }
.article-body p { margin-bottom: 1.5rem; }
.article-body strong { color: var(--text-main); }
.article-body h3 { font-family: var(--font-mono); color: var(--accent); margin-top: 3rem; margin-bottom: 1rem; font-size: 1.2rem; }

.code-block { background: #000; border-left: 3px solid var(--accent); padding: 1.5rem; font-family: var(--font-mono); font-size: 0.9rem; margin: 2rem 0; color: var(--text-main); }
.code-comment { color: var(--text-muted); }
blockquote { font-family: var(--font-display); font-size: 1.5rem; border-left: 1px solid var(--text-muted); padding-left: 2rem; margin: 3rem 0; color: var(--text-main); }
.article-footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.share-links a { margin-left: 1rem; }
.share-links a:hover { color: var(--accent); }

/* --- PAGE SPECIFIC: MANUAL (FAQ) --- */
.faq-grid { display: flex; flex-direction: column; gap: 1rem; max-width: 800px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); transition: all 0.3s ease; }
.faq-item[open] { border-color: var(--accent); box-shadow: 0 0 15px rgba(204, 255, 0, 0.1); }
summary { list-style: none; padding: 1.5rem; cursor: pointer; font-family: var(--font-display); font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; transition: color 0.2s; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }
.q-prefix { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-right: 1rem; vertical-align: middle; }
.toggle-icon { font-family: var(--font-mono); font-weight: bold; font-size: 1.2rem; }
details[open] summary .toggle-icon { transform: rotate(45deg); color: var(--accent); }
.faq-answer { padding: 1.5rem; padding-top: 0; font-family: var(--font-mono); font-size: 0.9rem; color: #ccc; line-height: 1.6; border-top: 1px dashed var(--border); margin-top: 0.5rem; animation: slideDown 0.3s ease-out; }
.faq-answer strong { color: var(--text-main); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.ticket-box { margin-top: 4rem; border: 1px solid var(--border); padding: 2rem; text-align: center; background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, #151518 10px, #151518 20px); }
.ticket-box h3 { font-family: var(--font-display); margin-bottom: 1rem; }
.ticket-box p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* --- PAGE SPECIFIC: GALLERY (VISUAL_DB) --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 4rem; }
.gallery-item { border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; transition: transform 0.3s ease, border-color 0.3s ease; }
.gallery-item:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.img-wrapper { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; background: #000; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.2) brightness(0.8); transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.gallery-item:hover .gallery-img { filter: grayscale(0%) contrast(1) brightness(1); transform: scale(1.05); }
.img-meta { padding: 1rem; border-top: 1px solid var(--border); font-family: var(--font-mono); background: var(--surface); position: relative; z-index: 2; }
.meta-row { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--text-muted); margin-bottom: 0.5rem; letter-spacing: 1px; }
.meta-desc { font-size: 0.9rem; font-weight: bold; color: var(--text-main); }
.img-wrapper .scan-line { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: rgba(204, 255, 0, 0.5); opacity: 0; animation: scanDown 2s linear infinite; pointer-events: none; }
.gallery-item:hover .scan-line { opacity: 1; }
@keyframes scanDown { 0% { top: 0%; } 100% { top: 100%; } }

/* --- INTERACTIVE FOLDER STYLES --- */
.folder-container { border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); margin-bottom: 4rem; transition: all 0.3s ease; }
.folder-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; cursor: pointer; background: var(--surface); border-bottom: 1px solid transparent; transition: background 0.2s; }
.folder-header:hover { background: rgba(255, 255, 255, 0.05); }
.header-left, .header-right { display: flex; align-items: center; gap: 1rem; }
.folder-icon { font-size: 1.5rem; }
.folder-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-main); margin: 0; }
.folder-status { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); letter-spacing: 1px; }
.toggle-arrow { transition: transform 0.3s ease; font-size: 0.8rem; }
.mission-receipt { margin-top: 4rem; border: 1px dashed var(--accent); background: rgba(204, 255, 0, 0.05); padding: 2rem; position: relative; max-width: 700px; margin-left: auto; margin-right: auto; box-shadow: 0 0 20px rgba(204, 255, 0, 0.1); }
.receipt-header { display: flex; justify-content: space-between; border-bottom: 1px solid var(--accent); padding-bottom: 1rem; margin-bottom: 1.5rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 1px; }
.receipt-body { text-align: center; }
.dedication-text { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; color: #fff; line-height: 1.8; }
.dedication-text .highlight { background: var(--accent); color: #000; padding: 2px 6px; font-weight: bold; }
.receipt-footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--accent); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); opacity: 0.8; }
.barcode { font-size: 1.5rem; letter-spacing: -2px; }

/* ============================================================ */
/* /// SYSTEM_OVERRIDE: MOBILE_KERNEL_FINAL (RESPONSIVE)        */
/* ============================================================ */

/* 1. GLOBAL SAFETY (Kill horizontal scroll) */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

@media (max-width: 768px) {

    /* --- 2. CONTAINER SPACING --- */
    .page-wrapper {
        padding: 1.5rem 1.2rem !important; /* Balanced padding */
        width: 100%;
        overflow: hidden;
    }

    /* --- 3. TYPOGRAPHY SCALING (The "Perfect Fit" Fix) --- */
    
    /* Hero Title (ENGINEERING...) */
    .hero-title {
        /* This uses Viewport Width (vw). Text will always be 11% of screen width. */
        font-size: 11vw !important; 
        line-height: 1.1;
        width: 100%;
        word-spacing: 100vw; /* Forces each word to its own line if needed */
        margin-bottom: 1.5rem;
    }

    /* Page Headers (EVENTS, LOGS, ETC) */
    .page-header h1 {
        font-size: 3rem !important;
        line-height: 1;
    }
    
    .glitch-text {
        font-size: 10vw !important;
    }

    /* Blog & Long Titles */
    .article-title {
        font-size: 1.8rem !important;
        line-height: 1.3;
        word-break: break-word;
    }

    /* --- 4. LAYOUT STACKING (Force 1 Column) --- */
    /* This fixes the Gallery, Roster, and Events grids */
    .hero-grid,
    .gallery-grid, 
    .roster-grid, 
    .bento-grid, 
    .podium-grid,
    .tracks-grid, 
    .blog-layout,
    .list-row {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 2rem;
    }

    /* --- 5. GALLERY FOLDER FIX --- */
    .folder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 0.5rem;
    }

    /* --- 6. NAVIGATION BAR --- */
    .nav-container {
        padding: 1rem 1.2rem;
    }
    
    .nav-logo {
        font-size: 1rem;
    }

    /* --- 7. SIDEBAR / BADGE --- */
    .hero-side {
        display: flex !important;
        flex-direction: column;
        padding: 0;
        margin-top: 3rem;
        border-top: 1px solid var(--border);
        border-left: none;
    }

    .system-badge {
        margin-top: 2rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* --- 8. IMAGE & CARD SAFETY --- */
    img, .gallery-img, .node-avatar img {
        max-width: 100%;
        height: auto;
    }

    .card, .node-card, .gallery-item {
        width: 100%;
    }

    /* --- 9. WINNERS PODIUM REORDER --- */
    .podium-grid { margin-top: 1rem; }
    .rank-1 { order: 1; margin-bottom: 2rem; }
    .rank-2 { order: 2; }
    .rank-3 { order: 3; }

    /* --- 10. MISSION RECEIPT --- */
    .mission-receipt {
        padding: 1rem;
    }
    .barcode {
        font-size: 1rem;
    }
}