/*
  Main Styles - Neo-Brutalist Luxe Portfolio
  Performance-optimized with hardware-accelerated animations
*/

/* ===== BASE STYLES ===== */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    /* Prevent horizontal scroll on mobile */
}

/* Smooth scroll with optimization */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ===== CUSTOM CURSOR REMOVED ===== */

/* ===== SPLIT LAYOUT ===== */
.split-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== FIXED LEFT SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 35px;
    z-index: var(--z-header);
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-logo {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color var(--duration-fast) ease;
}

.sidebar-logo:hover {
    color: var(--accent-primary);
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    align-items: center;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-link {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
    transition: all var(--duration-fast) ease;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--duration-normal) var(--ease-out-expo);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--text-primary);
}

.sidebar-link:hover::before,
.sidebar-link.active::before {
    width: 12px;
}

.sidebar-link.active {
    color: var(--accent-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    transition: color var(--duration-fast) ease;
}

.social-link:hover {
    color: var(--accent-primary);
}

.social-icon {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.social-link:hover .social-icon {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.sidebar-cta:hover {
    background: var(--accent-primary);
    transform: translateX(4px);
}

.cta-arrow {
    transition: transform var(--duration-fast) ease;
}

.sidebar-cta:hover .cta-arrow {
    transform: translateX(4px);
}

.sidebar-copyright {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ===== SCROLLABLE MAIN CONTENT ===== */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

/* ===== SPLIT HERO SECTION ===== */
.hero-split {
    min-height: 100vh;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
}

/* Hero Animated Background */
.hero-bg-animation {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(212, 175, 55, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

/* Grid Overlay */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* Floating Cubes Animation */
.floating-cube {
    position: absolute;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.03);
    animation: floatCube 12s ease-in-out infinite;
}

.cube-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.cube-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.cube-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 25%;
    animation-delay: -6s;
}

.cube-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: -9s;
}

@keyframes floatCube {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    25% {
        transform: translateY(-15px) rotate(2deg);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-25px) rotate(0deg);
        opacity: 1;
    }

    75% {
        transform: translateY(-10px) rotate(-2deg);
        opacity: 0.7;
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    width: 100%;
}

.hero-intro {
    margin-bottom: 40px;
}

.hero-label {
    display: inline-block;
    font-size: var(--text-xs);
    color: var(--accent-primary);
    letter-spacing: 0.2em;
    margin-bottom: 16px;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(48px, 10vw, 100px);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.hero-tagline .highlight {
    color: var(--accent-primary);
    font-weight: 500;
}

/* Hero Details */
.hero-details {
    margin-bottom: 50px;
}

.hero-description {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-split .btn {
    padding: 14px 28px;
}

.hero-split .btn-primary {
    background: var(--accent-primary);
    color: #0a0a0a;
    border-color: var(--accent-primary);
}

.hero-split .btn-primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.hero-split .btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-split .btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Hero Status */
.hero-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}

.status-text {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.scroll-text {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        transform: scaleX(1);
        opacity: 0.4;
    }

    50% {
        transform: scaleX(1.2);
        opacity: 0.8;
    }
}

/* ===== SPLIT LAYOUT RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        padding: 40px 25px;
    }

    .main-content {
        margin-left: 240px;
    }

    .hero-split {
        padding: 60px 40px;
    }
}

@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .sidebar-logo {
        font-size: var(--text-lg);
    }

    .sidebar-title {
        display: none;
    }

    .sidebar-nav {
        display: none;
        /* Hidden on mobile, use hamburger menu if needed */
    }

    .sidebar-footer {
        flex-direction: row;
        gap: 12px;
    }

    .sidebar-social {
        display: none;
    }

    .sidebar-cta {
        padding: 10px 16px;
        font-size: var(--text-xs);
    }

    .sidebar-copyright {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .hero-split {
        padding: 80px 24px 60px;
        min-height: calc(100vh - 70px);
    }

    /* Push hero content away from nav without affecting bg */
    .hero-content {
        margin-right: 100px;
    }

    .hero-name {
        font-size: clamp(36px, 12vw, 64px);
    }

    .hero-tagline {
        font-size: var(--text-base);
    }

    .hero-cta-group {
        flex-direction: column;
        max-width: calc(100% - 60px);
    }

    .scroll-indicator {
        left: 24px;
        bottom: 30px;
    }

    .floating-cube {
        display: none;
        /* Hide on mobile for performance */
    }

    /* Mobile Timeline Touch Effects */
    .timeline-link {
        padding: 16px 20px;
        margin: -16px -20px;
        margin-bottom: 12px;
    }

    .timeline-link:active {
        background: var(--bg-secondary);
        transform: translateX(4px);
    }

    .timeline-link:active .timeline-title {
        color: var(--accent-primary);
    }
}

/* ===== MOBILE FLOATING NAV ===== */
.mobile-nav {
    display: none;
    /* Hidden on desktop */
}

@media (max-width: 1024px) {
    .mobile-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
        position: fixed;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1000;
    }

    /* Toggle Button */
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        background: var(--bg-primary);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        order: 1;
        /* Put toggle at bottom */
    }

    .mobile-nav-toggle:active {
        transform: scale(0.9);
    }

    .toggle-icon-menu,
    .toggle-icon-close {
        width: 24px;
        height: 24px;
        color: var(--text-primary);
        transition: all 0.3s ease;
    }

    /* Show menu icon by default, hide close icon */
    .toggle-icon-close {
        display: none;
    }

    /* When active: show close icon, hide menu icon */
    .mobile-nav-toggle.active .toggle-icon-menu {
        display: none;
    }

    .mobile-nav-toggle.active .toggle-icon-close {
        display: block;
    }

    .mobile-nav-toggle.active {
        background: var(--accent-primary);
    }

    .mobile-nav-toggle.active .toggle-icon-close {
        color: #0a0a0a;
    }

    /* Floating Menu - Hidden by default */
    .mobile-nav-menu {
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: var(--bg-primary);
        border-radius: 30px;
        padding: 10px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px) scale(0.9);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        order: 0;
        /* Menu above toggle */
    }

    /* When active: show menu */
    .mobile-nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    /* Menu Items - Icon Only Circular Buttons */
    .mobile-nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: transparent;
        border-radius: 50%;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-nav-item:active {
        transform: scale(0.9);
        background: var(--bg-secondary);
    }

    .mobile-nav-item.active {
        background: var(--accent-primary);
    }

    .mobile-nav-item.active .mobile-nav-icon {
        color: #0a0a0a;
    }

    /* SVG Icon Styling */
    .mobile-nav-icon {
        width: 24px;
        height: 24px;
        color: var(--text-primary);
        transition: color 0.2s ease;
    }

    .mobile-nav-item:hover .mobile-nav-icon {
        color: var(--accent-primary);
    }

    /* Hide desktop sidebar completely on mobile */
    .sidebar {
        display: none;
    }
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    z-index: var(--z-header);
    will-change: width;
}

