:root {
    --bg-color: #080808;
    --text-color: #f0f0f0;
    --text-muted: #aaa;
    /* Brighter muted text */
    --accent: #FF3B30;
    --accent-glow: rgba(255, 59, 48, 0.4);
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    --glass-panel: rgba(255, 255, 255, 0.1);
    /* Brighter panel */
    --glass-border: rgba(255, 255, 255, 0.3);
    /* Brighter border */
    --cursor-size: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* cursor: none; Removed custom cursor */
}

/* Body Background Layers */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: clamp(14px, 1.5vw, 16px);
    overflow: hidden;
    position: relative;
}

/* Base Gradient behind everything */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #080808 60%);
    z-index: 0;
    pointer-events: none;
}

/* --- MINIMAL LOADER --- */
.minimal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.87, 0, 0.13, 1);
}

body.loaded .minimal-loader {
    transform: translateY(-100%);
    pointer-events: none;
}

.loader-center {
    width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.brand-reveal {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    animation: reveal-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s;
}

.progress-track {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.progress-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #fff;
    animation: load-simple 1.5s cubic-bezier(0.65, 0, 0.35, 1) forwards 0.5s;
}

.loading-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    animation: fade-in 0.5s ease-out forwards 0.5s;
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes load-simple {
    0% {
        width: 0%;
    }

    50% {
        width: 40%;
    }

    100% {
        width: 100%;
    }
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* Main Content Container */
.snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    position: relative;
    z-index: 10;
    /* Above CPU Core (z-index 1) */

    background: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
    will-change: scroll-position;
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.scene {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    padding: 80px 15px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    /* Promote to GPU layer to prevent repaints */
    transform: translateZ(0);
    backface-visibility: hidden;
}

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

.full-height {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Floating Nav */
.floating-nav {
    position: fixed;
    right: clamp(15px, 3vw, 40px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 20px);
}

.nav-dot {
    width: clamp(8px, 1.2vw, 10px);
    height: clamp(8px, 1.2vw, 10px);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: 0.3s;
    position: relative;
    display: block;
}

.nav-dot.active,
.nav-dot:hover {
    background: var(--text-color);
    transform: scale(1.3);
}

.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    color: var(--text-color);
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    font-weight: 500;
    white-space: nowrap;
    transition: 0.3s;
    pointer-events: none;
}

.nav-dot:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.fixed-cta {
    position: fixed;
    top: clamp(15px, 3vw, 40px);
    right: clamp(15px, 3vw, 40px);
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(0.65rem, 1.2vw, 0.9rem);
    letter-spacing: clamp(1px, 0.3vw, 2px);
    z-index: 100;
    mix-blend-mode: difference;
}

/* Typography */
.giant-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 15vw, 15rem);
    line-height: 0.8;
    text-transform: uppercase;
    color: var(--text-color);
}

.giant-text .line {
    display: block;
    transform: translateY(100%);
    /* For animation */
    /* Init state handled by JS or default to visible */
    transform: translateY(0);
}

.highlight {
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
}

.scene-header {
    margin-bottom: clamp(20px, 4vw, 40px);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: clamp(5px, 1vw, 10px);
    flex-wrap: wrap;
    gap: 10px;
}

.scene-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 3rem);
    text-transform: uppercase;
    font-weight: 300;
}

.index-num {
    font-size: clamp(0.9rem, 2vw, 1.5rem);
    color: var(--text-muted);
}

/* Home Scene */
#home {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    text-align: center;
}



.hero-content {
    position: relative;
    z-index: 10;
    /* Above CPU core */
}

.hero-meta {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 60%;
    margin-left: auto;
    position: relative;
    z-index: 10;
}

.scramble-text {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: var(--text-muted);
    letter-spacing: 1px;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    opacity: 0.5;
}

.line-drop {
    width: 1px;
    height: 40px;
    background: var(--text-color);
    animation: drop 2s infinite;
}

@keyframes drop {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Bento Grid */
.bento-grid {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
    display: block;
}

@media (max-width: 1200px) {
    .bento-grid {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .bento-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        column-count: 1;
    }
}

.bento-item {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 0px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s;
    z-index: 10;
    margin-bottom: 20px;
    break-inside: avoid;
    display: block;
    width: 100%;
}

.bento-item:hover {
    border-color: var(--accent);
    transform: scale(0.98);
}

.p-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: clamp(12px, 2vw, 20px);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    z-index: 20;
    transition: 0.3s;
}

