/* ==========================================================================
   NS Thompson 3D Portfolio - Main Styles
   ========================================================================== */

@font-face {
    font-family: 'PPSupplyMono';
    src: url('../fonts/PPSupplyMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #0a0a0b;
    --color-bg-dark: #050506;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-accent: #d0ff00;
    --color-accent-secondary: #ff00ff;
    --color-accent-tertiary: #00ffff;
    --font-primary: 'PPSupplyMono', monospace;
    --font-mono: 'PPSupplyMono', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden {
    display: none !important;
}

/* ==========================================================================
   Canvas Container
   ========================================================================== */

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#canvas-container canvas {
    display: block;
}

/* ==========================================================================
   Void Fade Overlay - Fades to grey at extreme depths
   ========================================================================== */

#void-fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* ==========================================================================
   Easter Egg Full Screen Overlay
   ========================================================================== */

#easter-egg-overlay {
    --glitch-intensity: 0.5; /* Set by JS based on settings */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#easter-egg-overlay.visible {
    opacity: 1;
}

.easter-egg-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#easter-egg-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: contrast(1.1) saturate(1.1);
}

/* Only animate when visible and glitch is enabled */
#easter-egg-overlay.visible #easter-egg-image {
    animation: easterEggGlitch 0.15s infinite;
}

@keyframes easterEggGlitch {
    0% {
        transform: translate(0, 0) skewX(0deg);
        filter: contrast(1.1) saturate(1.1) hue-rotate(0deg);
    }
    10% {
        transform: translate(calc(-4px * var(--glitch-intensity, 0.5)), calc(2px * var(--glitch-intensity, 0.5))) skewX(calc(1deg * var(--glitch-intensity, 0.5)));
        filter: contrast(1.2) saturate(1.2) hue-rotate(calc(10deg * var(--glitch-intensity, 0.5)));
    }
    20% {
        transform: translate(calc(4px * var(--glitch-intensity, 0.5)), calc(-2px * var(--glitch-intensity, 0.5))) skewX(calc(-1deg * var(--glitch-intensity, 0.5)));
        filter: contrast(1.0) saturate(1.1) hue-rotate(calc(-10deg * var(--glitch-intensity, 0.5)));
    }
    30% {
        transform: translate(0, calc(4px * var(--glitch-intensity, 0.5))) skewX(calc(0.6deg * var(--glitch-intensity, 0.5)));
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    }
    35% {
        transform: translate(calc(6px * var(--glitch-intensity, 0.5)), 0) skewX(0deg);
        clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%);
    }
    40% {
        transform: translate(calc(-2px * var(--glitch-intensity, 0.5)), calc(-2px * var(--glitch-intensity, 0.5))) skewX(calc(-0.6deg * var(--glitch-intensity, 0.5)));
        clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    }
    45% {
        transform: translate(0, 0) skewX(0deg);
        clip-path: none;
    }
    70% {
        transform: translate(calc(2px * var(--glitch-intensity, 0.5)), 0) skewX(calc(0.4deg * var(--glitch-intensity, 0.5)));
        filter: contrast(1.3) saturate(0.9) hue-rotate(calc(20deg * var(--glitch-intensity, 0.5)));
    }
    85% {
        transform: translate(calc(-2px * var(--glitch-intensity, 0.5)), calc(2px * var(--glitch-intensity, 0.5))) skewX(calc(-0.4deg * var(--glitch-intensity, 0.5)));
    }
    100% {
        transform: translate(0, 0) skewX(0deg);
        filter: contrast(1.1) saturate(1.1) hue-rotate(0deg);
        clip-path: none;
    }
}

/* RGB Split effect pseudo elements */
#easter-egg-overlay::before,
#easter-egg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    pointer-events: none;
    opacity: 0;
}

#easter-egg-overlay.visible::before {
    animation: rgbSplitRed 0.1s infinite;
    mix-blend-mode: screen;
    opacity: 0.3;
}

#easter-egg-overlay.visible::after {
    animation: rgbSplitBlue 0.1s infinite;
    mix-blend-mode: screen;
    opacity: 0.3;
}

@keyframes rgbSplitRed {
    0%, 100% { transform: translate(-2px, 0); filter: hue-rotate(-30deg); }
    50% { transform: translate(-3px, 1px); filter: hue-rotate(-20deg); }
}

@keyframes rgbSplitBlue {
    0%, 100% { transform: translate(2px, 0); filter: hue-rotate(30deg); }
    50% { transform: translate(3px, -1px); filter: hue-rotate(20deg); }
}

/* ==========================================================================
   UI Overlay
   ========================================================================== */

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* Logo */
#logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 100;
}

#logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
}

.logo-svg {
    width: 40px;
    height: 37px;
    color: var(--color-accent);
    filter: drop-shadow(0 0 10px var(--color-accent))
            drop-shadow(0 0 20px var(--color-accent));
    transition: filter 0.3s ease, transform 0.3s ease;
}

#logo:hover .logo-svg {
    filter: drop-shadow(0 0 15px var(--color-accent))
            drop-shadow(0 0 30px var(--color-accent))
            drop-shadow(0 0 45px var(--color-accent));
    transform: scale(1.05);
}

/* ==========================================================================
   Availability Beacon
   ========================================================================== */

.availability-beacon {
    position: absolute;
    top: calc(2rem + 50px);
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 100;
    cursor: pointer;
}

.beacon-signal {
    position: relative;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.beacon-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-accent);
    z-index: 2;
}

.beacon-ping {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    animation: beaconPing 2s ease-out infinite;
}

@keyframes beaconPing {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.beacon-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    background: rgba(10, 10, 11, 0.85);
    border: 1px solid rgba(208, 255, 0, 0.2);
    border-radius: 8px;
    margin-left: 0.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.availability-beacon:hover .beacon-content {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    max-width: 250px;
    padding-left: 0.75rem;
}

.beacon-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.beacon-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(208, 255, 0, 0.4);
}

.beacon-detail {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

/* Status variants */
.availability-beacon[data-status="available"] .beacon-dot {
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent);
}

.availability-beacon[data-status="available"] .beacon-ping {
    background: var(--color-accent);
}

.availability-beacon[data-status="available"] .beacon-status {
    color: var(--color-accent);
}

.availability-beacon[data-status="available"] .beacon-content {
    border-color: rgba(208, 255, 0, 0.2);
}

.availability-beacon[data-status="limited"] .beacon-dot {
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00;
}

.availability-beacon[data-status="limited"] .beacon-ping {
    background: #ffaa00;
}

.availability-beacon[data-status="limited"] .beacon-status {
    color: #ffaa00;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.availability-beacon[data-status="limited"] .beacon-content {
    border-color: rgba(255, 170, 0, 0.2);
}

.availability-beacon[data-status="booked"] .beacon-dot {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.availability-beacon[data-status="booked"] .beacon-ping {
    display: none;
}

.availability-beacon[data-status="booked"] .beacon-status {
    color: rgba(255, 255, 255, 0.5);
    text-shadow: none;
}

.availability-beacon[data-status="booked"] .beacon-content {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Hover enhancement */
.availability-beacon:hover .beacon-dot {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .availability-beacon {
        top: calc(1rem + 45px);
        left: 1rem;
    }

    .beacon-content {
        padding: 0.5rem 0.75rem 0.5rem 0.6rem;
    }

    .availability-beacon:hover .beacon-content {
        max-width: 200px;
    }

    .beacon-status {
        font-size: 0.65rem;
    }

    .beacon-detail {
        font-size: 0.55rem;
    }
}

/* Morse Code Indicator - positioned left of gravity toggle */
.morse-indicator {
    position: absolute;
    top: calc(2rem + 14px);
    right: calc(2rem + 36px + 36px + 36px + 36px + 36px + 36px + 36px + 0.75rem + 0.75rem + 0.75rem + 0.75rem + 0.75rem + 0.75rem + 0.5rem);
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px var(--color-accent);
    transition: opacity 0.1s ease;
    z-index: 100;
}

.morse-indicator.on {
    opacity: 1;
    box-shadow: 0 0 15px var(--color-accent), 0 0 25px var(--color-accent);
}

/* Audio Toggle */
.audio-toggle {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 36px + 0.75rem);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.audio-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(208, 255, 0, 0.3);
}

.audio-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.audio-toggle:hover .audio-icon {
    color: var(--color-accent);
}

.audio-icon.hidden {
    display: none;
}

/* Timeline Toggle Button */
.timeline-toggle {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 36px + 36px + 0.75rem + 0.75rem);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.timeline-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(208, 255, 0, 0.3);
}