/* ===== BACKGROUND ===== */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: var(--z-background);
    opacity: 0.03;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            var(--text-primary) 0px,
            transparent 1px,
            transparent 40px);
}

.code-stream {
    display: none;
    /* Removed for minimalist aesthetic */
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    padding: var(--space-lg) 0;
    background: transparent;
    transition: all var(--duration-normal) ease;
    pointer-events: none;
    /* Ignore clicks when hidden */
}

/* Smart Nav: Only visible when scrolled past hero */
.nav.visible {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    pointer-events: auto;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    /* Hidden by default */
    transform: translateY(-10px);
    transition: all var(--duration-normal) ease;
}

.nav.visible .nav-container {
    opacity: 1;
    transform: translateY(0);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--text-primary);
    transition: color var(--duration-fast) ease;
}

.nav-logo:hover {
    color: var(--accent-primary);
}

.logo-text {
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    position: relative;
    transition: color var(--duration-fast) ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link--cta {
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 2px;
    transition: all var(--duration-fast) ease;
}

.nav-link--cta::after {
    display: none;
}

.nav-link--cta:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.2);
}

/* Mobile nav toggle (for future responsive implementation) */
@media (max-width: 768px) {
    .nav-links {
        gap: var(--space-md);
    }

    .nav-link {
        font-size: var(--text-xs);
    }
}