.p-content h3 {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    margin-bottom: 2px;
    color: #fff;
    text-transform: none;
}

.p-content p {
    color: var(--text-muted);
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.p-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Though height: auto makes it act like contain/natural */
    transition: transform 0.6s;
    filter: grayscale(100%);
    position: relative;
    z-index: 5;
    border-radius: 0px;
    display: block;
}

.bento-item:hover .p-image {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Image classes removed - moved to HTML <img> tags */

/* Services */
.services-track {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    padding: 60px 0;
    justify-content: flex-start;
}

.service-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: clamp(20px, 4vw, 40px) clamp(15px, 3vw, 30px);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 20px);
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: clamp(10px, 2vw, 20px);
    margin-bottom: clamp(10px, 2vw, 20px);
    position: relative;
    z-index: 10;
    overflow: hidden;
}



.service-card:hover,
.service-card.active {
    opacity: 1;
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);
}

.s-num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-right: clamp(15px, 3vw, 40px);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    width: 40%;
    color: #fff;
}

.service-card p {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: var(--text-muted);
}

.service-card i {
    margin-left: auto;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    transform: rotate(-45deg);
    transition: 0.3s;
}

.service-card:hover i {
    transform: rotate(0);
    color: var(--accent);
}



/* Team Section (Editorial Hover Reveal) */
.editorial-layout {
    display: flex;
    width: 100%;
    height: 85vh;
    /* Restore classic editorial height */
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin-top: 20px;
}

/* LEFT: List */
.team-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--glass-border);
}

.team-item {
    padding: clamp(20px, 4vw, 30px) clamp(20px, 5vw, 40px);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.team-item:last-child {
    border-bottom: none;
}

.team-item.active,
.team-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.item-num {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 40px;
}

.item-text h3 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-muted);
    line-height: 1.1;
    transition: color 0.3s;
    text-transform: uppercase;
    margin-bottom: clamp(5px, 2vw, 15px);
}

.team-item.active .item-text h3,
.team-item:hover .item-text h3 {
    color: #fff;
}

.item-text .meta-info {
    opacity: 0.5;
    transform: translateY(10px);
    transition: all 0.4s;
}

.team-item.active .meta-info,
.team-item:hover .meta-info {
    opacity: 1;
    transform: translateY(0);
}

.item-text .role {
    display: block;
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: bold;
}

.item-text .desc {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    color: #aeaeae;
    max-width: 450px;
    line-height: 1.5;
}

.team-item i {
    margin-left: auto;
    font-size: 1.5rem;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s;
}

.team-item.active i,
.team-item:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* RIGHT: Visuals */
.team-visuals {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    /* Container rounding */
}

.visual-img {
    position: absolute;
    width: auto;
    height: 90%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.8s ease;
    transform: scale(1.05);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    z-index: 10;
    border-radius: 5px;
    overflow: hidden;
}

.visual-img.active {
    opacity: 1;
    transform: scale(1);
}

/* Solo Profile Layout */
.solo-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(40px, 8vw, 100px);
    padding: clamp(30px, 5vw, 60px);
    min-height: 70vh;
}

.profile-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-frame {
    width: clamp(250px, 30vw, 350px);
    height: clamp(250px, 30vw, 350px);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: all 0.5s ease;
}

.profile-frame:hover .profile-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.15;
    z-index: 1;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.1); }
}

.profile-content {
    max-width: 500px;
}

.profile-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.profile-title {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

.profile-bio {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #b0b0b0;
    line-height: 1.8;
    margin-bottom: 35px;
}

.profile-stats {
    display: flex;
    gap: clamp(20px, 4vw, 40px);
    margin-bottom: 35px;
    padding: 25px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.skill-tag {
    position: relative;
    padding: clamp(6px, 1vw, 8px) clamp(10px, 2vw, 16px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    color: var(--accent);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tag:hover {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skill-tag::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 242, 255, 0.3), 0 0 30px rgba(0, 242, 255, 0.1);
    pointer-events: none;
}

.skill-tag::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: var(--accent);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
    pointer-events: none;
}

.skill-tag:hover::before,
.skill-tag:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .skill-tag::before {
        white-space: normal;
        width: max-content;
        max-width: 200px;
        text-align: center;
    }
}

.github-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.github-link {
    display: block;
    transition: transform 0.3s ease;
}

.github-link:hover {
    transform: scale(1.02);
}

.github-stats img {
    width: 100%;
    max-width: 450px;
    border-radius: 10px;
}

.profile-social {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 242, 255, 0.1);
    transform: translateY(-3px);
}

