:root {
    --bg-color: #151515;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --accent-green: #7d9e84; /* A muted green for dark mode */
    --font-display: "Anton", sans-serif;
    --font-ui: "Inter", sans-serif;
    --hud-bg: rgba(26, 28, 36, 0.95);
    --grid-line: rgba(255, 255, 255, 0.1);
    --pattern-color: rgba(255, 255, 255, 0.02);
    --coffee-accent: #d4a373; /* Warm coffee brown */

    /* Card Colors */
    --card-light-bg: #e5e5e5;
    --card-light-text: #151515;
    --card-green-bg: var(--accent-green);
    --card-green-text: #151515;

    /* Contact Section Colors (Footer) */
    --contact-bg: var(--text-main); /* White in dark mode */
    --contact-text: var(--bg-color); /* Black in dark mode */
    --contact-grid-line: rgba(0, 0, 0, 0.05);
    --contact-info-label: rgba(0, 0, 0, 0.5);
    --contact-social-link-hover: var(--accent-green);
    --contact-massive-email-bg: var(--bg-color);

    /* Engineering Section Colors (Bento) */
    --bento-card-bg: rgba(15, 15, 15, 0.4);
    --bento-card-border: rgba(255, 255, 255, 0.05);
    --bento-graph-sq-bg: rgba(255, 255, 255, 0.05);
    --bento-stat-divider: rgba(255, 255, 255, 0.1);
    --bento-marquee-text-muted: var(--text-muted);
    --bento-marquee-text-hover: var(--text-main);

    /* Work Overlay Colors */
    --wo-meta-color: #a3a3a3;
    --wo-massive-title-color: #ffffff;
    --wo-list-item-hover-bg: #ffffff;
    --wo-list-item-hover-text: #151515;
    --wo-massive-name-color: #ffffff;

    /* About Overlay Colors */
    --ao-meta-color: #aaa;
    --ao-massive-title-color: #fff;
    --ao-paragraph-color: #ccc;
    --ao-list-item-color: #fff;
    --ao-v-item-p-color: #888;
    --ao-massive-name-stroke: rgba(255, 255, 255, 0.08);
    --ao-text-outline-stroke: rgba(255, 255, 255, 0.2);

    /* Process Overlay Colors */
    --process-overlay-bg: #050505;
    --process-item-hover-color: var(--accent-green);
    --process-item-hover-border: var(--accent-green);
    --process-indicator-color: #ff3366;
    --process-num-color: #666;
    --process-desc-color: #888;

    /* Game Development Section Colors */
    --game-card-bg: rgba(15, 15, 15, 0.4);
    --game-card-border: rgba(255, 255, 255, 0.05);
    --game-card-label: var(--text-muted);
    --game-card-title: var(--text-main);
    --game-card-desc: var(--text-muted);
    --game-card-tech-tag-bg: rgba(255, 255, 255, 0.1);
    --game-card-tech-tag-text: var(--text-main);
}

[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-main: #151515;
    --text-muted: #666666;
    --accent-green: #4a6350; /* Slightly darker green for better legibility on light */
    --grid-line: rgba(0, 0, 0, 0.08);
    --hud-bg: rgba(255, 255, 255, 0.95);
    --cal-accent: #5c6bc0; /* Deeper blue for light */
    --pattern-color: rgba(0, 0, 0, 0.03); /* Darker pattern for light mode */

    /* Card Colors */
    --card-light-bg: #ffffff;
    --card-light-text: #151515;
    --card-green-bg: #6b8e76; /* A lighter green for light mode */
    --card-green-text: #ffffff; /* White text on lighter green */

    /* Contact Section Colors (Footer) */
    --contact-bg: var(--bg-color); /* Light background */
    --contact-text: var(--text-main); /* Dark text */
    --contact-grid-line: rgba(0, 0, 0, 0.05);
    --contact-info-label: rgba(0, 0, 0, 0.5);
    --contact-social-link-hover: var(--accent-green);
    --contact-massive-email-bg: var(--text-main); /* White pill background */

    /* Engineering Section Colors (Bento) */
    --bento-card-bg: rgba(255, 255, 255, 0.4);
    --bento-card-border: rgba(0, 0, 0, 0.05);
    --bento-graph-sq-bg: rgba(0, 0, 0, 0.05);
    --bento-stat-divider: rgba(0, 0, 0, 0.1);
    --bento-marquee-text-muted: var(--text-muted);
    --bento-marquee-text-hover: var(--text-main);

    /* Work Overlay Colors */
    --wo-meta-color: #666666;
    --wo-massive-title-color: #151515;
    --wo-list-item-hover-bg: #151515;
    --wo-list-item-hover-text: #ffffff;
    --wo-massive-name-color: #151515;

    /* About Overlay Colors */
    --ao-meta-color: #666;
    --ao-massive-title-color: #151515;
    --ao-paragraph-color: #666;
    --ao-list-item-color: #151515;
    --ao-v-item-p-color: #666;
    --ao-massive-name-stroke: rgba(0, 0, 0, 0.08);
    --ao-text-outline-stroke: rgba(0, 0, 0, 0.2);

    /* Process Overlay Colors */
    --process-overlay-bg: #f0f0f0;
    --process-item-hover-color: var(--accent-green);
    --process-item-hover-border: var(--accent-green);
    --process-indicator-color: #ff3366;
    --process-num-color: #666;
    --process-desc-color: #888;

    /* Game Development Section Colors */
    --game-card-bg: rgba(255, 255, 255, 0.4);
    --game-card-border: rgba(0, 0, 0, 0.05);
    --game-card-label: var(--text-muted);
    --game-card-title: var(--text-main);
    --game-card-desc: var(--text-muted);
    --game-card-tech-tag-bg: rgba(0, 0, 0, 0.1);
    --game-card-tech-tag-text: var(--text-main);
}