.timeline-toggle svg {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.timeline-toggle:hover svg {
    color: var(--color-accent);
}

.timeline-toggle.active {
    background: rgba(208, 255, 0, 0.15);
    border-color: var(--color-accent);
}

.timeline-toggle.active svg {
    color: var(--color-accent);
}

/* Timeline Controls */
.timeline-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
    z-index: 1000;
}

.timeline-controls:not(.hidden) {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.timeline-exit-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.timeline-exit-btn:hover {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.6);
    color: rgba(255, 100, 100, 0.9);
    transform: scale(1.05);
}

.timeline-scrubber {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 300px;
    position: relative;
}

.timeline-track {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: visible;
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-secondary));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

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

.timeline-marker {
    position: absolute;
    top: -2px;
    width: 1px;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-50%);
}

.timeline-marker.major {
    height: 8px;
    top: -3px;
    background: rgba(255, 255, 255, 0.4);
    width: 1.5px;
}

.timeline-slider {
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

/* Hamburger Menu */
#menu-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(10px);
    z-index: 100;
}

#menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(208, 255, 0, 0.3);
}

.hamburger-line {
    width: 16px;
    height: 1px;
    background: var(--color-text);
    transition: all 0.3s var(--ease-out-expo);
}

#menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 5px);
}

#menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -5px);
}

/* Navigation Panel */
#nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out-expo);
    z-index: 90;
    display: flex;
    flex-direction: column;
}

#nav-panel.active {
    transform: translateX(0);
}

.nav-content {
    padding: 6rem 2rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Accordion Styling */
.nav-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.nav-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-accordion-header:hover {
    color: var(--color-accent);
}

.nav-accordion-header i {
    transition: transform 0.3s var(--ease-out-expo);
}

.nav-accordion-header.active i {
    transform: rotate(180deg);
}

.nav-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo);
}

.nav-accordion-content.active {
    max-height: 800px;
}

/* Menu Item */
.nav-menu-item {
    display: block;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
}

.nav-menu-item:hover {
    color: var(--color-accent);
    padding-left: 0.5rem;
}

#project-list {
    list-style: none;
    padding-top: 0.5rem;
}

#project-list li {
    margin-bottom: 0.15rem;
}

#project-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.7rem;
    border-radius: 8px;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

#project-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--color-accent);
    transform: scaleY(0);
    transition: transform 0.3s var(--ease-out-expo);
}

#project-list a:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.5rem;
}

#project-list a:hover::before {
    transform: scaleY(1);
}

#project-list a.active {
    background: rgba(208, 255, 0, 0.1);
    color: var(--color-accent);
}

#project-list a.active::before {
    transform: scaleY(1);
}

.nav-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-footer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.nav-footer-name {
    color: var(--color-accent);
    font-weight: 500;
    white-space: nowrap;
}

.nav-footer-dots {
    flex: 1;
    color: rgba(255, 255, 255, 0.15);
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.nav-footer-copyright {
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.nav-footer-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-social-link svg {
    width: 16px;
    height: 16px;
}

.nav-social-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: rgba(208, 255, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(208, 255, 0, 0.2);
}

/* Project Info Panel */
#project-info {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    max-width: 420px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--ease-out-expo);
    pointer-events: none;
    z-index: 1100;
}

#project-info.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Close Button */
.project-close-btn {
    position: absolute;
    top: -2.875rem;
    right: -10px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(5, 5, 7, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0) rotate(-90deg);
    transition: all 0.4s var(--ease-out-back);
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

#project-info.visible .project-close-btn {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.3s;
}

.project-close-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-close-btn:hover::before {
    opacity: 1;
}

.project-close-btn:hover {
    background: rgba(208, 255, 0, 0.1);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 30px rgba(208, 255, 0, 0.3);
}

.project-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

.close-icon {
    width: 18px;
    height: 18px;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.project-close-btn:hover .close-icon {
    color: var(--color-accent);
}

.project-info-content {
    position: relative;
    /* Gradient border via two-background technique - rock solid, cannot be clipped */
    background:
        linear-gradient(rgba(5, 5, 7, 0.85), rgba(5, 5, 7, 0.85)) padding-box,
        linear-gradient(45deg, var(--color-accent), var(--color-accent-secondary), var(--color-accent), var(--color-accent-secondary)) border-box;
    background-size: 100% 100%, 300% 300%;
    border: 1px solid transparent;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 16px;
    padding: 1.5rem;
    overflow: hidden;
    animation: projectCardBorderFlow 6s ease-in-out infinite, projectCardGlow 3s ease-in-out infinite;
}

@keyframes projectCardBorderFlow {
    0%, 100% { background-position: 0% 0%, 0% 50%; }
    50% { background-position: 0% 0%, 100% 50%; }
}

@keyframes projectCardGlow {
    0%, 100% {
        box-shadow: 0 0 24px rgba(208, 255, 0, 0.12), 0 0 60px rgba(208, 255, 0, 0.05);
    }
    50% {
        box-shadow: 0 0 32px rgba(208, 255, 0, 0.2), 0 0 80px rgba(208, 255, 0, 0.1);
    }
}

/* Animated gradient border */
/* Border now lives directly on .project-info-content via background + border-box (bulletproof, cannot be clipped) */

/* Mouse tracking radial glow */
.project-info-content::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(208, 255, 0, 0.15),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#project-info.visible .project-info-content::after {
    opacity: 1;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 1;
        filter: brightness(1) saturate(1);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.2) saturate(1.3);
    }
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    position: relative;
    z-index: 1;
}

.project-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px currentColor;
    animation: statusPulse 2s ease-in-out infinite;
}

.status-dot.active {
    background: #00ff88;
    color: #00ff88;
}

.status-dot.paused {
    background: #ffaa00;
    color: #ffaa00;
}

.status-dot.abandoned {
    background: #ff4444;
    color: #ff4444;
}

.status-dot.fun {
    background: #aa88ff;
    color: #aa88ff;
}

.status-dot.complete {
    background: #00ccff;
    color: #00ccff;
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 12px currentColor, 0 0 20px currentColor;
    }
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.project-excerpt {
    font-size: 0.675rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
}

.project-client,
.project-year {
    text-transform: uppercase;
    font-weight: 300;
    font-size: 0.6875rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.project-link:hover {
    gap: 0.75rem;
    text-shadow: 0 0 20px var(--color-accent);
}

.project-link::after {
    content: '\2192';
}

.project-case-study-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(120, 140, 160, 0.6);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.project-case-study-link:hover {
    gap: 0.75rem;
    color: rgba(140, 160, 180, 0.85);
    text-shadow: 0 0 12px rgba(140, 160, 180, 0.25);
}

.project-case-study-link::after {
    content: '\2192';
}

/* Deep Dive / In-page Case Study Button */
.project-case-study-btn {
    display: none; /* Hidden by default, shown via JS */
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: linear-gradient(
        135deg,
        rgba(208, 255, 0, 0.12) 0%,
        rgba(208, 255, 0, 0.06) 100%
    );
    border: 1px solid rgba(208, 255, 0, 0.25);
    border-radius: 5px;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.project-case-study-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(208, 255, 0, 0.2) 0%,
        rgba(208, 255, 0, 0.1) 100%
    );
    border-color: rgba(208, 255, 0, 0.4);
    box-shadow: 0 0 20px rgba(208, 255, 0, 0.15);
    transform: translateY(-1px);
}

.project-case-study-btn svg {
    opacity: 0.8;
}

.project-case-study-btn.visible {
    display: inline-flex;
}

/* Project Gallery Carousel */
.project-gallery {
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

.gallery-main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    /* Prevent any stretching - these are critical */
    max-width: none;
    max-height: none;
}

.gallery-main-image.loaded {
    opacity: 1;
}

.gallery-webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    opacity: 0;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 2;
}

.gallery-main:hover .gallery-prev,
.gallery-main:hover .gallery-next {
    opacity: 1;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(208, 255, 0, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev:active,
.gallery-next:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
    left: 0.75rem;
}

.gallery-next {
    right: 0.75rem;
}

.gallery-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-thumbnail {
    position: relative;
    min-width: 70px;
    width: 70px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s var(--ease-out-expo);
    flex-shrink: 0;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.gallery-thumbnail:hover img {
    opacity: 1;
}

.gallery-thumbnail:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.gallery-thumbnail.active {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(208, 255, 0, 0.3);
}

.gallery-thumbnail.active img {
    opacity: 1;
}

.gallery-thumbnail.active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, var(--color-accent) 100%);
    opacity: 0.15;
    pointer-events: none;
}

/* ==========================================================================
   Floating Contact CTA
   ========================================================================== */

