:root {
    --bg-color: #020202;
    --text-color: #ffffff;
    --primary-color: #d4af37; /* Cinematic Gold */
    --neon-blue: #00f2ff;
    --accent-color: rgba(212, 175, 55, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-line: rgba(212, 175, 55, 0.5);
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Instrument Serif', serif;
    --transition-speed: 0.6s;
}

body.tech-mode {
    --primary-color: var(--neon-blue);
    --accent-color: rgba(0, 242, 255, 0.3);
    --neon-line: rgba(0, 242, 255, 0.6);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    background-image: 
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 50px 50px; /* Subtle neon grid */
}

/* Neon Scanning Line Decor */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    z-index: 1000;
    pointer-events: none;
    opacity: 0.3;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: -10%; }
    100% { top: 110%; }
}

#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
}

.ui-layer {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    pointer-events: none;
}

.ui-layer > * {
    pointer-events: auto;
}

/* Modern Header */
header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--primary-color);
}

/* Glass Cards with Neon Edges */
.glass-card, .glass-pane {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(25px);
    border-radius: 12px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card::before, .glass-pane::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 12px;
    background: linear-gradient(45deg, transparent, var(--neon-line), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.glass-card:hover::before, .glass-pane:hover::before {
    opacity: 1;
}

/* Modern Typography */
h1 {
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 0.85;
}

h1 span {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--accent-color);
}

.glass-btn {
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1.2rem 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: inset 0 0 0 0 var(--primary-color);
    transition: all 0.4s;
}

.glass-btn:hover {
    color: #000;
    box-shadow: inset 0 0 0 50px var(--primary-color);
}

/* Neon Lines Background Elements */
.neon-line-decor {
    position: absolute;
    background: var(--primary-color);
    opacity: 0.2;
    pointer-events: none;
}

.neon-v { width: 1px; height: 100px; }
.neon-h { height: 1px; width: 100px; }

/* Portal Sections */
.portal-section {
    min-height: 100vh;
    padding: 8% 8%;
    display: none; /* Hidden by default, shown by Gravity Mode */
    flex-direction: column;
    justify-content: center;
}

body.media-mode .media-only,
body.tech-mode .tech-only {
    display: flex;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3.5rem;
    font-weight: 700;
}

.section-title h2 span {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--primary-color);
}

/* Floating Gallery (Media) */
.floating-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.glass-pane {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.glass-pane img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.6s;
}

.glass-pane:hover {
    transform: translateZ(50px) rotateX(5deg) rotateY(-5deg);
    border-color: var(--primary-color);
}

.glass-pane.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2);
    width: 80vw;
    height: 80vh;
    z-index: 1000;
    cursor: zoom-out;
}

.glass-pane.zoomed img {
    height: 70%;
}

.pane-content {
    padding: 1.5rem 0.5rem;
}

.pane-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Exploded View (Tech) */
.project-block {
    display: flex;
    align-items: center;
    gap: 5rem;
    margin-bottom: 10rem;
}

.project-asset {
    flex: 1;
    position: relative;
}

.project-asset img {
    width: 100%;
    max-width: 500px;
    filter: drop-shadow(0 0 50px var(--accent-color));
}

.project-info {
    flex: 1;
    padding: 3rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
}

.tech-tags {
    margin-top: 2rem;
}

.tech-tags span {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-right: 1rem;
    font-weight: 700;
}

/* Hologram Map */
.hologram-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    height: 500px;
}

#hologram-map {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.05), transparent);
}

.hologram-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.location-tag {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
}

.location-tag .dot {
    display: block;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-color);
    animation: pulse 2s infinite;
}

.tag-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    width: 180px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.location-tag:hover .tag-info {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.event-details {
    padding: 2rem;
}

/* Drifting Animations */
.drift-text {
    transform: perspective(1000px);
}

/* Modern Navigation */
.modern-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: all 0.3s;
}

.modern-nav a:hover {
    opacity: 1;
    text-shadow: 0 0 8px var(--primary-color);
}

.neon-link {
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    opacity: 1 !important;
}

/* Refined Gravity Toggle */
.gravity-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.gravity-toggle .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: var(--transition-speed);
}

.toggle-track {
    width: 60px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    position: relative;
    padding: 3px;
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    left: 4px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 20px var(--primary-color);
}

body.tech-mode .toggle-thumb {
    transform: translateX(32px);
}

@media (max-width: 768px) {
    h1 { font-size: 3.5rem; }
    header { padding: 1.5rem; }
    .modern-nav { display: none; }
    .project-block { flex-direction: column; gap: 2rem; }
    .section-title h2 { font-size: 2.5rem; }
}