[data-mono="true"] { filter: grayscale(100%) contrast(1.1); }

[data-theme="light"] #fluid-canvas {
    mix-blend-mode: multiply;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-ui);

    transition: background-color 0.5s ease, color 0.5s ease;
    /* Allow scroll for the full portfolio content */
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Topographic / Wavy Background Overlay */
.bg-overlay {
    position: fixed;
    /* CHANGE from absolute to fixed so the pattern stays while scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* change height to 100vh */
    background-image:
        repeating-radial-gradient(circle at 50% 50%, transparent 0, var(--bg-color) 4px, transparent 5px, transparent 10px), /* This creates the subtle topographic effect */
        repeating-linear-gradient(45deg, transparent, transparent 10px, var(--pattern-color) 10px, var(--pattern-color) 20px);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

/* Add height to main so the hero stays full screen */
main.container {
    height: 120vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    /* This keeps the Hero contained */
}

/* Main Layout Container */
.container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* allows clicks through */
}

#fluid-canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none; /* Let clicks pass through */
    position: fixed;
    z-index: 0;
}

.menu-overlay {
    z-index: 10;
}

/* ========================================= */
/* SIDEBAR NAVIGATION PANEL                  */
/* ========================================= */
.sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 100vh;
    border-right: 1px solid var(--grid-line);
    z-index: 1000; /* Higher than canvas, lower than overlays */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 15vh 0 5vh 0;
    pointer-events: none;
    background-color: transparent;
    transition: border-color 0.5s ease;
}

.side-progress-container {
    width: 1px;
    height: 30vh;
    background-color: var(--grid-line);
    position: relative;
    overflow: hidden;
}

.side-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-green);
    transform: scaleY(0);
    transform-origin: top;
}

.side-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.side-index {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent-green);
}

.side-label {
    writing-mode: vertical-rl;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 500;
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .sidebar-panel { display: none; }
}

/* ========================================= */
/* SYSTEM TELEMETRY HUD                      */
/* ========================================= */
.system-hud {
    position: fixed;
    bottom: 25px;
    left: 100px; /* Aligned next to the sidebar area */
    z-index: 300; /* Increased to stay above all content */
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 10px 20px;
    align-items: flex-start;
    background: var(--hud-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--grid-line);
    pointer-events: auto;
    font-family: var(--font-ui);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: fit-content;
    height: 70px; 
    overflow: hidden;
}

.hud-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 54px;
    gap: 2px;
}

.hud-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    font-weight: 500;
}

.hud-value {
    font-size: 0.75rem;
    color: var(--text-main);
    font-family: monospace;
}

.hud-status {
    display: flex;
    align-items: center;
    height: 54px;
    gap: 10px;
    border-left: 1px solid var(--grid-line);
    padding-left: 20px;
    margin-left: 4px;
}

.hud-controls-group {
    display: flex;
    height: 54px;
    gap: 10px;
    align-items: center;
}

.hud-expand-btn {
    background: var(--ao-list-item-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
    transition: transform 0.4s ease;
}

.hud-expand-btn i {
    width: 18px;
    height: 18px;
}

.hud-expand-btn:hover {
    color: var(--accent-green);
    transform: scale(1.1);
}

.hud-calendar-panel {
    display: none; /* Controlled via autoAlpha in GSAP */
    opacity: 0;
    width: 100%;
    height: 100%;
}

/* Identity / Biography Panel Styles */
.hud-bio-panel {
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

/* Auth Panel Styles */
.hud-auth-panel {
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.hud-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--grid-line);
    padding: 12px 15px;
    color: var(--text-main);
    font-family: monospace;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.hud-input:focus {
    border-color: var(--accent-green);
}

.auth-actions-group button {
    flex: 1;
}

.auth-user-card {
    padding: 20px;
    background: rgba(125, 158, 132, 0.05);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
}

/* Coffee / Focus Panel Styles */
.hud-coffee-panel {
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.coffee-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-top: 30px;
    align-items: center;
}

.coffee-cup-anim {
    width: 80px;
    height: 60px;
    border: 3px solid var(--coffee-accent);
    border-radius: 0 0 40px 40px;
    position: relative;
    margin: 40px auto;
}

.coffee-cup-anim::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 10px;
    width: 20px;
    height: 25px;
    border: 3px solid var(--coffee-accent);
    border-left: none;
    border-radius: 0 15px 15px 0;
}

.steam-wrap {
    position: absolute;
    top: -35px;
    left: 20px;
    display: flex;
    gap: 12px;
}

.steam-line {
    width: 2px;
    height: 20px;
    background: var(--coffee-accent);
    animation: steam 2s infinite ease-in-out;
    opacity: 0;
}

.steam-line:nth-child(2) { animation-delay: 0.4s; }
.steam-line:nth-child(3) { animation-delay: 0.8s; }

@keyframes steam {
    0% { transform: translateY(0) scaleY(1); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-30px) scaleY(1.5); opacity: 0; }
}