/* ===== HERO MINIMALIST SECTION ===== */
.hero-poster {
    height: 100vh;
    /* Fallback for older browsers */
    height: 100dvh;
    /* Dynamic viewport height for mobile */
    width: 100vw;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    /* Dark fallback */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-layer {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Layer: Full Screen Background (Spline) */
.layer-bg {
    z-index: 0;
    width: 100%;
    height: 100%;
}

.spline-bg-iframe {
    width: 110%;
    /* Slightly oversize to crop edges */
    height: 110%;
    margin-left: -5%;
    /* Center after scaling */
    margin-top: -5%;
    border: none;
    pointer-events: none;
    /* Disable interaction/orbit to keep it static */
    display: block;

    /* Chrome Optimization */
    transform: translateZ(0);
    will-change: transform;
    min-width: 100%;
    min-height: 100%;
}

/* Removed previous logo cover overlay */

/* Layer: Text (Minimalist Overlay) */
.layer-text {
    z-index: 10;
    flex-direction: column;
    justify-content: flex-start;
    /* Align text to top */
    padding-top: 10vh;
    /* Space from top edge */
    text-align: center;
    gap: 16px;
    /* Push gently transparent so clicks can pass through to scene if needed, 
        but text itself usually blocks clicks. 
        User interaction with BG is prioritized, so let's allow pass-through on gap areas. */
    pointer-events: none;
}

.hero-minimal-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    /* Responsive minimalist size (Brittany Chiang style: clean, not massive) */
    font-size: var(--text-5xl);
    /* Max 48px now */
    color: #e6f1ff;
    /* HSL(215, 100%, 95%) - Soft white */
    line-height: 1.1;
    letter-spacing: -0.02em;
    pointer-events: auto;
    /* Selectable */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-minimal-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: var(--text-base);
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.05em;
    pointer-events: auto;

}


/* Layer: UI (Minimalist) */
.layer-ui {
    z-index: 20;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 60px;
    pointer-events: none;
    /* Let clicks pass to 3D BG */
}

/* Header UI */
.hero-header-ui {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.orbital-label,
.portfolio-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #fafafa;
    pointer-events: auto;

}

.label-tiny {
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Tech Badge Style */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tech-badge-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #fff;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.tech-badge:hover .tech-badge-text {
    color: var(--accent-primary);
}

.tech-badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(212, 175, 55, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Footer UI */
.hero-footer-ui {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Quote Box (Left) */
.quote-box {
    max-width: 250px;
    font-family: 'DM Sans', sans-serif;
    pointer-events: auto;
}

.quote-text {
    font-size: 14px;
    color: #a8b2d1;
    line-height: 1.6;
}

/* Scroll Pill (Center) */
.scroll-pill {
    background: transparent;
    border: 1px solid #64ffda;
    /* Accent color */
    padding: 12px 28px;
    border-radius: 4px;
    color: #64ffda;
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.scroll-pill:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

/* Data Panel (Right) */
.data-panel {
    pointer-events: auto;
}

.panel-list {
    list-style: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #8892b0;
    text-align: right;
}

.panel-list li {
    margin-bottom: 4px;
}

/* Footer UI */
.hero-footer-ui {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Quote Box (Left) */
.quote-box {
    max-width: 300px;
    font-family: 'DM Sans', sans-serif;
    pointer-events: auto;
}

.quote-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 8px;
}

.quote-source {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Scroll Pill (Center) */
.scroll-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 32px;
    border-radius: 100px;
    color: #fff;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.scroll-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Data Panel (Right) */
/* Data Panel (Right -> Now Bottom Right Cover) */
.data-panel {
    /* Absolute position to force it into the corner */
    position: absolute;
    bottom: 0 !important;
    right: 0 !important;
    margin: 0 !important;

    background: #0a0a0a;
    /* Match hero bg color */
    padding: 16px 32px 16px 24px;
    /* More padding for better size */
    border-radius: 12px 0 0 0;
    /* Rounded top-left corner only */

    /* Ensure it sits on top */
    z-index: 100;
    pointer-events: auto;

    /* Box properties */
    border: none;
    min-width: 200px;
    height: 70px;
    /* Force sufficient height to cover logo */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.panel-list {
    list-style: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    /* Slightly easier to read */
    color: #e6e6e6;
    /* Brighter text for contrast against dark bg */
    margin: 0;
    letter-spacing: 0.05em;
}

.panel-list li {
    margin-bottom: 1px;

}

/* Responsive */
@media (max-width: 768px) {
    .hero-minimal-title {
        font-size: 15vw;
        white-space: normal;
    }

    .layer-ui {
        padding: 20px;
    }

    .hero-minimal-title {
        font-size: 18vw;
        letter-spacing: -0.05em;
        line-height: 0.85;
        white-space: normal;
        margin-top: 10px;
    }

    .layer-text {
        padding-top: 100px;
        /* Push title down to clear top corners */
        justify-content: flex-start;
    }

    .quote-box {
        width: 100%;
        max-width: none;
        text-align: center;
        /* Reset positioning for mobile layout flow */
        position: static !important;
        margin: 0 !important;
        background: transparent;
        padding: 10px;
        border-radius: 0;
        justify-content: center;
    }

    .hero-header-ui {
        flex-direction: row;
        /* Keep corners structure */
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
        width: 100%;
        padding-top: 10px;
        /* Safe area from top edge */
    }

    .orbital-label {
        text-align: left;
        max-width: 100px;
    }

    .portfolio-meta {
        text-align: right;
        max-width: 120px;
    }

    .hero-footer-ui {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .orbital-label,
    .portfolio-meta {
        font-size: 11px;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--section-padding) var(--gutter);
    position: relative;
    overflow: hidden;
}

/* Hero visual - Gargantua GIF background */
.hero-visual {
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    width: 70vmin;
    height: 70vmin;
    max-width: 700px;
    max-height: 700px;
    opacity: 0;
    animation: fadeInVisual 2s ease-out 0.5s forwards;
    pointer-events: none;
    z-index: 0;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    opacity: 0.15;
    filter: grayscale(20%) blur(1px);
    border-radius: 50%;
}

@keyframes fadeInVisual {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Responsive adjustments for hero visual */
@media (max-width: 1024px) {
    .hero-visual {
        right: -20%;
        width: 60vmin;
        height: 60vmin;
    }
}

@media (max-width: 768px) {
    .hero-visual {
        right: 50%;
        top: 30%;
        transform: translate(50%, -50%);
        width: 80vmin;
        height: 80vmin;
        opacity: 0.6;
    }

    .hero-visual img {
        opacity: 0.1;
    }
}

.hero-container {
    max-width: var(--max-width);
    width: 100%;
    z-index: var(--z-content);
}

.hero-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.2s forwards;
}

.hero-label-divider {
    margin: 0 var(--space-sm);
    color: var(--accent-primary);
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-xl);
}

.hero-title-line {
    display: block;
    overflow: hidden;
}

.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: slideUp 0.8s var(--ease-out-expo) forwards;
}

.hero-title-line:nth-child(1) .word {
    animation-delay: 0.3s;
}

.hero-title-line:nth-child(2) .word {
    animation-delay: 0.5s;
}

.hero-title-line:nth-child(3) .word {
    animation-delay: 0.7s;
}

.accent-text {
    color: var(--accent-primary);
    position: relative;
}

.accent-text::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    opacity: 0.3;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.9s forwards;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.1s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    transition: all var(--duration-normal) ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-bright);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-arrow {
    font-size: var(--text-lg);
    transition: transform var(--duration-fast) ease;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-lg);
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.3s forwards;
}

.stat {
    border-left: 2px solid var(--accent-primary);
    padding-left: var(--space-md);
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.5s forwards;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ===== SECTIONS ===== */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-padding) var(--gutter);
}

/* Mobile: push content away from floating nav */
@media (max-width: 1024px) {

    .about-content,
    .contact-content,
    .projects-grid {
        margin-right: 60px;
    }
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-label {
    font-size: var(--text-xs);
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.section-title.large {
    font-size: var(--text-5xl);
}

.mono-text {
    font-family: var(--font-mono);
}

.lead-text {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== WORK SECTION ===== */
.work {
    background: var(--bg-primary);
    position: relative;
    z-index: var(--z-base);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    gap: var(--space-2xl);
}

.project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-slow) ease;
    /* Chrome Performance Optimization for Tilt Effect */
    will-change: transform;
    transform: translateZ(0);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-secondary);
    opacity: 0;
    pointer-events: none;
    /* Allow clicks to pass through */
    transition: opacity var(--duration-normal) ease;
}

.project-card:hover::before {
    opacity: 0;
    /* Disabled overlay effect */
}

.project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.08);
}