.contact-cta {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.6rem;
    background: rgba(10, 10, 11, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.contact-cta:hover {
    background: rgba(10, 10, 11, 0.9);
    border-color: rgba(208, 255, 0, 0.3);
    box-shadow: 0 0 30px rgba(208, 255, 0, 0.1);
    padding-right: 1rem;
}

.cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-cta:hover .cta-icon {
    color: var(--color-accent);
}

.cta-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding-left: 0;
}

.contact-cta:hover .cta-content {
    max-width: 150px;
    opacity: 1;
    padding-left: 0.5rem;
}

.cta-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

.cta-action {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(208, 255, 0, 0.3);
}

/* Subtle idle animation */
.cta-icon svg {
    animation: ctaBreath 3s ease-in-out infinite;
}

@keyframes ctaBreath {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.contact-cta:hover .cta-icon svg {
    animation: none;
    opacity: 1;
    transform: scale(1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-cta {
        bottom: 1rem;
        left: 1rem;
        padding: 0.5rem;
    }

    .cta-icon {
        width: 24px;
        height: 24px;
    }

    .cta-icon svg {
        width: 16px;
        height: 16px;
    }

    .contact-cta:hover .cta-content {
        max-width: 120px;
    }

    .cta-action {
        font-size: 0.6rem;
    }
}

/* ========================================
   Quick Brief Form Modal
   ======================================== */
.brief-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brief-modal.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.brief-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.brief-modal-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    margin: 1rem;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brief-modal.active .brief-modal-container {
    transform: translateY(0) scale(1);
}

.brief-modal-content {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 25, 0.95) 0%,
        rgba(15, 15, 20, 0.98) 100%
    );
    border: 1px solid rgba(208, 255, 0, 0.15);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(208, 255, 0, 0.05);
}

/* Custom scrollbar for modal */
.brief-modal-content::-webkit-scrollbar {
    width: 6px;
}

.brief-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.brief-modal-content::-webkit-scrollbar-thumb {
    background: rgba(208, 255, 0, 0.2);
    border-radius: 3px;
}

.brief-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(208, 255, 0, 0.35);
}

/* Close button */
.brief-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.brief-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Header */
.brief-header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brief-signal {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.65rem;
    background: rgba(208, 255, 0, 0.08);
    border: 1px solid rgba(208, 255, 0, 0.2);
    border-radius: 20px;
}

.signal-dot {
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: signal-pulse 2s ease-in-out infinite;
}

@keyframes signal-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.signal-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    text-transform: uppercase;
}

.brief-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
}

.brief-subtitle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Form Styles */
.brief-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-row-half .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(208, 255, 0, 0.4);
    background: rgba(208, 255, 0, 0.03);
    box-shadow: 0 0 0 3px rgba(208, 255, 0, 0.08);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-group select option {
    background: #1a1a1f;
    color: var(--color-text);
    padding: 0.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

/* Checkbox */
.form-group-checkbox {
    margin-top: 0.15rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkbox-custom {
    border-color: rgba(255, 255, 255, 0.35);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #0a0a0a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    line-height: 1.4;
}

/* Submit Button */
.brief-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    margin-top: 0.5rem;
    background: linear-gradient(
        135deg,
        var(--color-accent) 0%,
        #b8e600 100%
    );
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: #0a0a0a;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.brief-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brief-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(208, 255, 0, 0.3),
        0 0 40px rgba(208, 255, 0, 0.15);
}

.brief-submit:hover::before {
    opacity: 1;
}

.brief-submit:active {
    transform: translateY(0);
}

.submit-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.brief-submit:hover .submit-icon {
    transform: translateX(3px) translateY(-3px);
}

/* Footer */
.brief-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-signal {
    width: 4px;
    height: 4px;
    background: rgba(208, 255, 0, 0.5);
    border-radius: 50%;
    animation: signal-pulse 3s ease-in-out infinite;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.35);
}

/* Success State */
.brief-form.success .form-row,
.brief-form.success .form-group:not(.form-success),
.brief-form.success .brief-submit {
    display: none;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

.brief-form.success .form-success {
    display: block;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    background: rgba(208, 255, 0, 0.1);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.success-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
}

.success-message {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .brief-modal-container {
        margin: 0.5rem;
    }

    .brief-modal-content {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .brief-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .brief-title {
        font-size: 1.25rem;
    }

    .brief-subtitle {
        font-size: 0.75rem;
    }

    .brief-form {
        gap: 0.7rem;
    }

    .form-row-half {
        flex-direction: column;
        gap: 0.7rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.75rem;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .form-group textarea {
        min-height: 60px;
    }

    .brief-submit {
        padding: 0.7rem 1rem;
    }

    .brief-footer {
        margin-top: 0.75rem;
        padding-top: 0.65rem;
    }
}

/* ========================================
   Case Study Modal
   ======================================== */
.case-study-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-modal.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.case-study-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(5, 5, 8);
    /* backdrop-filter removed - was causing compositing flash with WebGL canvas */
}

.case-study-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.case-study-container::-webkit-scrollbar {
    width: 8px;
}

.case-study-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.case-study-container::-webkit-scrollbar-thumb {
    background: rgba(208, 255, 0, 0.2);
    border-radius: 4px;
}

.case-study-container::-webkit-scrollbar-thumb:hover {
    background: rgba(208, 255, 0, 0.35);
}

/* Close button */
.case-study-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.case-study-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.case-study-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* Hero Section */
.case-study-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.hero-image-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transform: scale(1.05);
    transition: transform 0.8s ease;
}

.case-study-modal.active .hero-image {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(5, 5, 8, 1) 0%,
        rgba(5, 5, 8, 0.8) 30%,
        rgba(5, 5, 8, 0.4) 60%,
        rgba(5, 5, 8, 0.2) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem 2rem 2.5rem;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.meta-divider {
    opacity: 0.4;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    color: white;
    margin: 0 0 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-excerpt {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    line-height: 1.7;
    margin: 0 0 2rem;
}

.hero-details {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.01) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-top: 0.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.detail-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.detail-value {
    font-size: 0.95rem;
    color: white;
}

/* Tech Stack */
.section-tech {
    padding: 0 2rem 3rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: rgba(208, 255, 0, 0.08);
    border: 1px solid rgba(208, 255, 0, 0.2);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--color-accent);
}

/* Content Sections */
.case-study-section {
    padding: 1.5rem 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    padding: 0.25rem 0.6rem;
    background: rgba(208, 255, 0, 0.08);
    border: 1px solid rgba(208, 255, 0, 0.15);
    border-radius: 4px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
}

.section-content {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.section-content p {
    margin: 0 0 1.25rem;
}

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

.section-content ul,
.section-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.section-content li {
    margin-bottom: 0.5rem;
}

/* Two-column layout for Challenge & Solution */
.case-study-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.case-study-two-col .case-study-section {
    padding: 0;
}

@media (max-width: 768px) {
    .case-study-two-col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 1.5rem;
    }
}

/* Process Gallery */
.process-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.process-image {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.process-image:hover {
    transform: translateY(-4px);
}

.process-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.process-image:hover img {
    transform: scale(1.05);
}

.process-image figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.process-image:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

/* Project Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.gallery-image {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* CTA Section */
.section-cta {
    padding: 4rem 2rem;
}

.cta-box {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(
        135deg,
        rgba(208, 255, 0, 0.05) 0%,
        rgba(208, 255, 0, 0.02) 100%
    );
    border: 1px solid rgba(208, 255, 0, 0.15);
    border-radius: 16px;
}

.cta-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    margin: 0 0 0.75rem;
}

.cta-text {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 1.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--color-accent);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #0a0a0a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(208, 255, 0, 0.3);
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* Case Study Lightbox */
.case-study-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-out;
}

.case-study-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.case-study-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-lightbox.active img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* Embedded Brief Form Accordion */
.case-study-form-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                padding 0.4s ease;
    padding: 0 2rem;
}

.case-study-form-section.expanded {
    max-height: 2000px;
    opacity: 1;
    padding: 2rem;
}

.case-study-form-section .brief-form {
    max-width: 100%;
    background: transparent;
    border: none;
    padding: 0;
}