.bio-text-container {
    flex: 1;
    margin-top: 20px;
    overflow-y: auto;
}

.bio-text {
    white-space: pre-wrap; /* Crucial for preserving spaces during typewriter effect */
    line-height: 1.6;
}

.hud-diagnostics-panel {
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
}

.diag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--grid-line);
}

.diag-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
}

.module-tree {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tree-item {
    font-family: monospace;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}
.tree-branch { width: 15px; height: 1px; background: var(--grid-line); }

.status-tag {
    font-size: 0.55rem;
    padding: 2px 6px;
    background: var(--grid-line);
    color: var(--accent-green);
    border-radius: 2px;
}

/* ========================================= */
/* LOADER OVERLAY STYLES                     */
/* ========================================= */
.loader-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--bg-color);
    z-index: 10000; /* Above everything including HUD */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: background-color 0.5s ease;
}

.loader-content {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.loader-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.loader-label {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-green);
}

.loader-version {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.loader-bar-bg {
    width: 100%;
    height: 2px;
    background: var(--grid-line);
    position: relative;
    overflow: hidden;
}

.loader-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-green);
}

.loader-status-container {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-family: monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* --- Professional Loader Additions --- */
.loader-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
    z-index: -1;
}

.loader-readout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
    gap: 10px;
    font-family: monospace;
    font-size: 0.55rem;
    color: var(--accent-green);
    opacity: 0.6;
    text-transform: uppercase;
}

.shutter {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50.5%;
    background: var(--bg-color);
    z-index: 10;
    pointer-events: none;
    transform: scaleY(0); /* Controlled by GSAP */
}

.shutter-top { top: 0; transform-origin: top; border-bottom: 1px solid var(--accent-green); }
.shutter-bottom { bottom: 0; transform-origin: bottom; border-top: 1px solid var(--accent-green); }

.system-hud.is-expanded { height: 560px; width: 720px; padding: 30px; }
.system-hud.is-settings { height: 480px; width: 400px; padding: 30px; }
.system-hud.is-calendar { height: 700px; width: 380px; padding: 30px; }
.system-hud.is-diagnostics { height: 520px; width: 580px; padding: 30px; }
.system-hud.is-biography { height: 540px; width: 520px; padding: 30px; }
.system-hud.is-auth { height: 600px; width: 440px; padding: 30px; }
.system-hud.is-coffee { height: 600px; width: 480px; padding: 30px; }

.hud-expanded-content, 
.hud-settings-panel, 
.hud-calendar-panel, 
.hud-diagnostics-panel, 
.hud-bio-panel, 
.hud-auth-panel, 
.hud-coffee-panel {
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.system-hud.is-expanded #hud-expanded-content,
.system-hud.is-settings #hud-settings-content,
.system-hud.is-calendar #hud-calendar-content,
.system-hud.is-diagnostics #hud-diagnostics-content,
.system-hud.is-biography #hud-bio-content,
.system-hud.is-auth #hud-auth-content,
.system-hud.is-coffee #hud-coffee-content {
    display: flex;
    opacity: 1;
}

.sparkline-container {
    margin: 15px 0;
    height: 80px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--grid-line);
}

.diag-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.cal-selection-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
}

.cal-mini-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
    text-transform: none;
}

.cal-main-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    font-size: 2.2rem; /* Slightly larger for impact */
    color: var(--text-main);
}

.cal-edit-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.calendar-mini {
    background: transparent;
    flex: 1;
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
}

#cal-month-year {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.cal-nav-arrows {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: transparent;
    border: none;
    text-align: center;
}

.cal-day { 
    font-size: 0.7rem; 
    font-weight: 700; 
    color: var(--text-muted); 
    background: transparent;
    padding: 10px 0;
    text-transform: uppercase;
}

.cal-date { 
    font-size: 0.85rem; 
    font-family: monospace; 
    height: 36px;
    width: 36px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-main);
    transition: all 0.3s ease;
    border-radius: 50%;
    cursor: pointer;
}

.cal-date.active { 
    background: var(--cal-accent) !important; 
    color: #151515 !important; 
    font-weight: 700;
}

.cal-date.available { 
    border: 1px solid var(--cal-accent);
    opacity: 0.8;
}

.cal-action-footer {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    margin-top: 20px;
}

.cal-action-btn {
    background: transparent;
    border: none;
    color: var(--cal-accent);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-settings-panel {
    display: none;
    width: 100%;
    margin-top: 15px;
}

.system-hud.is-settings .hud-settings-panel {
    display: block;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tactical Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--grid-line);
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-green); }
input:checked + .slider:before { transform: translateX(16px); background-color: white; }

/* Scanline Overlay Effect */
.scanline-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.scanline-overlay.active { opacity: 1; }

.system-hud.is-expanded .hud-expand-btn {
    transform: rotate(180deg);
    position: absolute;
    top: 15px;
    right: 15px;
}

.hud-expanded-content {
    display: none; /* Prevent it from pushing settings out of view */
    width: 100%;
    margin-top: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.system-hud.is-expanded .hud-expanded-content {
    display: block; /* Show only when expanded */
    opacity: 1;
    pointer-events: auto;
}

.hud-vortex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--grid-line);
    padding-bottom: 8px;
}

.vortex-link {
    font-size: 0.65rem;
    color: var(--accent-green);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-main-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 30px;
    height: calc(100% - 60px);
}