/* Solo Profile Mobile */
@media (max-width: 900px) {
    .solo-profile {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-social {
        justify-content: center;
    }
}

/* Mobile: Stack them */
@media (max-width: 768px) {
    .editorial-layout {
        flex-direction: column;
        height: auto;
    }

    .team-visuals {
        min-height: 400px;
        height: auto;
        border-top: 1px solid var(--glass-border);
    }
}

/* Contact */
.giant-text-sm {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 5rem);
    color: var(--text-muted);
    margin-bottom: clamp(10px, 2vw, 20px);
}

.giant-link {
    font-family: var(--font-display);
    font-size: clamp(1rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.2;
    position: relative;
    transition: 0.3s;
    word-break: break-word;
    padding: clamp(10px, 2vw, 20px);
}

.giant-link:hover {
    color: transparent;
    -webkit-text-stroke: 2px var(--text-color);
}

.center-all {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.footer-minimal {
    position: absolute;
    bottom: clamp(20px, 4vw, 40px);
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 20px);
    padding: 0 clamp(15px, 4vw, 40px);
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    text-transform: uppercase;
}

.social-lines a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: clamp(10px, 2vw, 20px);
}

/* HUD CONTROLS */
.hud-controls {
    position: fixed;
    bottom: clamp(15px, 4vw, 40px);
    left: clamp(15px, 4vw, 40px);
    display: flex;
    gap: clamp(8px, 1.5vw, 15px);
    z-index: 100;
}

.hud-btn {
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    border-radius: 50%;
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

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

.hud-btn.listening {
    background: var(--accent);
    animation: pulse 1.5s infinite;
}

.voice-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.voice-waves span {
    width: 3px;
    height: 0;
    background: #fff;
    border-radius: 2px;
    animation: wave 1.5s infinite ease-in-out;
}

.voice-waves span:nth-child(1) {
    animation-delay: 0s;
}

.voice-waves span:nth-child(2) {
    animation-delay: 0.2s;
}

.voice-waves span:nth-child(3) {
    animation-delay: 0.4s;
}

/* IDE Overlay */
.ide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

/* JARVIS CHAT UI */
.jarvis-window {
    position: fixed;
    bottom: 100px;
    /* Above the HUD */
    left: 40px;
    width: 300px;
    height: 400px;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-left: 2px solid var(--accent);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.jarvis-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
}

.jarvis-header {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.j-title {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.close-chat {
    cursor: pointer;
    color: var(--text-muted);
}

.jarvis-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jarvis-messages::-webkit-scrollbar {
    width: 4px;
}

.jarvis-messages::-webkit-scrollbar-thumb {
    background: var(--glass-border);
}

.message {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    line-height: 1.4;
    padding: clamp(6px, 1vw, 8px);
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid var(--glass-border);
}

.message.bot {
    align-self: flex-start;
    border-color: var(--accent);
}

.message.user {
    align-self: flex-end;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
    text-align: right;
}

.sender {
    display: block;
    font-size: clamp(0.5rem, 1vw, 0.6rem);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.jarvis-input {
    display: flex;
    border-top: 1px solid var(--glass-border);
}

#jarvis-text {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: clamp(10px, 2vw, 15px);
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.5vw, 0.8rem);
    outline: none;
}

#jarvis-send-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0 clamp(10px, 2vw, 15px);
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

#jarvis-send-btn:hover {
    background: #fff;
}

.ide-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ide-container {
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.ide-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border-right: 1px solid var(--glass-border);
}

.ide-header {
    padding: 15px 20px;
    background: #111;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.ide-dots {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.ide-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.ide-dots .close-ide {
    background: #ff5f57;
}

.ide-dots span:nth-child(2) {
    background: #febc2e;
}

.ide-dots span:nth-child(3) {
    background: #28c840;
}

.ide-filename {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.ide-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.line-numbers {
    padding: 20px;
    background: #111;
    color: #444;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    user-select: none;
}

#live-css-editor {
    flex: 1;
    background: #0a0a0a;
    color: var(--text-color);
    border: none;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    tab-size: 4;
}

.ide-info {
    width: 300px;
    padding: 30px;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ide-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.blink {
    color: #00ff41;
    animation: blink 1s infinite;
}

#close-ide-btn {
    padding: 12px 20px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

#close-ide-btn:hover {
    background: var(--accent);
    color: #000;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 59, 48, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

@keyframes wave {

    0%,
    100% {
        height: 30%;
    }

    50% {
        height: 100%;
    }
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* --- RESPONSIVE DESIGN --- */

/* Laptops & Tablets (max-width: 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 90%;
    }

    .giant-text {
        font-size: 11vw;
    }

    .hero-meta {
        width: 85%;
    }
}

/* Mobile & Tablets (max-width: 992px) */
@media (max-width: 992px) {
    .scene-header h2 {
        font-size: 2rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
    }

    .item-large,
    .item-tall,
    .item-box {
        grid-column: auto;
        grid-row: auto;
        height: 250px;
    }

    .editorial-layout {
        flex-direction: column;
        height: auto;
        gap: 30px;
    }

    .visual-img {
        position: relative;
        height: 100%;
    }
}

@media (max-width: 768px) {

    /* FORCED STABILITY: Overriding any remaining height locks from higher-up queries */
    .scene {
        height: auto !important;
        overflow: visible !important;
        padding: 60px 15px !important;
    }

    .editorial-layout {
        flex-direction: column !important;
        height: auto !important;
        gap: 20px !important;
    }

    .item-text h3 {
        font-size: 1.6rem !important;
    }

    .item-text .desc {
        max-width: 100% !important;
        font-size: 0.9rem !important;
    }

    .team-item {
        padding: 30px 20px !important;
    }

    .team-visuals {
        height: 350px !important;
        margin-top: 20px !important;
    }
}

/* Small Screens (max-width: 480px) */
@media (max-width: 480px) {
    .giant-text {
        font-size: 12vw;
    }

    .scene-header h2 {
        font-size: 1.8rem;
    }
}
/* --- OFFLINE MODE INDICATORS --- */
.offline-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 165, 0, 0.9);
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

.offline-indicator.active {
    display: flex;
}

.offline-indicator.online {
    background: rgba(0, 255, 65, 0.9);
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Model Download Progress */
.model-progress {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 280px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 10px;
    font-family: var(--font-mono);
}

.model-progress.active {
    display: flex;
}

.model-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.model-progress-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-progress-title i {
    color: var(--accent);
    animation: pulse 1s infinite;
}

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

.model-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.model-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff6b5b);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.model-progress-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Jarvis Offline Badge */
.jarvis-header .offline-badge {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    margin-left: 10px;
    display: none;
}

.jarvis-header .offline-badge.active {
    display: inline-block;
}

/* HUD Button States */
#jarvis-trigger.offline-ready::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #00ff41;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}

#jarvis-trigger.model-loading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ffa500;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
    animation: pulse 1s infinite;
}

/* Error Toast Enhancement */
.error-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 59, 48, 0.95);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.error-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.error-toast.info {
    background: rgba(0, 150, 255, 0.95);
}