.case-study-form-section .brief-form-inner {
    background: rgba(5, 5, 10, 0.5);
    border: 1px solid rgba(208, 255, 0, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

/* Subtle entrance animations for case study content */
.case-study-modal.active .hero-meta {
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.case-study-modal.active .hero-title {
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.case-study-modal.active .hero-excerpt {
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.case-study-modal.active .hero-details {
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}

.case-study-modal.active .section-tech {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.case-study-modal.active .section-challenge {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.case-study-modal.active .section-solution {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.case-study-modal.active .section-process {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.45s both;
}

.case-study-modal.active .section-results {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

.case-study-modal.active .section-gallery {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.55s both;
}

.case-study-modal.active .section-cta {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tech badge stagger animation */
.case-study-modal.active .tech-badge {
    animation: fadeScaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.case-study-modal.active .tech-badge:nth-child(1) { animation-delay: 0.32s; }
.case-study-modal.active .tech-badge:nth-child(2) { animation-delay: 0.36s; }
.case-study-modal.active .tech-badge:nth-child(3) { animation-delay: 0.40s; }
.case-study-modal.active .tech-badge:nth-child(4) { animation-delay: 0.44s; }
.case-study-modal.active .tech-badge:nth-child(5) { animation-delay: 0.48s; }
.case-study-modal.active .tech-badge:nth-child(6) { animation-delay: 0.52s; }

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gallery image stagger */
.case-study-modal.active .gallery-image,
.case-study-modal.active .process-image {
    animation: fadeSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.case-study-modal.active .gallery-image:nth-child(1),
.case-study-modal.active .process-image:nth-child(1) { animation-delay: 0.5s; }
.case-study-modal.active .gallery-image:nth-child(2),
.case-study-modal.active .process-image:nth-child(2) { animation-delay: 0.55s; }
.case-study-modal.active .gallery-image:nth-child(3),
.case-study-modal.active .process-image:nth-child(3) { animation-delay: 0.6s; }
.case-study-modal.active .gallery-image:nth-child(4),
.case-study-modal.active .process-image:nth-child(4) { animation-delay: 0.65s; }
.case-study-modal.active .gallery-image:nth-child(5),
.case-study-modal.active .process-image:nth-child(5) { animation-delay: 0.7s; }
.case-study-modal.active .gallery-image:nth-child(6),
.case-study-modal.active .process-image:nth-child(6) { animation-delay: 0.75s; }

/* Hide empty sections */
.case-study-section:empty,
.case-study-section.hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .case-study-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .case-study-hero {
        min-height: 40vh;
    }

    .hero-content {
        padding: 1rem 1.5rem 1.5rem;
    }

    .hero-meta {
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-excerpt {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .hero-details {
        gap: 1rem;
        padding: 1rem;
    }

    .case-study-section {
        padding: 1.25rem 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-content {
        font-size: 0.8rem;
    }

    .process-gallery,
    .project-gallery {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }
}

/* ========================================
   Process Reveal / Evolution
   ======================================== */
.evolution-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.gallery-main.evolving .evolution-overlay {
    opacity: 1;
    visibility: visible;
}

.evolution-progress {
    width: 80%;
    max-width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.evolution-fill {
    height: 100%;
    width: 0%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.evolution-label {
    text-align: center;
}

.evolution-stage-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.evolution-hint {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(208, 255, 0, 0.3);
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    white-space: nowrap;
    z-index: 4;
    animation: hint-pulse 2s ease-in-out infinite;
}

.gallery-main.has-evolution .evolution-hint {
    display: flex;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ========================================
   Director's Commentary
   ======================================== */
.project-commentary-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.25);
    border-radius: 6px;
    color: #ff8c00;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-commentary-btn:hover {
    background: rgba(255, 140, 0, 0.18);
    border-color: rgba(255, 140, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.15);
}

.project-commentary-btn.visible {
    display: inline-flex;
}

/* Commentary Player */
.commentary-player {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 0.5rem;
    background: rgba(255, 140, 0, 0.05);
    border: 1px solid rgba(255, 140, 0, 0.15);
    border-radius: 8px;
}

.commentary-player.visible {
    display: flex;
}

.commentary-waveform {
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.waveform-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(255, 140, 0, 0.3), rgba(255, 140, 0, 0.5));
    transition: width 0.1s linear;
}

.commentary-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.commentary-play-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff8c00;
    border: none;
    border-radius: 50%;
    color: #0a0a0a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.commentary-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
}

.commentary-play-btn .pause-icon {
    display: none;
}

.commentary-player.playing .commentary-play-btn .play-icon {
    display: none;
}

.commentary-player.playing .commentary-play-btn .pause-icon {
    display: block;
}

.commentary-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
}

.commentary-transcript-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.commentary-transcript-btn:hover,
.commentary-transcript-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.commentary-transcript {
    display: none;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
}

.commentary-transcript.visible {
    display: block;
}

.transcript-text {
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ========================================
   Behind the Scenes Modal
   ======================================== */
.bts-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bts-modal.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.bts-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.bts-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    margin: 1rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bts-modal.active .bts-container {
    transform: translateY(0) scale(1);
}

.bts-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bts-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.bts-content {
    background: linear-gradient(
        135deg,
        rgba(30, 20, 40, 0.95) 0%,
        rgba(20, 15, 30, 0.98) 100%
    );
    border: 1px solid rgba(200, 100, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow:
        0 0 60px rgba(200, 100, 255, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.5);
}

.bts-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bts-unlock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
    background: rgba(200, 100, 255, 0.15);
    border: 1px solid rgba(200, 100, 255, 0.3);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #c864ff;
    animation: unlock-glow 2s ease-in-out infinite;
}

@keyframes unlock-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(200, 100, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(200, 100, 255, 0.4); }
}

.bts-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    margin: 0 0 0.35rem;
}

.bts-project-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.bts-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bts-text-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.bts-text-content p {
    margin: 0 0 1rem;
}

.bts-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.bts-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bts-gallery img:hover {
    opacity: 1;
    transform: scale(1.02);
}

/* Secret gesture hint (subtle) */
.bts-hint {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.05em;
    color: rgba(200, 100, 255, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#project-info:hover .bts-hint.has-content {
    opacity: 1;
}

/* Controls Hint */
#controls-hint {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

#controls-hint:hover {
    opacity: 1;
}

#controls-hint kbd {
    display: inline-block;
    padding: 0.2em 0.5em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9em;
}

.hint-tweakbox {
    color: var(--color-accent);
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader-logo {
    width: 60px;
    height: 56px;
    filter: drop-shadow(0 0 20px var(--color-accent));
    animation: logoFloat 2s ease-in-out infinite 1.5s;
}

.loader-logo path {
    fill: rgba(255, 255, 255, 0.1);
    stroke: var(--color-accent);
    stroke-width: 0.5;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: logoDraw 1.2s ease-out forwards, logoFill 0.6s ease-out 1.2s forwards;
}

@keyframes logoDraw {
    0% {
        stroke-dashoffset: 300;
        fill: rgba(255, 255, 255, 0.05);
    }
    100% {
        stroke-dashoffset: 0;
        fill: rgba(255, 255, 255, 0.1);
    }
}

@keyframes logoFill {
    0% {
        fill: rgba(255, 255, 255, 0.1);
        stroke-width: 0.5;
        filter: drop-shadow(0 0 5px var(--color-accent));
    }
    100% {
        fill: var(--color-accent);
        stroke-width: 0;
        filter: drop-shadow(0 0 20px var(--color-accent));
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
    transition: width 0.3s ease;
}

/* ==========================================================================
   Tweakbox
   ========================================================================== */

#tweakbox {
    position: fixed;
    top: 5rem;
    left: 2rem;
    width: 320px;
    max-height: calc(100vh - 7rem);
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#tweakbox.hidden {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

.tweakbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.tweakbox-header h3 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
}

#tweakbox-close {
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#tweakbox-close:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.tweakbox-content {
    overflow-y: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.tweakbox-content::-webkit-scrollbar {
    width: 6px;
}

.tweakbox-content::-webkit-scrollbar-track {
    background: transparent;
}

.tweakbox-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.tweakbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Accordion Sections */
.tweak-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tweak-section:last-child {
    border-bottom: none;
}

.tweak-accordion {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.tweak-accordion:hover {
    background: rgba(255, 255, 255, 0.03);
}

.tweak-accordion.active {
    color: var(--color-accent);
}

.accordion-icon {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-text-muted);
    transition: transform 0.3s var(--ease-out-expo);
}

.tweak-accordion.active .accordion-icon {
    transform: rotate(45deg);
    color: var(--color-accent);
}

.tweak-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out-expo);
    background: rgba(0, 0, 0, 0.2);
}

.tweak-panel.active {
    max-height: 500px;
}

.tweak-panel > * {
    padding: 0.75rem 1.25rem;
}

/* Toggles */
.tweak-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.tweak-toggle:hover {
    color: var(--color-text);
}

.tweak-toggle input[type="checkbox"] {
    appearance: none;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tweak-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tweak-toggle input[type="checkbox"]:checked {
    background: var(--color-accent);
}

.tweak-toggle input[type="checkbox"]:checked::before {
    left: 18px;
    background: var(--color-bg);
}

/* Sliders */
.tweak-slider {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.tweak-slider span:first-child {
    grid-column: 1 / -1;
}

.tweak-slider input[type="range"] {
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
}

.tweak-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--color-accent);
    transition: transform 0.2s ease;
}

.tweak-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.tweak-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--color-accent);
}

.slider-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    min-width: 3em;
    text-align: right;
}

/* Color Picker */
.tweak-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.tweak-color input[type="color"] {
    appearance: none;
    width: 40px;
    height: 24px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.tweak-color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.tweak-color input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

/* Preset Buttons */
.presets-section .tweak-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.preset-btn[data-preset="reset"] {
    border-color: rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.preset-btn[data-preset="reset"]:hover {
    background: rgba(255, 100, 100, 0.1);
    border-color: #ff6464;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    #logo {
        top: 1rem;
        left: 1rem;
    }

    /* Morse indicator below hamburger on mobile */
    .morse-indicator {
        top: calc(1rem + 36px + 0.5rem + 14px);
        right: calc(1rem + 14px);
    }

    .timeline-toggle {
        top: 1rem;
        right: calc(1rem + 36px + 36px + 0.375rem + 0.375rem);
    }

    .audio-toggle {
        top: 1rem;
        right: calc(1rem + 36px + 0.375rem);
    }

    .timeline-controls {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
        padding: 0.875rem 1.25rem;
    }

    .timeline-controls:not(.hidden) {
        transform: translateX(0) translateY(0);
    }

    .timeline-scrubber {
        min-width: 200px;
    }

    #menu-toggle {
        top: 1rem;
        right: 1rem;
    }

    #nav-panel {
        width: 100%;
    }

    #project-info {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
        max-height: 80vh;
    }

    .project-info-content {
        max-height: 80vh;
        padding: 1.25rem;
    }

    .project-close-btn {
        top: -3.5rem;
    }

    /* Reduce gallery height on mobile */
    .gallery-main {
        aspect-ratio: 16 / 9;
        margin-bottom: 0.5rem;
    }

    .project-gallery {
        margin-bottom: 0.75rem;
    }

    .project-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .project-excerpt {
        margin-bottom: 0.75rem;
        font-size: 0.625rem;
    }

    .project-meta {
        margin-bottom: 0.75rem;
        font-size: 0.6875rem;
    }

    #controls-hint {
        display: none;
    }

    #tweakbox {
        left: 1rem;
        right: 1rem;
        width: auto;
        max-height: 60vh;
    }
}

/* ==========================================================================
   Custom Cursor (Optional)
   ========================================================================== */

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hovering {
    width: 40px;
    height: 40px;
    border-color: var(--color-accent);
    background: rgba(208, 255, 0, 0.1);
}

/* ==========================================================================
   About Modal
   ========================================================================== */

/* =========================================================================
   Transmission Log Modal - Phosphor CRT terminal
   ========================================================================= */

.transmission-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 2rem;
}

.transmission-modal:not(.hidden) {
    pointer-events: all;
    opacity: 1;
}

.transmission-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.transmission-modal:not(.hidden) .transmission-modal-overlay {
    opacity: 1;
}

/* The CRT terminal body */
.transmission-modal-content {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 82vh;
    background:
        radial-gradient(ellipse at center,
            rgba(8, 14, 4, 0.99) 0%,
            rgba(4, 8, 2, 1) 70%,
            rgba(2, 4, 1, 1) 100%);
    border-radius: 14px;
    overflow: hidden;
    transform: scale(0.94);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 0 0 1px rgba(208, 255, 0, 0.35),
        0 0 0 4px rgba(208, 255, 0, 0.05),
        0 0 60px rgba(208, 255, 0, 0.18),
        0 0 140px rgba(208, 255, 0, 0.08),
        inset 0 0 80px rgba(208, 255, 0, 0.04),
        inset 0 0 12px rgba(0, 0, 0, 0.7);
}

.transmission-modal:not(.hidden) .transmission-modal-content {
    transform: scale(1);
    opacity: 1;
}

.transmission-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(208, 255, 0, 0.06);
    border: 1px solid rgba(208, 255, 0, 0.3);
    color: rgba(208, 255, 0, 0.75);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.25s ease;
    font-family: var(--font-mono);
}