.hud-video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hud-terminal-side {
    background: var(--grid-line);
    border: 1px solid var(--grid-line);
    display: flex;
    flex-direction: column;
    font-family: monospace;
    font-size: 10px;
}

.terminal-header {
    background: var(--grid-line);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 8px;
    text-transform: uppercase;
}

.hud-resources {
    padding: 15px 10px;
    border-bottom: 1px solid var(--grid-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.res-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.res-label { font-size: 8px; color: var(--text-muted); }
.res-bar { 
    width: 100%; 
    height: 4px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 2px;
    overflow: hidden;
}
.res-fill {
    height: 100%;
    background: var(--accent-green);
    transition: width 0.8s ease;
}

.terminal-body {
    flex: 1;
    padding: 10px;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-main);
}

.log-line {
    opacity: 0.7;
    line-height: 1.2;
}

.hud-video-card {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--grid-line);
    transition: border-color 0.3s ease;
}

.hud-video-card:hover { border-color: var(--accent-green); }

.video-thumb-mini { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.video-thumb-mini img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 0.3s; }
.hud-video-card:hover img { opacity: 1; }

.video-tag {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 0.5rem;
    background: rgba(0,0,0,0.8);
    padding: 2px 4px;
    color: var(--accent-green);
}

.status-pulse {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    position: relative;
}

.status-pulse::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid var(--accent-green);
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

@media (max-width: 1024px) {
    .system-hud { display: none; }
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    z-index: 2;
    align-items: center;
}

.logo {
    width: 60px;
    height: 60px;
    border: 1px solid var(--text-main);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Base button style */
.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--text-main);
    color: var(--bg-primary);
    transform: scale(1.05);
}

/* Refined Menu Button */
.menu-btn {
    background-color: var(--bg-primary);
    color:var(--text-main);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
}

.menu-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(125, 158, 132, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(125, 158, 132, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(125, 158, 132, 0);
    }
}

/* --- Stats Divider --- */
.stats-container {
    position: absolute;
    top: 9%;
    left: 50%;
    transform: translateX(-55%);

    width: 70%;

    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stats-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--grid-line);
    z-index: -1;
    transform-origin: left;
}

.stat-item {
    
    /* To hide the line behind text */
    padding: 0 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Massive Hero Typography --- */
.hero {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 5vh;
    position: relative;
    z-index: 2;
}

.hero-line {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    font-family: var(--font-display);
    font-size: clamp(4rem, 14vw, 15rem);
    line-height: 0.8;
    letter-spacing: -2px;
    text-transform: uppercase;
}

.hero-line-1 {
    gap: 2vw;
}

.hero-line-2 {
    justify-content: flex-end;
    padding-right: 5vw;
}

.text-green {
    color: var(--accent-green);
}

.stylized-d {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-weight: normal;
    margin: 0 -0.5vw;
    display: inline-block;
}

.underline-wrapper {
    position: relative;
    display: inline-block;
}

.underline-wrapper::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: clamp(5px, 1.5vw, 15px);
    background-color: var(--accent-green);
    transform-origin: left;
    transform: scaleX(0);
}

/* SplitType specific */
.word {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.char {
    transform: translateY(110%);
}

/* --- About Section --- */
.about-section {
    display: grid;
    grid-template-columns: 100px 1fr;
    width: 400px;
    max-width: 90vw;
    margin-bottom: 80px;
    /* Leave space for bottom grid */
    margin-left: 10vw;
}

.about-title {
    font-size: 0.8rem;
    color: var(--text-main);
}

.about-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.about-text a {
    display: inline-block;
    margin-top: 10px;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.about-text a:hover {
    border-color: var(--text-main);
}

/* --- Bottom Grid --- */
.bottom-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border-top: 1px solid var(--grid-line);
    z-index: 5;
}

.grid-box {
    border-right: 1px solid var(--grid-line);
}

.grid-box:last-child {
    border-right: none;
}

/* ========================================= */
/* MENU OVERLAY STYLES                       */
/* ========================================= */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    background-color: var(--bg-color); /* Responsive background */
    z-index: 999;
    /* This creates the smooth "wipe" reveal effect */
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    display: flex;
    flex-direction: column;
}

.menu-container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Massive Menu Links */
.menu-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1vh;
    margin-top: 5vh;
}

.menu-link-wrapper {
    overflow: hidden;
    /* Crucial for text masking reveal */
}

.menu-link {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 9rem);
    line-height: 0.85;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    transform: translateY(110%);
    /* Hidden by default for GSAP */
    transition:
        color 0.3s ease,
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-num {
    font-family: var(--font-ui);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: var(--text-muted);
    vertical-align: top;
    margin-right: 2vw;
}

/* Hover Effect for Links */
.menu-link-wrapper:hover .menu-link {
    color: var(--accent-green);
    transform: translateX(2vw) translateY(0) !important;
    /* Forces rightward shift */
}

/* Menu Footer */
.menu-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--grid-line);
    padding-top: 2rem;
}

