/* AERYS/style.css */

/* --- 1. RESET & VARIABLES --- */
:root {
    --bg-color: #080808;
    --text-color: #EAEAEA;
    /* DEFAULT THEME (CRIMSON) */
    --accent-color: #FF3333;

    /* THEME OPTIONS (For Reference/JS)
       COBALT: #00F0FF
       VOID: #9D00FF
       BIO: #39FF14
    */

    /* FONTS */
    --font-display: 'Oswald', sans-serif;
    --font-body: 'Lato', sans-serif;

    --cursor-size: 20px;

    /* Z-INDEX LAYERS */
    --z-grid: 0;
    --z-marquee: 10;
    --z-canvas: 15;
    --z-services-preview: 1;
    /* Relative to stacking context */
    --z-content: 20;
    --z-footer: 30;
    --z-hero: 40;
    --z-header: 50;
    --z-nav: 70;
    --z-menu: 80;
    --z-vial: 900;

    /* High z-index for interaction */
    --z-overlay: 9998;
    --z-preloader: 9999;
    --z-cursor: 10000;
}

/* --- THEME VIAL UI --- */
#theme-vial {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: var(--z-vial);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    #theme-vial {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

#theme-vial:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

#theme-vial:active {
    transform: scale(0.9);
}

.vial-inner {
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-radius: 0 0 10px 10px;
    /* Flask shape */
    border-top: none;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.vial-inner::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border: 2px solid white;
    border-bottom: none;
}

.vial-liquid {
    width: 100%;
    height: 60%;
    background-color: var(--accent-color);
    border-radius: 0 0 6px 6px;
    transition: background-color 0.5s ease, height 0.3s ease;
}

#theme-vial:hover .vial-liquid {
    animation: liquid-slosh 0.5s infinite alternate ease-in-out;
}

@keyframes liquid-slosh {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-2px) rotate(5deg);
    }
}

/* --- POTION SCROLL INDICATOR --- */
#scroll-potion {
    position: fixed;
    top: 50%;
    right: 3rem;
    height: 30vh;
    width: 6px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    z-index: var(--z-nav);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    #scroll-potion {
        display: none;
    }
}

.potion-bar {
    width: 100%;
    height: 0%;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    position: absolute;
    top: 0;
    left: 0;
    transition: height 0.1s linear, background-color 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

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

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* --- WEBGL CANVAS --- */
#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-canvas);
    pointer-events: none;
}

.parallax-img {
    opacity: 1 !important;
    /* Forces image to show even if WebGL fails */
    visibility: visible !important;
}

/* --- 3. CUSTOM CURSOR --- */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    .cursor-outer {
        position: fixed;
        top: 0;
        left: 0;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        pointer-events: none;
        z-index: var(--z-cursor);
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, background-color 0.3s;
        mix-blend-mode: difference;
    }

    .cursor-inner {
        position: fixed;
        top: 0;
        left: 0;
        width: 6px;
        height: 6px;
        background-color: white;
        border-radius: 50%;
        pointer-events: none;
        z-index: var(--z-cursor);
        transform: translate(-50%, -50%);
        mix-blend-mode: difference;
    }
}

@media (pointer: coarse) {

    .cursor-outer,
    .cursor-inner {
        display: none;
    }
}

/* --- 4. PRELOADER --- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: var(--z-preloader);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

.preloader-top,
.preloader-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.preloader-center {
    align-self: center;
    font-family: var(--font-display);
    font-size: 15vw;
    font-weight: bold;
    line-height: 1;
    mix-blend-mode: difference;
    color: white;
}

.curtain {
    position: absolute;
    inset: 0;
    background-color: white;
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
}

/* --- 5. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 70;
    mix-blend-mode: difference;
    color: white;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    z-index: 72;
}

.nav-links {
    display: none;
    gap: 2.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.menu-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    position: relative;
    overflow: hidden;
    z-index: 71;
    flex-shrink: 0;
}

.menu-btn-dot {
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    transition: transform 0.5s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.menu-btn:hover .menu-btn-dot {
    transform: translate(-50%, -50%) scale(12);
}

.hamburger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
    z-index: 2;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 1px;
    background: white;
    transition: background-color 0.3s;
}

.menu-btn:hover .hamburger span {
    background: black;
}

/* --- MOBILE MENU (Refined & Scattered) --- */
#mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.85);
    /* Deep dark tint */
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    z-index: var(--z-menu);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transform: translateY(-100%);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#mobile-menu.active {
    transform: translateY(0);
}