.error-toast.success {
    background: rgba(0, 200, 100, 0.95);
}

/* Offline Download Button in Jarvis */
.jarvis-input .offline-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jarvis-input .offline-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.jarvis-input .offline-btn.cached {
    border-color: #00ff41;
    color: #00ff41;
}

.jarvis-input .offline-btn.cached i::before {
    content: "\f00c";
}

/* ==================== COMPREHENSIVE RESPONSIVE STYLES ==================== */

/* Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
    .floating-nav {
        right: 20px;
        gap: 15px;
    }
    
    .fixed-cta {
        right: 20px;
        top: 20px;
        font-size: 0.8rem;
    }
    
    .giant-text {
        font-size: 12vw;
    }
    
    .giant-text-sm {
        font-size: 8vw;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .hero-bottom {
        flex-direction: column;
        gap: 20px;
    }
    
    .jarvis-container {
        max-width: 100%;
        width: 95%;
    }
}

/* Mobile Landscape & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    /* Hide floating nav on mobile - use scroll instead */
    .floating-nav {
        display: none;
    }
    
    .fixed-cta {
        position: fixed;
        top: 15px;
        right: 15px;
        font-size: 0.7rem;
        padding: 8px 12px;
        background: rgba(0,0,0,0.8);
        border-radius: 4px;
    }
    
    .giant-text {
        font-size: 14vw;
    }
    
    .giant-text-sm {
        font-size: 10vw;
    }
    
    .scene {
        padding: 60px 15px;
        min-height: auto;
    }
    
    .scene-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .scene-header h2 {
        font-size: 1.5rem;
    }
    
    /* Hero Section */
    .hero-bottom {
        flex-direction: column;
        gap: 15px;
        padding: 0 10px;
    }
    
    .hero-cta {
        font-size: 0.8rem;
        padding: 12px 24px;
    }
    
    /* Projects Grid */
    .bento-grid {
        column-count: 1 !important;
        gap: 15px;
    }
    
    .bento-item {
        margin-bottom: 15px;
    }
    
    .p-content h3 {
        font-size: 1.1rem;
    }
    
    .p-content p {
        font-size: 0.8rem;
    }
    
    /* J.A.R.V.I.S Panel */
    .jarvis-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        border-radius: 12px;
    }
    
    .jarvis-header {
        padding: 10px 15px;
    }
    
    .jarvis-header span {
        font-size: 0.7rem;
    }
    
    .jarvis-messages {
        max-height: 150px;
        padding: 10px;
    }
    
    .jarvis-input {
        padding: 10px;
        gap: 8px;
    }
    
    .jarvis-input input {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
    
    .jarvis-input button {
        width: 40px;
        height: 40px;
    }
    
    /* Contact Section */
    .giant-link {
        font-size: 1.2rem;
        word-break: break-all;
    }
    
    .footer-minimal {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .social-lines {
        gap: 20px;
    }
    
    .social-lines a {
        font-size: 0.9rem;
    }
    
    /* GitHub Stats */
    .github-stats img {
        width: 100%;
        height: auto;
    }
}

/* Mobile Portrait (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .giant-text {
        font-size: 16vw;
    }
    
    .giant-text-sm {
        font-size: 12vw;
    }
    
    .scene {
        padding: 40px 10px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .fixed-cta {
        font-size: 0.65rem;
        padding: 6px 10px;
    }
    
    /* Hero adjustments */
    .hero-bottom {
        padding: 0;
    }
    
    .hero-tagline {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    .hero-cta {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    /* Scene headers */
    .scene-header h2 {
        font-size: 1.3rem;
    }
    
    .scene-header span {
        font-size: 0.7rem;
    }
    
    /* Projects */
    .p-content {
        padding: 15px;
    }
    
    .p-content h3 {
        font-size: 1rem;
    }
    
    /* Team section */
    .solo-profile {
        padding: 25px 15px;
    }
    
    .profile-photo {
        width: 80px;
        height: 80px;
    }
    
    .profile-info h3 {
        font-size: 1.3rem;
    }
    
    .profile-info .role {
        font-size: 0.75rem;
    }
    
    .profile-stats {
        gap: 15px;
    }
    
    .stat-item .number {
        font-size: 1.3rem;
    }
    
    .stat-item .label {
        font-size: 0.6rem;
    }
    
    /* J.A.R.V.I.S Panel - Compact */
    .jarvis-container {
        bottom: 5px;
        left: 5px;
        right: 5px;
        border-radius: 10px;
    }
    
    .jarvis-header {
        padding: 8px 12px;
    }
    
    .jarvis-header span {
        font-size: 0.65rem;
    }
    
    .jarvis-messages {
        max-height: 120px;
        padding: 8px;
    }
    
    .jarvis-message {
        font-size: 0.75rem;
        padding: 6px 10px;
        max-width: 90%;
    }
    
    .jarvis-input {
        padding: 8px;
        gap: 6px;
    }
    
    .jarvis-input input {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
    
    .jarvis-input button {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .jarvis-input .offline-btn {
        padding: 0 8px;
        font-size: 0.7rem;
    }
    
    /* Contact */
    .giant-link {
        font-size: 1rem;
        padding: 10px;
    }
    
    .final-scene h2 {
        font-size: 10vw;
    }
    
    /* Loader */
    .loader-center {
        width: 200px;
    }
    
    .brand-reveal {
        font-size: 2rem;
    }
}

/* Extra Small Devices (max-width: 360px) */
@media (max-width: 360px) {
    .giant-text {
        font-size: 18vw;
    }
    
    .giant-text-sm {
        font-size: 14vw;
    }
    
    .fixed-cta {
        display: none;
    }
    
    .jarvis-container {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 10px 10px 0 0;
    }
    
    .jarvis-messages {
        max-height: 100px;
    }
    
    .giant-link {
        font-size: 0.85rem;
    }
}

/* Landscape Mode Fix */
@media (max-height: 500px) and (orientation: landscape) {
    .scene {
        min-height: auto;
        padding: 30px 15px;
    }
    
    .jarvis-container {
        max-height: 200px;
    }
    
    .jarvis-messages {
        max-height: 80px;
    }
    
    .giant-text {
        font-size: 10vw;
    }
}