.menu-info-block {
    display: flex;
    gap: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-title {
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
    margin-right: 2rem;
}

.menu-info-block a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.menu-info-block a:hover {
    color: var(--accent-green);
}

/* ========================================= */
/* STACKED WORKS SECTION                     */
/* ========================================= */
.works-stack-section {
    position: relative;
    z-index: 10;
    padding: 5vh 0 20vh 0;
    /* Creates scroll space */
    width: 100%;
    display: flex;
    justify-content: center;
}

.works-stack-container {
    width: 96%;
    /* Leaves space on the right for your W. badge and grid */
    max-width: 1600px;
    position: relative;
}

/* The Magic Stacking Effect */
.stack-card {
    position: sticky;
    top: 15vh;
    /* This dictates where the card pins to the screen */
    height: 70vh;
    /* Fixed height for the card look */
    width: 100%;
    padding: 5vw;
    margin-bottom: 5vh;
    /* Space between cards before they overlap */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 2px;
    transform-origin: top center;
    will-change: transform, filter;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
    /* Shadow creates depth when stacked */
}

/* Colors from the image */
.stack-card.card-light {
    background-color: var(--card-light-bg);
    color: var(--card-light-text);
}

.stack-card.card-green {
    background-color: var(--card-green-bg);
    color: var(--card-green-text);
}

/* The Massive Background Numbers (01, 02, 03) */
/* This should always be a faint version of the card's text color */
.card-bg-number {
    position: absolute;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 50vh;
    /* Takes up half the screen height */
    line-height: 0.8;
    color: rgba(0, 0, 0, 0.05);
    /* Very faint watermark */
    z-index: 0;
    pointer-events: none;
    letter-spacing: -10px;
}

/* Content Layout inside Card */
.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    /* Pushes title top, desc bottom */
}

.card-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 9vw, 12rem);
    line-height: 0.85;
    letter-spacing: -2px;
    text-transform: uppercase;
    width: 100%;
}

.card-desc-wrapper {
    align-self: flex-end;
    /* Pushes to the right like the image */
    width: 100%;
    max-width: 500px;
    text-align: right;
    margin-top: auto;
}

.card-desc {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.5px;
    margin-bottom: 1rem; /* Consistent spacing */
}

.card-link {
    display: inline-block;
    color: #151515;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 2px; /* Consistent padding */
    border-bottom: 1.5px solid var(--card-light-text); /* Use card's text color */
    transition: opacity 0.3s;
}

.card-link:hover {
    opacity: 0.5;
}

/* Little decorative dot seen on the green card in the design */
.decorative-dot {
    position: absolute;
    left: 60%;
    top: 60%;
    width: 10px;
    height: 10px; /* Consistent size */
    background-color: var(--card-green-text); /* Use card's text color */
    border-radius: 50%;
    opacity: 0.3; /* Subtle opacity */
    outline: 1px solid var(--card-green-text); /* Outline matches text */
    outline-offset: 5px; /* Consistent offset */
}

/* ========================================= */
/* ZOOM TRANSITION SECTION                   */
/* ========================================= */
.zoom-section {
    position: relative;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 15;
}

.zoom-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Vertical grid lines specific to this section */
.zoom-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    pointer-events: none;
}

.z-line {
    border-right: 1px solid var(--grid-line);
}

.z-line:first-child {
    border-left: 1px solid var(--grid-line);
}

.zoom-text-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    will-change: transform;
    /* Optimizes the heavy scaling animation */
}

.massive-zoom-text {
    font-family: var(--font-display);
    /* REDUCED the size. It was clamp(10rem, 30vw, 35rem) */
    font-size: clamp(4rem, 15vw, 15rem);
    line-height: 1;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: -2px;
}

.zoom-center-target {
    display: inline-block;
    margin: 0 1vw;
    color: var(--text-main); /* Ensure it's theme-aware */
}

/* The small decorative circle seen in the image */
.decorative-circle {
    position: absolute;
    bottom: 15%;
    right: 32%;
    width: 50px;
    height: 50px;
    border: 1px solid var(--text-main);
    border-radius: 50%; /* Consistent border-radius */
    display: flex;
    align-items: center;
    justify-content: center;
}

.inner-dot {
    width: 8px; /* Consistent size */
    height: 8px; /* Consistent size */
    background-color: var(--text-main);
    border-radius: 50%;
}

.white-flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-main);
    opacity: 0;
    /* Hidden by default, GSAP will fade this in */
    pointer-events: none;
}

/* ========================================= */
/* CONTACT / FOOTER SECTION (Revealed Screen)*/
/* ========================================= */
.contact-section {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100vw;
    background-color: var(--contact-bg); /* Use contact background variable */
    color: var(--contact-text); /* Use contact text variable */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5vh 5vw;
    z-index: 10;
    /* Lower than zoom section */
    opacity: 0;
    /* Start hidden */
    transition: opacity 0.5s ease;
}

.contact-section.is-visible {
    opacity: 1;
    /* Fade in */
}

/* Inverted Grid (Faint black lines on white background) */
.footer-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    pointer-events: none;
    z-index: 0;
}

.f-line {
    border-right: 1px solid var(--contact-grid-line);
}

.f-line:first-child {
    border-left: 1px solid var(--contact-grid-line);
}

/* Ensure content stays above the grid */
.contact-top,
.contact-center,
.contact-bottom {
    position: relative;
    z-index: 2;
}

/* Top Info Row */
.contact-top {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--contact-grid-line);
    padding-bottom: 3vh;
    margin-top: 5vh;
    /* Pushes it down below the initial white flash */
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--contact-info-label);
    letter-spacing: 1px;
}