/* Header (Logo + Close) */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
    color: white;
}

.menu-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.menu-close {
    font-size: 2.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    transition: color 0.3s;
}

.menu-close:hover {
    color: white;
}

/* Menu Items Container */
.menu-items {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Links (Scattered Layout) */
.mobile-link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    /* Cinematic Size */
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    text-transform: none;
    /* Keep natural case like reference */
    text-decoration: none;
    opacity: 0;
    /* Hidden initially for stagger */
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    cursor: pointer;
}

#mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

/* Alignment Logic */
.nav-left {
    align-self: flex-start;
    text-align: left;
}

.nav-center {
    align-self: center;
    text-align: center;
}

.nav-right {
    align-self: flex-end;
    text-align: right;
}

/* Interactive Hover */
.mobile-link:hover {
    color: white;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transform: scale(1.02) translateX(10px);
    /* Subtle push */
}

.nav-right.mobile-link:hover {
    transform: scale(1.02) translateX(-10px);
    /* Push inward */
}

/* Footer */
.menu-footer {
    opacity: 0.3;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    margin-top: 2rem;
}

/* --- 6. HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 1.5rem 2rem 1.5rem;
    z-index: 40;
    overflow: hidden;
    /* Ensure blobs don't spill out */
}

/* --- HERO PLASMA BACKGROUND --- */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    /* Or overlay/add */
    opacity: 0.8;
    will-change: transform;
}

.blob-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-color), transparent 70%);
    top: -20%;
    left: -20%;
    animation: pulse-glow 8s infinite alternate;
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #00F0FF, transparent 70%);
    /* Cyan */
    bottom: -10%;
    right: -10%;
    animation: pulse-glow 10s infinite alternate-reverse;
}

.blob-3 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #9D00FF, transparent 70%);
    /* Purple */
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 12s infinite alternate;
}

@media (max-width: 768px) {
    .blob-1 {
        width: 100vw;
        height: 100vw;
        top: -10%;
        left: -10%;
    }

    .blob-2 {
        width: 90vw;
        height: 90vw;
        bottom: 10%;
        right: -10%;
    }

    .blob-3 {
        width: 80vw;
        height: 80vw;
    }
}

@keyframes pulse-glow {
    0% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    100% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

.hero-text {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 12vw, 12rem);
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.02em;
    user-select: none;
    -webkit-user-select: none;
}

.hero-line-middle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 50;
    padding: 0.5rem 0;
}

.hero-icon {
    width: clamp(2.5rem, 8vw, 6rem);
    height: clamp(2.5rem, 8vw, 6rem);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: spin 10s linear infinite;
    font-size: clamp(1rem, 3vw, 2rem);
}

.stroke-text {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    color: transparent;
}

.text-right {
    text-align: right;
    margin-right: 2vw;
    /* Safety Margin */
}

.hero-desc {
    margin-top: 3rem;
    max-width: 100%;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* --- 7. MARQUEE STRIP --- */
.marquee-container {
    position: relative;
    z-index: 10;
    background-color: var(--accent-color);
    color: black;
    padding: 1rem 0;
    overflow: hidden;
    transform: rotate(-2deg) scale(1.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
    user-select: none;
    -webkit-user-select: none;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    gap: 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
}

/* --- SERVICES SECTION (The Alchemy) --- */
#services {
    position: relative;
    background-color: var(--bg-color);
    color: white;
    padding: 4rem 1.5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
}

.services-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    /* Above preview */
}

.services-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    margin-bottom: 4rem;
}

.service-list {
    display: flex;
    flex-direction: column;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: padding 0.3s ease;
}

.service-item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-item:hover {
    padding: 2rem 1rem;
    /* Indent effect */
    background-color: rgba(255, 255, 255, 0.02);
}

.service-num {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-right: 2rem;
    opacity: 0.7;
}

.service-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.service-item:hover .service-name {
    color: white;
    font-style: italic;
    /* Editorial flair */
}

.service-arrow {
    font-size: 2rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.service-item:hover .service-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Service Preview (Floating Image) */
.service-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    /* Behind content */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: exclusion;
    /* Alchemy vibe */
}

#preview-img-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    /* Hidden natively, shown via Canvas */
}

.service-item:hover~.service-preview,
#services:hover .service-preview {
    opacity: 0.4;
    /* Subtle fade in */
}

/* --- STUDIO SECTION --- */
#studio {
    position: relative;
    background-color: var(--bg-color);
    color: white;
    padding: 4rem 1.5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
}