.transmission-modal-close:hover {
    background: rgba(208, 255, 0, 0.18);
    border-color: rgba(208, 255, 0, 0.7);
    color: #d0ff00;
    box-shadow: 0 0 14px rgba(208, 255, 0, 0.5);
    transform: rotate(90deg);
}

.transmission-modal-inner {
    position: relative;
    padding: 2.5rem 2.75rem 2.25rem;
    overflow-y: auto;
    max-height: 82vh;
}

.transmission-modal-inner::-webkit-scrollbar {
    width: 6px;
}

.transmission-modal-inner::-webkit-scrollbar-track {
    background: rgba(208, 255, 0, 0.04);
}

.transmission-modal-inner::-webkit-scrollbar-thumb {
    background: rgba(208, 255, 0, 0.3);
    border-radius: 3px;
}

.transmission-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(208, 255, 0, 0.05) 0px,
        rgba(208, 255, 0, 0.05) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: screen;
    animation: txScanlineMove 8s linear infinite;
}

@keyframes txScanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(6px); }
}

.transmission-static {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center,
            transparent 40%,
            rgba(0, 0, 0, 0.45) 80%,
            rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 3;
}

.transmission-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(208, 255, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(208, 255, 0, 0.02) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 1;
    mask-image: radial-gradient(ellipse at center, black 25%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 90%);
}

.transmission-header {
    position: relative;
    z-index: 5;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(208, 255, 0, 0.18);
}

.transmission-signal {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.signal-bar {
    width: 3px;
    background: #d0ff00;
    box-shadow: 0 0 6px #d0ff00, 0 0 12px rgba(208, 255, 0, 0.5);
    animation: txSignalPulse 1.4s ease-in-out infinite;
    border-radius: 1px;
}

.signal-bar:nth-child(1) { height: 4px; animation-delay: 0s; }
.signal-bar:nth-child(2) { height: 8px; animation-delay: 0.1s; }
.signal-bar:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.signal-bar:nth-child(4) { height: 16px; animation-delay: 0.3s; }

@keyframes txSignalPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.signal-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: #d0ff00;
    text-transform: uppercase;
    text-shadow:
        0 0 6px rgba(208, 255, 0, 0.95),
        0 0 14px rgba(208, 255, 0, 0.5),
        0 0 28px rgba(208, 255, 0, 0.2);
    animation: txTextGlitch 5s ease-in-out infinite;
}

@keyframes txTextGlitch {
    0%, 88%, 100% { opacity: 1; transform: translateX(0); }
    89% { opacity: 0.5; transform: translateX(-1px); }
    90% { opacity: 1; transform: translateX(0); }
    93% { opacity: 0.7; transform: translateX(1px); }
    94% { opacity: 1; transform: translateX(0); }
}

.transmission-meta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.transmission-project-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #d0ff00;
    text-shadow:
        0 0 4px currentColor,
        0 0 12px currentColor,
        0 0 30px rgba(208, 255, 0, 0.4) !important;
    letter-spacing: 0.01em;
    line-height: 1.15;
    font-family: var(--font-display, var(--font-mono));
}

.transmission-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.transmission-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffaa00;
    box-shadow:
        0 0 8px rgba(255, 170, 0, 0.7),
        0 0 16px rgba(255, 170, 0, 0.4);
    animation: txDotPulse 2s ease-in-out infinite;
}

@keyframes txDotPulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

.transmission-status-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #ffaa00;
    opacity: 0.85;
}

.transmission-content {
    position: relative;
    z-index: 5;
    color: rgba(220, 255, 200, 0.88);
    line-height: 1.85;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    text-shadow: 0 0 3px rgba(208, 255, 0, 0.25);
}

.transmission-content p {
    margin-bottom: 1.15rem;
    position: relative;
    padding-left: 1.2rem;
}

.transmission-content p:last-child {
    margin-bottom: 0;
}

.transmission-content p::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #d0ff00;
    opacity: 0.55;
    font-weight: 700;
    text-shadow: 0 0 4px rgba(208, 255, 0, 0.6);
}

@media (max-width: 640px) {
    .transmission-modal {
        padding: 1rem;
    }

    .transmission-modal-inner {
        padding: 2rem 1.5rem 1.5rem;
    }

    .transmission-project-title {
        font-size: 1.6rem;
    }

    .transmission-content {
        font-size: 0.88rem;
    }
}

/* =========================================================================
   About Modal
   ========================================================================= */

.about-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    overflow-y: auto;
}

.about-modal:not(.hidden) {
    pointer-events: all;
    opacity: 1;
}

.about-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.about-modal:not(.hidden) .about-modal-overlay {
    opacity: 1;
}

.about-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin-bottom: 10vh;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 16px;
    overflow: hidden;
    transform: translateY(50px) scale(0.9);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animated gradient border */