.info-value,
.social-links a {
    font-size: 1rem;
    font-weight: 500; /* Consistent font weight */
    color: var(--bg-color);
    text-decoration: none;
    line-height: 1.4;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a:hover {
    color: var(--contact-social-link-hover);
}

/* Center Content */
.contact-center {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(6rem, 15vw, 18rem);
    line-height: 0.8;
    letter-spacing: -3px;
    margin-bottom: 0;
    text-transform: uppercase;
}

.massive-email {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: clamp(1rem, 2vw, 1.8rem);
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
    margin-top: 2vw;
    /* Overlaps into the big text slightly */
    padding: 15px 40px;
    border-radius: 50px; /* Consistent border-radius */
    background-color: var(--contact-massive-email-bg);
    /* Dark pill background */
}

/* Bottom Bar */
.contact-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--contact-info-label);
    border-top: 1px solid var(--contact-grid-line);
    padding-top: 3vh;
}

.back-to-top {
    cursor: pointer;
    font-weight: 600;
    color: var(--bg-color);
    transition: color 0.3s ease;
    background-color: #000;
    color: #fff;
    padding: 12px 15px;
    border-radius: 20px;
}

/* ========================================= */
/* ENGINEERING / BENTO SECTION               */
/* ========================================= */
.engineering-section {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 15vh 0;
    display: flex;
    justify-content: center;
}

.engineering-container {
    width: 90%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 8vh;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 12rem);
    line-height: 0.8;
    letter-spacing: -2px;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 20px;
    width: 100%;
}

.bento-card {
    background: var(--bento-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bento-card-border);
    border-radius: 16px; /* Consistent border-radius */
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, background 0.3s ease;
    overflow: hidden;
    position: relative;
}

.bento-card:hover {
    border-color: var(--accent-green); /* Green glow on hover */
    background: rgba(15, 15, 15, 0.6);
}

.bento-large {
    grid-column: span 2;
}

.tech-card {
    grid-column: span 3;
    height: 100%; /* Fills the second row entirely */
    justify-content: center;
}

.bento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bento-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.bento-link {
    color: var(--accent-green);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* GitHub Graph Abstraction */
.graph-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12px, 1fr));
    gap: 6px;
    height: 100%;
    align-content: end;
}

.graph-sq {
    aspect-ratio: 1;
    background-color: var(--bento-graph-sq-bg);
    border-radius: 2px;
    opacity: 0; /* Hidden for GSAP reveal */
}

/* Colors for the GitHub graph */
.graph-sq.low { background-color: rgba(125, 158, 132, 0.3); }
.graph-sq.med { background-color: rgba(125, 158, 132, 0.6); }
.graph-sq.high { background-color: rgba(125, 158, 132, 1); }

/* Quick Stats Box */
.stats-card {
    justify-content: space-between;
}

.stat-block {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--text-main);
}

.stat-divider {
    width: 100%;
    height: 1px;
    background: var(--bento-stat-divider);
    margin: 10px 0;
}

/* Tech Stack Marquee */
.marquee-wrapper {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    margin-top: 15px;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-right: 30px;
    animation: scrollMarquee 20s linear infinite;
}

.marquee-wrapper[dir="rtl"] .marquee-content {
    animation-direction: reverse;
}

.marquee-content span {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--bento-marquee-text-muted);
    text-transform: uppercase;
    transition: color 0.3s;
}

.marquee-content span:hover {
    color: var(--bento-marquee-text-hover);
}

.marquee-content .dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive Grid for mobile */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-large, .tech-card {
        grid-column: span 1;
    }
    .bento-card {
        min-height: 250px;
    }
}

/* ========================================= */
/* WORK OVERLAY (CHKSTEPAN STYLE)            */
/* ========================================= */
.work-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color); /* Use theme variable */
    background-color: var(--bg-color); /* Updated to variable */
    z-index: 2000;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    display: block; /* Removed flex */
}

/* Background Grid */
.overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    pointer-events: none;
    z-index: 1;
}
.o-line { border-right: 1px solid rgba(255, 255, 255, 0.05); }
.o-line:first-child { border-left: 1px solid rgba(255, 255, 255, 0.05); }

/* Overlay Header Fix */
.work-overlay-header {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999; /* Massively boosted to sit above the scroll container */
    pointer-events: none; /* Allows you to scroll if you click in the empty space between logo and button */
}

/* Re-enable clicks ONLY on the actual buttons/logo inside the header */
.work-overlay-header .logo,
.work-overlay-header .menu-btn {
    pointer-events: auto; 
    cursor: pointer;
}
/* Scrollable Container inside Overlay */
.work-overlay-scroll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    pointer-events: auto;
    z-index: 10;

    padding-top: 28vh;
    

    /* background image */
    background-image: url("https://4kwallpapers.com/images/walls/thumbs_3t/12220.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hide scrollbar for clean look */
.work-overlay-scroll::-webkit-scrollbar { display: none; }
.work-overlay-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* Intro Hero */
.wo-intro {
    padding: 0 5vw;
    padding-bottom: 2rem;
    position: relative;
    z-index: 20;
}
.wo-intro::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 60%;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0) 100%
    );

    pointer-events: none;
    z-index: 1;
}
.wo-intro > * {
    position: relative;
    z-index: 2;
}
.wo-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.01);

    z-index: 1;
}
.wo-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #a3a3a3;
    text-transform: uppercase; /* Consistent text transform */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    margin-bottom: 5vh;
}

.wo-massive-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 14vw, 16rem);
    line-height: 0.9;
    color: var(--wo-massive-title-color);
    text-transform: uppercase;
    margin: 0;
}