.project-number {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    color: rgba(26, 26, 26, 0.05);
    z-index: 1;
}

.project-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
}

/* Actual project images */
.project-image-actual {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: var(--space-xl);
}

.project-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
    margin-bottom: var(--space-md);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--duration-fast) ease;
}

.project-link:hover {
    color: var(--accent-primary);
}

.project-link .arrow {
    transition: transform var(--duration-fast) ease;
}

.project-link:hover .arrow {
    transform: translateX(4px);
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    gap: var(--space-3xl);
}

.about-text {
    max-width: 800px;
}

.about-text p {
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

.about-text p:first-child {
    font-size: var(--text-xl);
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--space-2xl);
}

.skill-category-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    color: var(--accent-primary);
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.skill-item {
    display: flex;
    flex-direction: column;
    /* Removed gap as bar is gone */
}

.skill-name {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle divider instead of bar */
}

/* Removed skill-bar and skill-fill styles */

.skill-fill.animated {
    width: var(--skill-width);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: var(--space-2xl);
    margin-top: var(--space-3xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--space-2xl) * -1 - 6px);
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 0 6px var(--accent-glow);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent-secondary);
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.timeline-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
}

.timeline-company {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Timeline Links */
.timeline-link {
    display: block;
    text-decoration: none;
    padding: 12px 16px;
    margin: -12px -16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) ease;
}

.timeline-link:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.timeline-link:hover .timeline-title {
    color: var(--accent-primary);
}

.timeline-link:hover .timeline-company {
    color: var(--text-primary);
}

.timeline-link .timeline-title,
.timeline-link .timeline-company {
    transition: color var(--duration-fast) ease;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: var(--space-3xl);
    align-items: start;
}

.contact-text {
    position: relative;
    z-index: var(--z-content);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    transition: all var(--duration-normal) var(--ease-out-expo);
    will-change: transform;
}

.contact-link:hover {
    transform: translateX(8px);
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-link-value {
    font-size: var(--text-lg);
    color: var(--text-primary);
    transition: color var(--duration-fast) ease;
}

.contact-link:hover .contact-link-value {
    color: var(--accent-primary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: var(--space-xl) var(--gutter);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: clamp(3rem, 6vh, 6rem);
    }
}

@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: var(--space-lg);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITY CLASSES ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo),
        transform 0.8s var(--ease-out-expo);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimization: force GPU acceleration */
.project-card,
.btn,
.contact-link,
.skill-fill {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}