.about-modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(
        45deg,
        var(--color-accent),
        var(--color-accent-secondary),
        var(--color-accent)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderGlow 3s ease-in-out infinite;
    pointer-events: none;
}

/* Mouse tracking radial glow */
.about-modal-content::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(208, 255, 0, 0.15),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.about-modal:not(.hidden) .about-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.about-modal:not(.hidden) .about-modal-content::after {
    opacity: 1;
}

.about-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(5, 5, 7, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-modal-close:hover {
    background: rgba(208, 255, 0, 0.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 30px rgba(208, 255, 0, 0.3);
}

.about-modal-inner {
    position: relative;
    padding: 3rem 2rem 2rem;
    z-index: 1;
}

/* Scanlines Effect */
.about-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0.5;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

/* Grid Overlay */
.about-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(208, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(208, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.3;
}

/* Title */
.about-glitch-text {
    position: relative;
    margin-bottom: 2rem;
}

.about-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
    margin: 0 0 1.5rem 0;
    position: relative;
}

/* Content */
.about-content-wrapper {
    position: relative;
    z-index: 1;
}

/* Overview Section */
.about-overview {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.about-overview p {
    margin-bottom: 0.75rem;
}

.about-overview p:last-child {
    margin-bottom: 0;
}

/* Accordions Container */
.about-accordions {
    max-width: 700px;
    margin: 0 auto;
}

/* Accordion Styling */
.about-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.about-accordion:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.about-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.about-accordion-header:hover {
    color: var(--color-accent);
}

.about-accordion-icon {
    transition: transform 0.3s var(--ease-out-expo);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.about-accordion-header.active .about-accordion-icon {
    transform: rotate(180deg);
}

.about-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo);
}

.about-accordion-content.active {
    max-height: 1200px;
}

.about-accordion-inner {
    padding-top: 0.75rem;
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

.about-accordion-inner p {
    margin-bottom: 0.75rem;
}

.about-accordion-inner p:last-child {
    margin-bottom: 0;
}

.about-accordion-inner strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

.about-accordion-inner ul {
    margin: 0.5rem 0 0.75rem 0;
    padding-left: 1.5rem;
}

.about-accordion-inner li {
    color: rgba(255, 255, 255, 0.75);
}

/* Legacy support for old .about-text class */
.about-text {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 0.75rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

.about-text ul {
    margin: 0.5rem 0 0.75rem 0;
    padding-left: 1.5rem;
}

.about-text li {
    color: rgba(255, 255, 255, 0.75);
}

/* Responsive */
@media (max-width: 768px) {
    .about-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .about-modal-inner {
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .about-title {
        font-size: 18px;
    }

    .about-text {
        font-size: 11px;
    }
}

/* ==========================================================================
   Constellation Toggle
   ========================================================================== */

.constellation-toggle {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 36px + 36px + 36px + 0.75rem + 0.75rem + 0.75rem);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.constellation-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(208, 255, 0, 0.3);
}

.constellation-toggle svg {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.constellation-toggle:hover svg {
    color: var(--color-accent);
}

.constellation-toggle.active {
    background: rgba(208, 255, 0, 0.15);
    border-color: var(--color-accent);
}

.constellation-toggle.active svg {
    color: var(--color-accent);
}

/* ==========================================================================
   Social Actions
   ========================================================================== */

.project-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text);
}

.social-btn svg {
    flex-shrink: 0;
}

/* Like button specific styling */
.like-btn:hover {
    border-color: rgba(255, 100, 100, 0.5);
    color: #ff6464;
}

.like-btn:hover svg {
    stroke: #ff6464;
}

.like-btn.liked {
    background: rgba(255, 100, 100, 0.15);
    border-color: rgba(255, 100, 100, 0.4);
    color: #ff6464;
}

.like-btn.liked svg {
    fill: #ff6464;
    stroke: #ff6464;
}

.like-btn.animating {
    animation: likePopAnimation 0.4s var(--ease-out-back);
}

@keyframes likePopAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Comment button */
.comment-btn:hover {
    border-color: rgba(0, 255, 255, 0.5);
    color: var(--color-accent-tertiary);
}

.comment-btn:hover svg {
    stroke: var(--color-accent-tertiary);
}

/* Share button */
.share-btn:hover {
    border-color: rgba(208, 255, 0, 0.5);
    color: var(--color-accent);
}

.share-btn:hover svg {
    stroke: var(--color-accent);
}

/* ==========================================================================
   Share Modal
   ========================================================================== */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.share-modal.hidden {
    display: none !important;
}

.share-modal:not(.hidden) {
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.share-modal-content {
    position: relative;
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    min-width: 320px;
    max-width: 90vw;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.4s var(--ease-out-expo);
}

.share-modal:not(.hidden) .share-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.share-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-modal-close:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.share-modal-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.share-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.share-option svg {
    flex-shrink: 0;
}

.share-option[data-platform="twitter"]:hover {
    background: rgba(29, 161, 242, 0.15);
    border-color: #1da1f2;
}

.share-option[data-platform="facebook"]:hover {
    background: rgba(24, 119, 242, 0.15);
    border-color: #1877f2;
}

.share-option[data-platform="linkedin"]:hover {
    background: rgba(10, 102, 194, 0.15);
    border-color: #0a66c2;
}

.share-option[data-platform="copy"]:hover {
    background: rgba(208, 255, 0, 0.15);
    border-color: var(--color-accent);
}

.share-link-copied {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(208, 255, 0, 0.15);
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    color: var(--color-accent);
    font-size: 0.875rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Comments Modal
   ========================================================================== */

.comments-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.comments-modal.hidden {
    display: none !important;
}

.comments-modal:not(.hidden) {
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.comments-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.comments-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: rgba(0, 15, 20, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.2);
}

.comments-modal:not(.hidden) .comments-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.comments-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(0, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.comments-modal-close:hover {
    color: #00ffff;
    transform: scale(1.1);
}

.comments-modal-inner {
    position: relative;
    padding: 2rem;
    overflow-y: auto;
    max-height: 85vh;
}

.comments-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 255, 0.03) 0px,
        transparent 1px,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 3px
    );
    pointer-events: none;
    z-index: 0;
    animation: scanlineMove 8s linear infinite;
}

.comments-header {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.comments-signal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comments-project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.comments-list {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.comments-loading {
    text-align: center;
    color: rgba(0, 255, 255, 0.7);
    padding: 2rem;
    font-style: italic;
}

.comment-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 8px;
    animation: commentFadeIn 0.4s ease;
}

@keyframes commentFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.comment-author {
    font-weight: 600;
    color: #00ffff;
    font-size: 0.875rem;
}

.comment-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

.comment-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    line-height: 1.6;
}

.comments-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

.comments-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Comment form */
.comment-form {
    position: relative;
    z-index: 1;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.15);
}

.comment-form-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #00ffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.comment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-form-fields input,
.comment-form-fields textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.comment-form-fields input::placeholder,
.comment-form-fields textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comment-form-fields input:focus,
.comment-form-fields textarea:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.comment-form-fields textarea {
    resize: vertical;
    min-height: 80px;
}

.comment-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid #00ffff;
    border-radius: 6px;
    color: #00ffff;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    align-self: flex-start;
}

.comment-submit-btn:hover {
    background: rgba(0, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.comment-submit-btn:active {
    transform: translateY(0);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.comment-status {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    text-align: center;
}

.comment-status.success {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: #00ff88;
}

.comment-status.error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff4444;
}

.comments-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   VHS Lost Memories Modal
   ========================================================================== */

.vhs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.vhs-modal.hidden {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.vhs-modal:not(.hidden) {
    animation: vhsFadeIn 0.3s ease-out;
}

@keyframes vhsFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vhs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.vhs-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    z-index: 1;
}

.vhs-modal.inserting .vhs-modal-content {
    animation: vhsInsert 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vhs-modal.ejecting .vhs-modal-content {
    animation: vhsEject 0.4s ease-in forwards;
}

@keyframes vhsInsert {
    0% {
        transform: translateY(100vh) scale(0.4) rotate(8deg);
        opacity: 0;
        filter: blur(20px) hue-rotate(180deg);
    }
    35% {
        transform: translateY(-40px) scale(1.08) rotate(-2deg);
        opacity: 1;
        filter: blur(0) hue-rotate(0);
    }
    45% {
        transform: translateY(15px) scale(0.97) rotate(1deg);
    }
    60% {
        transform: translateY(-8px) scale(1.02) rotate(0);
    }
    75% {
        transform: translateY(4px) scale(0.99);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes vhsEject {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

.vhs-modal-close {
    position: absolute;
    top: -2rem;
    right: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: rgba(255, 100, 100, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vhs-modal-close:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.8);
    color: #ff6464;
}

/* VHS Frame */
.vhs-frame {
    position: relative;
    background: #0a0a0a;
    border: 3px solid #222;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 60px rgba(100, 200, 255, 0.1),
        inset 0 0 100px rgba(0, 0, 0, 0.5);
}

/* Scanlines */
.vhs-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    pointer-events: none;
    z-index: 100;
    animation: scanlineMove 0.1s linear infinite;
}

@keyframes scanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Static noise */
.vhs-noise {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 90;
    animation: noiseMove 0.2s steps(10) infinite;
    opacity: 0.4;
}

@keyframes noiseMove {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(5%, 10%); }
    30% { transform: translate(-10%, 5%); }
    40% { transform: translate(10%, -5%); }
    50% { transform: translate(-5%, 10%); }
    60% { transform: translate(10%, 0); }
    70% { transform: translate(-10%, 10%); }
    80% { transform: translate(0, -10%); }
    90% { transform: translate(10%, 5%); }
}

/* Tracking lines */
.vhs-tracking {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 80;
    background:
        linear-gradient(
            transparent 0%,
            transparent 45%,
            rgba(255, 255, 255, 0.03) 45%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 55%,
            transparent 55%,
            transparent 100%
        );
    animation: trackingLine 3s ease-in-out infinite;
}

@keyframes trackingLine {
    0%, 100% { transform: translateY(-100%); }
    50% { transform: translateY(200%); }
}

/* VHS Screen */
.vhs-screen {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

/* Timestamp */
.vhs-timestamp {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #ff4444;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
    z-index: 50;
    animation: timestampBlink 1s steps(1) infinite;
}

@keyframes timestampBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Memory content */
.vhs-memory-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.memory-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

.memory-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    /* Black & white with high contrast cyberpunk look */
    filter: grayscale(100%) contrast(1.4) brightness(1.1);
    animation: imageGlitch 0.1s steps(2) infinite, imageJitter 0.15s steps(2) infinite;
}

/* RGB split/chromatic aberration effect */
.memory-image-container::before,
.memory-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    pointer-events: none;
    mix-blend-mode: screen;
}

.memory-image-container::before {
    animation: rgbShiftRed 0.08s steps(1) infinite;
    filter: grayscale(100%);
    opacity: 0.4;
    background: linear-gradient(90deg, #ff0000 0%, transparent 50%);
    mix-blend-mode: multiply;
}

.memory-image-container::after {
    animation: rgbShiftCyan 0.08s steps(1) infinite;
    filter: grayscale(100%);
    opacity: 0.4;
    background: linear-gradient(90deg, transparent 50%, #00ffff 100%);
    mix-blend-mode: multiply;
}

@keyframes imageGlitch {
    0%, 90% {
        clip-path: inset(0 0 0 0);
        filter: grayscale(100%) contrast(1.4) brightness(1.1);
    }
    92% {
        clip-path: inset(10% 0 85% 0);
        transform: translate(-3px, 0);
        filter: grayscale(100%) contrast(2) brightness(1.3);
    }
    94% {
        clip-path: inset(40% 0 50% 0);
        transform: translate(3px, 0);
    }
    96% {
        clip-path: inset(70% 0 20% 0);
        transform: translate(-2px, 0);
    }
    98% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
}

@keyframes rgbShiftRed {
    0%, 90% { transform: translate(0, 0); opacity: 0; }
    92% { transform: translate(-4px, 0); opacity: 0.5; }
    94% { transform: translate(2px, 1px); opacity: 0.3; }
    96% { transform: translate(-2px, -1px); opacity: 0.4; }
    100% { transform: translate(0, 0); opacity: 0; }
}

@keyframes rgbShiftCyan {
    0%, 90% { transform: translate(0, 0); opacity: 0; }
    92% { transform: translate(4px, 0); opacity: 0.5; }
    94% { transform: translate(-2px, -1px); opacity: 0.3; }
    96% { transform: translate(2px, 1px); opacity: 0.4; }
    100% { transform: translate(0, 0); opacity: 0; }
}

@keyframes imageJitter {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
}

.memory-static-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(255, 255, 255, 0.03) 1px,
            rgba(255, 255, 255, 0.03) 2px
        );
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Additional cyberpunk glitch overlays */
.memory-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    animation: scanlineFlicker 0.05s steps(1) infinite;
}

@keyframes scanlineFlicker {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.8; }
}

.memory-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
}

/* Horizontal distortion bar effect */
.memory-tracking-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background:
        linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.8), transparent),
        linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.4), transparent);
    animation: distortionBar 1.5s steps(1) infinite;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