.wo-title-line { overflow: hidden; }
.wo-text { display: block; transform: translateY(110%); color: var(--wo-list-item-hover-text);}
.right-align { text-align: right; padding-right: 5vw; }

/* The List Items */
.wo-list-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    background-color: var(--bg-color);
    z-index: 20;
}

.wo-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3vw 5vw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none; /* Consistent text decoration */
    color: var(--text-main); /* Use theme variable */
    transition: background-color 0.4s ease, color 0.4s ease, padding 0.4s ease;
}

.wo-item-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 8rem);
    line-height: 1;
    text-transform: uppercase;
    margin: 0;
    pointer-events: none;
}

.wo-item-year {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 5rem);
    pointer-events: none;
}

.wo-list-item:hover {
    background-color: var(--wo-list-item-hover-bg);
    color: var(--wo-list-item-hover-text);
    padding: 4vw 5vw;
}

/* Footer */
.wo-footer {
    padding: 15vh 2vw 5vh 2vw;
    display: flex;
    justify-content: center;
    background-color: var(--bg-color);
    position: relative;
    z-index: 20;
    padding-bottom: 6rem;
}

.wo-massive-name {
    font-family: var(--font-display);
    font-size: clamp(5rem, 21vw, 25rem);
    line-height: 0.8;
    color: var(--wo-massive-name-color);
    margin: 0;
}

/* Floating Image */
.wo-floating-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px; /* Locked size so it doesn't cover the screen */
    height: 240px;
    pointer-events: none;
    z-index: 2050; /* Above absolutely everything */
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    will-change: transform, opacity;
}

.wo-floating-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Center the Video List in the Header */
.video-list {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    pointer-events: auto; /* CRITICAL: Makes it clickable! */
}

.video-item {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.video-item:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

/* Cinematic Video Modal Container */
.wo-video-modal {
    position: fixed;
    inset: 0;
    z-index: 9995; /* Sits exactly below the Header, but above everything else */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Hidden by default */
}

/* The dark glassmorphism background */
.wo-video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
}

/* The actual video box */
.wo-video-wrapper {
    position: relative;
    width: 80vw;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    visibility: hidden; /* Start hidden */
    pointer-events: auto;
    z-index: 2;
}

.wo-video-container {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

/* Make iframe responsive */
.wo-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Close Button for Video */
.wo-video-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.wo-video-close-btn:hover {
    opacity: 1;
}



/* ========================================= */
/* ABOUT OVERLAY STYLES                      */
/* ========================================= */
.about-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--bg-color); /* Use theme variable */
    z-index: 2100;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    display: block;
}

.about-overlay-header {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 2rem; display: flex; justify-content: space-between;
    align-items: center; z-index: 100;
}

.about-overlay-scroll {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow-y: auto; overflow-x: hidden;
    padding-top: 15vh;
    
}



.ao-hero {
    margin-bottom: 10vh;
    height: 100vh;
    padding: 2rem;

    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0) 40%),  /* top fade */
        linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0) 40%),     /* bottom fade */
        url("https://4kwallpapers.com/images/walls/thumbs_3t/1455.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.ao-meta {
    display: flex;
    justify-content: space-between;

    font-size: clamp(1rem, 1.5vw, 1.4rem); /* responsive bigger text */
    letter-spacing: 0.15em; /* Consistent letter spacing */
    color: #aaa;

    text-transform: uppercase;

    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 14px;
    margin-bottom: 5vh;
}
.ao-massive-title {
    font-family: var(--font-display);

    font-size: clamp(4rem, 18vw, 18rem); /* increased scale */
    line-height: 1.05; /* tighter = more powerful look */

    color: var(--ao-massive-title-color);
    text-transform: uppercase;

    letter-spacing: -0.02em; /* subtle modern compression */
}

.ao-title-line { overflow: hidden; margin: 2rem auto; }
.ao-text { display: block; transform: translateY(110%); }

.ao-details-grid {
    padding: 0 3vw;
    display: grid; grid-template-columns: 1.5fr 1fr;
    gap: 10vw; margin-bottom: 15vh;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 5vh;
}

.ao-label {
    display: block; font-size: 0.7rem; color: var(--accent-green);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 2rem;
}

.ao-paragraph {
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    line-height: 1.4; color: var(--ao-paragraph-color); margin-bottom: 2rem;
}

.ao-list { list-style: none; }
.ao-list li {
    font-size: 1.1rem; padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--ao-list-item-color);
}

.ao-values {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 4vw; margin-bottom: 15vh;
}

.ao-v-num { color: var(--accent-green); font-family: var(--font-display); font-size: 1.5rem; }
.ao-v-title { margin: 1rem 0; font-size: 1.2rem; letter-spacing: 1px; }
.ao-v-item p { color: var(--ao-v-item-p-color); line-height: 1.6; font-size: 0.95rem; }

.ao-footer {
    padding: 15vh 5vw; /* Increased horizontal padding so it doesn't hit the screen edges */
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    overflow: hidden; /* Prevents the massive text from causing scrollbars */
}

.ao-massive-name {
    font-family: var(--font-display);
    /* Use 'vw' to ensure it scales perfectly with width */
    font-size: clamp(2rem, 15vw, 20rem); 
    color: transparent; /* Makes the center hollow */ /* Consistent color */
    -webkit-text-stroke: 2px var(--ao-list-item-color); /* Slightly thicker/softer stroke */
    line-height: 0.8;
    margin: 0;
    padding: 0;
    /* This centers it properly if the container has extra space */
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap; /* Prevents wrapping if the name is long */
}