.studio-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: block;
}

.studio-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 10vw, 8rem);
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 5rem;
}

.highlight-text {
    -webkit-text-stroke: 1px white;
    color: transparent;
    opacity: 0.7;
}

.studio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 6rem;
}

.studio-card {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.card-icon {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    display: block;
}

.studio-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.studio-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
}

.studio-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .studio-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

/* --- THE LAB (PLAYGROUND) --- */
#lab {
    position: relative;
    background-color: var(--bg-color);
    color: white;
    padding: 4rem 1.5rem;
    z-index: 25;
}

.lab-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.lab-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 6rem);
    text-transform: uppercase;
    margin-bottom: 4rem;
    line-height: 0.9;
}

.lab-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .lab-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

.lab-card {
    position: relative;
    aspect-ratio: 1;
    /* Square cards */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: crosshair;
}

.lab-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

/* 1. Scramble Text */
.scramble-text {
    font-family: 'Courier New', Courier, monospace;
    /* Tech feel */
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-color);
}

.lab-instruction {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.5;
    margin-top: 1rem;
    letter-spacing: 0.2em;
}

/* 2. Tilt Card */
.tilt-card {
    perspective: 1000px;
}

.tilt-content {
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* Smooth follow */
}

.tilt-content h3 {
    transform: translateZ(40px);
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 2rem;
    line-height: 1;
}

.glass-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.tilt-card:hover .glass-layer {
    opacity: 1;
}

/* 3. Spotlight */
.spotlight-card {
    background-color: black;
}

.spotlight-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 100px at var(--x, 50%) var(--y, 50%), transparent 0%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 2;
    pointer-events: none;
}

.spotlight-content {
    background-image: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop');
    /* Cyberpunk texture */
    background-size: cover;
    background-position: center;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
}

.spotlight-content h3 {
    font-family: var(--font-display);
    font-size: 3rem;
    text-transform: uppercase;
    z-index: 1;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 4. Magnetic Field */
.magnetic-field-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2rem;
}

.magnetic-area {
    position: absolute;
    inset: 4rem;
    /* Padding from edges */
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magnetic-dot {
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-color);
    transition: transform 0.1s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-field-card h3 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1.5rem;
    margin-top: auto;
    z-index: 5;
}

/* --- 8. WORK SECTION --- */
#work {
    position: relative;
    background-color: var(--text-color);
    color: var(--bg-color);
    z-index: 20;
    overflow: visible;
    /* Needed for sticky mobile */
}

.work-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* MOBILE DEFAULT STYLES (Stacking Cards) */
.work-panel {
    width: 100%;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    /* Stacking behavior */
    top: 0;
    background-color: var(--text-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    padding: 4rem 1.5rem;
    transform-origin: center top;
}

.panel-intro {
    min-height: 60vh;
}

.panel-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 14vw, 8rem);
    line-height: 1;
    text-transform: uppercase;
}

.panel-intro p {
    margin-top: 1.5rem;
    opacity: 0.7;
    max-width: 500px;
    font-size: 1rem;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.project-details {
    margin-top: 1rem;
}

/* New Button Mobile Default */
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    margin-top: 1.5rem;
}