@keyframes distortionBar {
    0%, 70% { top: -10%; opacity: 0; }
    72% { top: 20%; opacity: 1; }
    74% { top: 25%; opacity: 0.5; }
    76% { top: 60%; opacity: 1; }
    78% { top: 65%; opacity: 0.7; }
    80% { top: 85%; opacity: 1; }
    82% { top: 110%; opacity: 0; }
    100% { top: 110%; opacity: 0; }
}

/* Metadata */
.vhs-metadata {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 50;
}

.meta-line {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #00ff88;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
    margin-bottom: 0.25rem;
    animation: metaFlicker 0.5s steps(2) infinite;
}

.meta-line.error {
    color: #ff4444;
    animation: errorBlink 0.3s steps(1) infinite;
}

.meta-line.glitch {
    color: #00ffff;
    animation: glitchText 0.2s steps(3) infinite;
}

.meta-line.dim {
    color: #666;
}

@keyframes metaFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

@keyframes errorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes glitchText {
    0% { transform: translateX(0); }
    33% { transform: translateX(-2px); }
    66% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

/* VHS UI Elements */
.vhs-ui {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 50;
}

.vhs-play-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
}

.play-icon {
    animation: playBlink 1s steps(1) infinite;
}

@keyframes playBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.vhs-sp-indicator {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #ffaa00;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
}

/* Chromatic aberration */
.vhs-chroma-r,
.vhs-chroma-b {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
}

.vhs-chroma-r {
    background: rgba(255, 0, 0, 0.03);
    transform: translateX(2px);
    mix-blend-mode: screen;
}

.vhs-chroma-b {
    background: rgba(0, 0, 255, 0.03);
    transform: translateX(-2px);
    mix-blend-mode: screen;
}

/* Glitch bars */
.vhs-glitch-bars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 70;
    opacity: 0;
}

.vhs-modal-content.heavy-glitch .vhs-glitch-bars {
    opacity: 1;
    background:
        linear-gradient(
            transparent 0%,
            transparent 10%,
            rgba(0, 255, 255, 0.1) 10%,
            rgba(0, 255, 255, 0.1) 12%,
            transparent 12%,
            transparent 30%,
            rgba(255, 0, 255, 0.1) 30%,
            rgba(255, 0, 255, 0.1) 33%,
            transparent 33%,
            transparent 60%,
            rgba(255, 255, 0, 0.1) 60%,
            rgba(255, 255, 0, 0.1) 62%,
            transparent 62%,
            transparent 100%
        );
    animation: glitchBars 0.1s steps(1) infinite;
}

@keyframes glitchBars {
    0% { transform: translateY(0); }
    50% { transform: translateY(20px); }
    100% { transform: translateY(-10px); }
}

.vhs-modal-content.heavy-glitch {
    filter: hue-rotate(40deg) saturate(2.2) contrast(1.4);
}

.vhs-modal-content.heavy-glitch .vhs-frame {
    transform: skewX(4deg) scaleY(1.02);
    box-shadow: 5px 0 0 rgba(255, 0, 255, 0.6), -5px 0 0 rgba(0, 255, 255, 0.6);
}

/* Eject hint */
.vhs-eject-hint {
    text-align: center;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 100, 100, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    animation: hintPulse 1s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==========================================================================
   Capture Modal - Screenshot/GIF Capture
   ========================================================================== */

.capture-toggle {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 36px + 36px + 36px + 36px + 0.75rem + 0.75rem + 0.75rem + 0.75rem);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
}

.capture-toggle:hover {
    background: rgba(208, 255, 0, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.1);
}

.capture-toggle.recording {
    background: rgba(255, 50, 50, 0.3);
    border-color: #ff3232;
    color: #ff3232;
    animation: recordingPulse 1s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 50, 50, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 50, 50, 0); }
}

@media (max-width: 768px) {
    .capture-toggle {
        top: 1rem;
        right: calc(1rem + 36px + 36px + 36px + 36px + 0.375rem + 0.375rem + 0.375rem + 0.375rem);
    }
}

.capture-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.capture-modal.hidden {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.capture-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.capture-modal-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.95), rgba(10, 10, 15, 0.98));
    border: 1px solid rgba(208, 255, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    z-index: 1;
    box-shadow: 0 0 40px rgba(208, 255, 0, 0.1);
    overflow: hidden;
}