@media (max-width: 900px) {
    .ao-details-grid, .ao-values {
        grid-template-columns: 1fr;
        gap: 8vh;
    }
    .ao-paragraph { font-size: 1.2rem; }
    .ao-massive-title { font-size: 4rem; }
}

/* Update the existing CSS for these specific classes */

.ao-massive-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 14vw, 16rem); /* Increased size */
    line-height: 0.85; /* Consistent line height */
    color: #fff;
    text-transform: uppercase;
    margin: 0;
}

/* Add this to create the 'text-outline' style */
.text-outline {
    -webkit-text-stroke: 2px var(--wo-list-item-hover-text);
    color: transparent;
}

/* Improve paragraph readability */
.ao-paragraph {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    line-height: 1.5; 
    color: var(--ao-paragraph-color); /* Softer grey */
    margin-bottom: 2rem;
    max-width: 90%;
}

/* Refined List Items */


.ao-list li:hover {
    padding-left: 10px;
    color: var(--accent-green);
}

/* Value Cards: Give them a subtle hover lift */
.ao-value-item {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.ao-value-item:hover {
    border-color: rgba(125, 158, 132, 0.5);
    transform: translateY(-5px);
}


/* ========================================= */
/* PROFESSIONAL SERVICES OVERLAY             */
/* ========================================= */
.process-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--process-overlay-bg);
    z-index: 2200;
    /* This animation starts as a thin line at the bottom */
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    overflow: hidden;
}

/* Ensure the header is always on top */
.process-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
}

.process-header .logo, 
.process-header .menu-btn {
    pointer-events: auto;
}

/* The Content Container */
.process-container {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10vh 10vw;
    box-sizing: border-box;
}

/* The List Area */
.process-list {
    width: 100%;
    margin-bottom: 5vh;
}

.p-item {
    display: flex;
    align-items: center;
    gap: 4vw;
    padding: 3vw 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.p-item:hover {
    padding-left: 2vw;
    color: var(--process-item-hover-color);
    border-color: var(--process-item-hover-border);
}

.p-num {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    color: var(--accent-green);
    font-weight: 300;
}

.p-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 9rem);
    text-transform: uppercase;
    line-height: 1;
    margin: 0;
}

/* The Info Box (The part that updates on hover) */
.p-info-box {
    width: 100%;
    max-width: 600px;
    height: 100px; /* Fixed height to prevent layout jumps */
}

.p-desc {
    font-family: var(--font-ui);
    font-size: 1.4rem; /* Consistent font size */
    color: var(--process-desc-color);
    line-height: 1.5;
    margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .process-container {
        padding: 0 5vw;
    }
    .p-item {
        gap: 2vw;
        padding: 5vw 0;
    }
    .p-title {
        font-size: 3rem;
    }
    .p-desc {
        font-size: 1rem;
    }
}

/* Smooth interaction for descriptions */
.p-desc {
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0.8;
}

.game-dev-section {
    position: relative;
    z-index: 20; /* High index to ensure it sits ABOVE the canvas */
    padding: 15vh 5vw;
    background: transparent; /* Let the main page background shine through */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.engine-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: center;
    width: 100%;
    margin-top: 5vh;
}

.engine-item {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: 0.3s;
}

.engine-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
}

.engine-num { color: var(--accent-green); margin-right: 20px; }

/* Visual Preview Box */
.visual-frame {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a; /* Placeholder color if image is missing */
    position: relative;
}

.visual-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Removes mysterious bottom padding */
}

.engine-desc {
    margin-top: 30px;
    font-size: 1.2rem;
    color: #888;
    max-width: 400px;
}

/* ========================================= */
/* DIGITAL PHILOSOPHY SECTION                */
/* ========================================= */
.vision-section {
    width: 100%;

    background-color: var(--bg-color);
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.vision-content {
    position: relative;
    z-index: 5;
    max-width: 900px;
}

.vision-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.vision-parallax-img {
    width: 100%;
    height: 130%; /* Extra height for parallax movement */
    object-fit: cover;
    filter: grayscale(1) brightness(0.4) contrast(1.1);
    transition: filter 0.5s ease;
}

[data-theme="light"] .vision-parallax-img {
    filter: grayscale(0.5) brightness(0.85) contrast(1);
}

.vision-image-wrapper:hover .vision-parallax-img {
    filter: grayscale(0) brightness(0.5);
}

[data-theme="light"] .vision-image-wrapper:hover .vision-parallax-img {
    filter: grayscale(0) brightness(0.95);
}

.vision-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Professional gradient ensures text pops against background */
    background: linear-gradient(
        to right,
        var(--bg-color) 0%,
        var(--bg-color) 35%,
        rgba(0, 0, 0, 0) 100%
    );
}

[data-theme="light"] .vision-image-overlay {
    background: linear-gradient(
        to right,
        var(--bg-color) 0%,
        var(--bg-color) 35%,
        rgba(255, 255, 255, 0) 100%
    );
}

.vision-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 5vh;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 4vh;
}

[data-theme="light"] .vision-pillars {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pillar-item h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 10px 0;
    text-transform: uppercase;
}

.pillar-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