.btn-arrow {
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.btn-link:hover .btn-arrow {
    transform: rotate(45deg);
}

/* MOBILE IMAGE STYLE: Editorial Portrait Card */
.project-image-wrapper {
    order: 1;
    width: 100%;
    aspect-ratio: 4 / 5;
    /* Premium portrait ratio */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    background-color: #1a1a1a;
    transform: translateZ(0);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
}

.panel-project:nth-child(3) {
    background-color: #f0f0f0;
}

.panel-project:nth-child(4) {
    background-color: #ebebeb;
}

/* --- 9. FOOTER --- */
footer {
    background-color: var(--bg-color);
    color: white;
    padding: 4rem 1.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 30;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-socials {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* SAY HELLO BUTTON */
.say-hello-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: white;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.say-hello-btn:hover {
    background: white;
    color: black;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: white;
}

/* WAVING ANIMATION */
.wave-emoji {
    display: inline-block;
    font-size: 1.2rem;
    transform-origin: 70% 70%;
}

.say-hello-btn:hover .wave-emoji {
    animation: wave 0.8s ease-in-out infinite;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-8deg);
    }

    60% {
        transform: rotate(14deg);
    }

    80% {
        transform: rotate(-4deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* EMAIL TRIGGER HOVER */
.email-trigger {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.email-trigger:hover .big-contact {
    color: #FFFFFF;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.big-contact {
    font-family: var(--font-display);
    font-size: 14vw;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.indent {
    margin-left: 20%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.3;
    margin-top: 2rem;
}

/* --- 10. DESKTOP MEDIA QUERY ( > 768px ) --- */
@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }

    .hamburger {
        display: none;
    }

    .hero {
        padding: 0 5rem;
    }

    .hero-desc {
        position: absolute;
        bottom: 2.5rem;
        left: 5rem;
        margin-top: 0;
        max-width: 400px;
    }

    .marquee-track {
        font-size: 2.5rem;
        gap: 4rem;
    }

    /* --- HORIZONTAL SCROLL RESET --- */
    #work {
        overflow: hidden;
        /* Ensure stickiness works ideally */
        height: 100vh;
    }

    .work-container {
        display: flex;
        flex-direction: row;
        width: 400vw;
        /* 4 Panels * 100vw */
        height: 100%;
        will-change: transform;
    }

    .work-panel {
        width: 100vw;
        height: 100vh;
        min-height: 0;
        /* Reset mobile constraint */
        flex-shrink: 0;
        padding: 0;
        border-bottom: none;
        border-right: 1px solid rgba(0, 0, 0, 0.1);

        /* Reset Sticky */
        position: relative;
        background-color: transparent;
        box-shadow: none;
    }

    /* --- CINEMATIC CARD MODE (Desktop) --- */
    .project-grid {
        display: flex;
        /* Connect flex centering */
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        padding: 0;
        position: relative;
    }

    /* Constrained Card Wrapper */
    .project-image-wrapper {
        position: relative;
        width: 65vw;
        height: 75vh;
        inset: auto;
        z-index: 1;
        background-color: #050505;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
        overflow: hidden;
        border-radius: 4px;
    }

    /* Dark Overlay Gradient */
    .project-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.3) 0%,
                rgba(0, 0, 0, 0.8) 100%);
        z-index: 2;
    }

    /* Content Centered on Card */
    .project-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        width: 100%;
        z-index: 10;
        color: white;
        pointer-events: none;
        text-align: center;
        mix-blend-mode: normal;
    }

    .project-number {
        font-family: var(--font-display);
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 2rem;
        display: block;
        letter-spacing: 0.2em;
    }

    /* Typography */
    .project-title {
        font-size: 8vw;
        /* Slightly smaller to fit card */
        line-height: 0.9;
        margin-bottom: 3rem;
        position: relative;
        color: white;
        /* Solid white */
        -webkit-text-stroke: 0;
        /* Remove stroke */
        text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        cursor: pointer;
        pointer-events: auto;
        display: block;
        /* Ensure it's not grid from mobile */
        width: auto;
        max-width: none;
    }

    .project-title::before {
        display: none;
        /* Disable the fill effect for clarity */
    }

    .project-details {
        display: flex;
        flex-direction: column;
        /* Stack vertically involved */
        align-items: center;
        gap: 1.5rem;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s ease 0.2s;
        pointer-events: auto;
        margin-top: 0;
        /* Reset */
    }

    .project-grid:hover .project-details {
        opacity: 1;
        transform: translateY(0);
    }

    /* Hover effect on card */
    .project-image-wrapper {
        transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .project-grid:hover .project-image-wrapper {
        transform: scale(1.02);
    }

    /* White Button Style for Dark Background */
    .btn-outline {
        border: 1px solid rgba(255, 255, 255, 0.4);
        color: white;
        background: transparent;
        padding: 1rem 3rem;
        border-radius: 100px;
        font-family: var(--font-body);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    }

    .btn-outline:hover {
        background: white;
        color: black;
        border-color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    }

    /* Footer & Intro */
    .panel-intro {
        padding: 0 5rem;
    }

    footer {
        height: 100vh;
        padding: 5rem;
    }

    .footer-top {
        flex-direction: row;
        justify-content: space-between;
    }

    .footer-socials {
        flex-direction: column;
        text-align: right;
    }
}

/* --- MOBILE SPECIFIC --- */
@media (max-width: 768px) {
    .menu-btn-dot {
        display: none;
    }

    /* Standard button on mobile */
    .btn-outline {
        border: 1px solid rgba(0, 0, 0, 0.2);
        padding: 0.8rem 2rem;
        border-radius: 100px;
        text-transform: uppercase;
        font-size: 0.8rem;
    }
}