.capture-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.capture-modal-close:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.5);
    color: #ff6464;
}

.capture-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.capture-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.capture-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.capture-modes {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.capture-mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.capture-mode-btn:hover {
    background: rgba(208, 255, 0, 0.1);
    border-color: rgba(208, 255, 0, 0.3);
    color: var(--color-accent);
}

.capture-mode-btn.active {
    background: rgba(208, 255, 0, 0.15);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.capture-format {
    margin-bottom: 1rem;
}

.format-label,
.quality-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-options {
    display: flex;
    gap: 0.5rem;
}

.format-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.format-btn:hover {
    background: rgba(208, 255, 0, 0.1);
    border-color: rgba(208, 255, 0, 0.3);
}

.format-btn.active {
    background: rgba(208, 255, 0, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.capture-quality {
    margin-bottom: 1.5rem;
}

.capture-quality input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.capture-quality input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
}

.capture-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(208, 255, 0, 0.2), rgba(208, 255, 0, 0.1));
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.capture-btn:hover {
    background: rgba(208, 255, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(208, 255, 0, 0.2);
}

.capture-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.capture-btn.recording {
    background: linear-gradient(135deg, rgba(255, 50, 50, 0.3), rgba(255, 50, 50, 0.2));
    border-color: #ff3232;
    color: #ff3232;
}

.capture-progress {
    margin-top: 1.5rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), #00ffff);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.capture-preview {
    margin-top: 1.5rem;
}

.preview-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.preview-container img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preview-btn {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.preview-btn.download-btn:hover {
    background: rgba(208, 255, 0, 0.15);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.preview-btn.share-twitter-btn:hover {
    background: rgba(29, 161, 242, 0.2);
    border-color: #1da1f2;
    color: #1da1f2;
}

.preview-btn.share-fb-btn:hover {
    background: rgba(24, 119, 242, 0.2);
    border-color: #1877f2;
    color: #1877f2;
}

.capture-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   Voice Control
   ========================================================================== */

.voice-toggle {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 36px + 36px + 36px + 36px + 36px + 0.75rem + 0.75rem + 0.75rem + 0.75rem + 0.75rem);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
    overflow: visible;
}

.voice-toggle:hover {
    background: rgba(208, 255, 0, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.1);
}

.voice-toggle.active {
    background: rgba(208, 255, 0, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.voice-toggle.listening {
    background: rgba(255, 100, 100, 0.2);
    border-color: #ff6464;
    color: #ff6464;
}

.voice-icon {
    transition: opacity 0.2s ease;
}

.voice-icon.voice-on {
    display: none;
}

.voice-toggle.listening .voice-off {
    display: none;
}

.voice-toggle.listening .voice-on {
    display: block;
}

.voice-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}

.voice-toggle.listening .voice-pulse {
    animation: voicePulse 1.5s ease-out infinite;
    background: rgba(255, 100, 100, 0.3);
}

@keyframes voicePulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Voice Feedback Overlay */
.voice-feedback {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(10, 10, 11, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 280px;
}

.voice-feedback:not(.hidden) {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.voice-feedback-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.voice-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 16px;
}

.voice-waveform span {
    width: 2px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 1px;
    animation: waveform 0.6s ease-in-out infinite;
}

.voice-waveform span:nth-child(1) { animation-delay: 0s; }
.voice-waveform span:nth-child(2) { animation-delay: 0.08s; }
.voice-waveform span:nth-child(3) { animation-delay: 0.16s; }
.voice-waveform span:nth-child(4) { animation-delay: 0.24s; }
.voice-waveform span:nth-child(5) { animation-delay: 0.32s; }

@keyframes waveform {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 14px;
    }
}

.voice-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.voice-transcript {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #fff;
    min-height: 1.2em;
    max-width: 350px;
    word-wrap: break-word;
    text-align: center;
}

.voice-transcript:empty {
    display: none;
}

.voice-commands-hint {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.25rem;
    text-align: center;
}

/* Voice feedback states */
.voice-feedback.processing .voice-status {
    color: #00ffff;
}

.voice-feedback.success .voice-status {
    color: var(--color-accent);
}

.voice-feedback.error .voice-status {
    color: #ff6464;
}

.voice-feedback.success {
    border-color: var(--color-accent);
}

.voice-feedback.error {
    border-color: #ff6464;
}

/* Command recognized flash */
.voice-feedback.command-recognized {
    animation: commandFlash 0.3s ease-out;
}

@keyframes commandFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(208, 255, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(208, 255, 0, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(208, 255, 0, 0);
    }
}

/* Unsupported browser message */
.voice-toggle.unsupported {
    opacity: 0.3;
    cursor: not-allowed;
}

.voice-toggle.unsupported:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .voice-toggle {
        top: 1rem;
        right: calc(1rem + 36px + 36px + 36px + 36px + 36px + 0.375rem + 0.375rem + 0.375rem + 0.375rem + 0.375rem);
    }

    .voice-feedback {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(20px);
        min-width: auto;
    }

    .voice-feedback:not(.hidden) {
        transform: translateX(0) translateY(0);
    }

    .voice-commands-hint {
        font-size: 0.6rem;
    }
}

/* ==========================================================================
   Gravity Shift
   ========================================================================== */

.gravity-toggle {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 36px + 36px + 36px + 36px + 36px + 36px + 0.75rem + 0.75rem + 0.75rem + 0.75rem + 0.75rem + 0.75rem);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
}

.gravity-toggle:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: #9370db;
    color: #9370db;
    transform: scale(1.1);
}

.gravity-toggle.active {
    background: rgba(147, 112, 219, 0.3);
    border-color: #9370db;
    color: #9370db;
    animation: gravityPulse 0.5s ease-out infinite;
}

.gravity-toggle.active svg {
    animation: gravitySpin 2s linear infinite;
}

@keyframes gravitySpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gravityPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Gravity Feedback Overlay - Bottom Right */
.gravity-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    transform: translateX(20px);
    background: rgba(10, 10, 11, 0.7);
    border: 1px solid rgba(147, 112, 219, 0.4);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none !important;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    visibility: hidden;
}

.gravity-feedback.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.gravity-feedback-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.gravity-icon {
    color: #9370db;
    animation: gravityIconSpin 2s linear infinite;
    display: flex;
    align-items: center;
}

.gravity-icon svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 6px rgba(147, 112, 219, 0.6));
}

@keyframes gravityIconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gravity-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #9370db;
    text-shadow: 0 0 8px rgba(147, 112, 219, 0.6);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .gravity-toggle {
        top: 1rem;
        right: calc(1rem + 36px + 36px + 36px + 36px + 36px + 36px + 0.375rem + 0.375rem + 0.375rem + 0.375rem + 0.375rem + 0.375rem);
    }

    .gravity-feedback {
        bottom: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
    }

    .gravity-icon svg {
        width: 16px;
        height: 16px;
    }

    .gravity-status {
        font-size: 0.6rem;
    }
}

/* ==========================================================================
   Lightning Storm
   ========================================================================== */

.lightning-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(208, 255, 0, 0.4) 0%, rgba(208, 255, 0, 0) 70%);
    pointer-events: none !important;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.05s ease-out;
    visibility: hidden;
}

.lightning-flash.active {
    opacity: 1;
    visibility: visible;
    animation: lightningFlash 0.1s ease-out;
}

@keyframes lightningFlash {
    0% {
        opacity: 1;
        background: radial-gradient(ellipse at center, rgba(220, 255, 100, 0.6) 0%, rgba(208, 255, 0, 0.2) 50%, rgba(208, 255, 0, 0) 80%);
    }
    50% {
        opacity: 0.8;
        background: radial-gradient(ellipse at center, rgba(208, 255, 0, 0.3) 0%, rgba(208, 255, 0, 0) 60%);
    }
    100% {
        opacity: 0;
    }
}

/* ==========================================================================
   Constellation Lines (in 3D scene - controlled by JS)
   ========================================================================== */

/* Responsive adjustments for new features */
@media (max-width: 768px) {
    .constellation-toggle {
        top: 1rem;
        right: calc(1rem + 36px + 36px + 36px + 0.375rem + 0.375rem + 0.375rem);
    }

    .project-social {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .social-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .share-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .share-options {
        grid-template-columns: 1fr;
    }

    .comments-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .comments-modal-inner {
        padding: 1.5rem;
    }
}


/* ==========================================================================
   Modal flash fix - hide WebGL canvas while case study modal is open
   ========================================================================== */
body:has(.case-study-modal.active) #canvas-container {
    visibility: hidden;
}

/* Belt and braces - solid background on hero-image-container so empty img
   src can never reveal anything behind */
.hero-image-container {
    background: rgb(5, 5, 8);
}
