/* =========================================
   MINIMALIST BLACK & WHITE PORTFOLIO
   ========================================= */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* =========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================= */
:root {
    /* Strict Color System */
    --primary-bg: #eaf2ef;
    --secondary-color: #912f56;

    /* Utility & Compat */
    --black: #000000;
    --white: #FFFFFF;
    --text-color: #000000;
    --heading-color: #000000;

    /* Grays scale (Keep for utility) */
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 4.5rem;
    --text-7xl: 6rem;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    --space-32: 128px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
}

/* =========================================
   CSS RESET
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-bg);
    min-height: 100vh;
    /* Ensure full height */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

#scroll-container {
    background-color: transparent;
    position: relative;
    z-index: 5;
    /* Ensure above particles */
}

#global-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-6xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

p {
    margin-bottom: var(--space-4);
    color: var(--gray-600);
}

.text-accent {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray-500);
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-24) 0;
    position: relative;
    z-index: 10;
}

.section.skills {
    padding-top: var(--space-12);
}

@media (max-width: 900px) {
    .section {
        padding: var(--space-8) 0;
    }

    .section.skills {
        padding-top: var(--space-4);
    }
}

.section-dark {
    background-color: var(--primary-bg);
    /* Overridden from black */
    color: var(--text-color);
}

.section-dark p {
    color: var(--gray-400);
}

.section-gray {
    background-color: var(--gray-100);
}

/* =========================================
   UTILITY SPACING
   ========================================= */
.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mt-20 {
    margin-top: 5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.pt-32 {
    padding-top: 8rem;
}

.pb-16 {
    padding-bottom: 4rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.flex {
    display: flex;
}

.text-center {
    text-align: center;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-widest {
    letter-spacing: 0.25em;
}

.text-white {
    color: #fff;
}

.text-black {
    color: #000;
}

.text-gray-400 {
    color: #a3a3a3;
}

.text-gray-500 {
    color: #737373;
}

.text-sm {
    font-size: 0.875rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-bold {
    font-weight: 700;
}

.font-light {
    font-weight: 300;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 8px;
    transition: all var(--transition-base);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--black);
    border-color: var(--black);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(145, 47, 86, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-outline:hover {
    background-color: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-white {
    background-color: var(--white);
    color: var(--black);
    border: 2px solid rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
    background-color: var(--black);
    color: var(--white);
    border-color: var(--black);
    transform: translateY(-2px);
}

/* Dark Theme Button Overrides */
.theme-dark .btn-outline {
    color: #fff;
    border-color: #fff;
}

.theme-dark .btn-outline:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.theme-dark .btn-primary:hover {
    background-color: #fff;
    border-color: #fff;
    color: #000;
}

.theme-dark .btn-white {
    background-color: #fff;
    color: #000;
    border: 2px solid #fff;
}

.theme-dark .btn-white:hover {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

/* Dark Theme Cursor Override */
.theme-dark {
    cursor: none;
}

.theme-dark .cursor--small {
    background: #fff !important;
}

.theme-dark .cursor--large {
    border-color: #fff !important;
}

/* Ensure text mode border stays transparent in dark theme */
.theme-dark .cursor.is-text-mode .cursor--large {
    border-color: transparent !important;
}

.theme-dark .cursor--text .text {
    color: #fff !important;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
    transform: translateY(-100%);
    /* Hidden by default */
}

/* Dark Nav -> Light Nav */
.nav.scrolled {
    transform: translateY(0);
    /* Reveal on scroll */
    background-color: rgba(234, 242, 239, 0.9);
    /* Light semi-transparent */
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav.scrolled .nav-link {
    color: var(--black);
}

.nav.scrolled .nav-logo {
    color: var(--black);
}

.nav.scrolled .nav-toggle span {
    background-color: var(--black);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--black);
    transition: color var(--transition-base);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--black);
    position: relative;
    padding: var(--space-2) 0;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-2);
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--black);
    transition: all var(--transition-base);
}

.nav.scrolled .nav-toggle span {
    background-color: var(--black);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* =========================================
   HERO SECTION (Antigravity Style)
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-align: center;
    background-color: transparent;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    margin-top: 0;
    /* Remove gap for continuous flow */
    z-index: 10;
    /* Above global particles */
}

.hero-antigravity canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.hero-content>* {
    pointer-events: auto;
}

/* Badge */
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: #F1F3F4;
    /* Google light gray */
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    margin-bottom: var(--space-6);
    letter-spacing: 0.02em;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

/* Typography */
.hero-title {
    display: flex;
    flex-direction: column;
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: var(--space-8);
    color: var(--black);
    /* Ensure black text */
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.font-bold {
    font-weight: 700;
}

.font-light {
    font-weight: 300;
    color: var(--gray-500);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

/* CTA */
.hero-cta {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.btn-black {
    background-color: var(--black);
    color: var(--white);
    border: none;
}

.btn-black:hover {
    background-color: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-rounded {
    border-radius: 50px;
    padding: 12px 32px;
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0.02em;
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: var(--space-10);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    animation: fadeInUp 1s ease 1s forwards;
    opacity: 0;
    z-index: 2;
}

.hero-scroll span {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--gray-400);
}

.hero-scroll-icon {
    width: 24px;
    height: 40px;
    border: 2px solid var(--gray-400);
    border-radius: 12px;
    position: relative;
}

.hero-scroll-icon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--gray-400);
    border-radius: 2px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* =========================================
   ABOUT ME (Redesign)
   ========================================= */

.about {
    position: relative;
    z-index: 10;
    padding: var(--space-20) 0;
    /* More breathing room */
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-20);
    align-items: start;
}

/* --- Image Frame --- */
.about-image-wrapper {
    position: relative;
    padding-top: var(--space-10);
}

.about-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform-style: preserve-3d;
}

.about-frame img {
    width: 100%;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.about-frame:hover img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

/* Offset Accent Border */
.about-frame::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--secondary-color);
    border-radius: 24px;
    z-index: -1;
    transition: transform 0.4s ease;
}

.about-frame:hover::after {
    transform: translate(10px, 10px);
}

/* --- Content Card --- */
.about-card {
    background: rgba(255, 255, 255, 0.5);
    /* Glassy base */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    padding: var(--space-10);
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: var(--space-6);
    display: block;
}

.about-card h2 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--black);
}

.highlight {
    color: var(--secondary-color);
    font-style: italic;
    font-weight: 500;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: var(--space-4);
    max-width: 90%;
}

/* --- Pill Tags --- */
.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: var(--space-8) 0;
}

.tag-pill {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(145, 47, 86, 0.2);
    /* Low opacity secondary */
    color: var(--gray-700);
    transition: all 0.3s ease;
}

.tag-pill:hover {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- Stat Cards --- */
.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.stat-card {
    background: var(--white);
    padding: var(--space-4) var(--space-5);
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    font-size: var(--text-2xl);
    color: var(--secondary-color);
    margin-bottom: var(--space-1);
    font-weight: 700;
}

.stat-card p {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0;
    letter-spacing: 0.05em;
}

/* ── Image overlay (hidden on desktop) ── */
.about-img-overlay {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .about {
        padding: var(--space-10) 0 var(--space-16);
        background: var(--primary-bg);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    /* ── Shrinkable image wrapper ── */
    .about-image-wrapper {
        padding: 0 var(--space-5);
        max-width: 100%;
        margin: 0 auto;
        height: auto;
        width: 100%;
        position: relative;
        transition: transform 0.55s cubic-bezier(0.19, 1, 0.22, 1);
        transform-origin: top center;
    }

    .about-image-wrapper.shrunk {
        transform: scale(0.8);
    }

    .about-frame {
        border-radius: 20px;
        width: 100%;
        height: auto;
        margin: 0;
        overflow: hidden;
        box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
        position: relative;
    }

    .about-frame img {
        height: auto;
        width: 100%;
        aspect-ratio: 3/4;
        object-fit: cover;
        object-position: center 8%;
        filter: brightness(0.72);
        display: block;
    }

    .about-frame::after {
        display: none;
    }

    /* ── Overlay text on image ── */
    .about-img-overlay {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: absolute;
        inset: 0;
        padding: 18px 16px;
        pointer-events: none;
        color: #fff;
        font-family: 'Inter', sans-serif;
    }

    .aio-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }

    .aio-top span {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        opacity: 0.9;
    }

    .aio-mid {
        text-align: center;
        margin-bottom: auto;
        /* pushes it toward top-center */
        padding-top: 12px;
    }

    .aio-mid span {
        display: block;
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        opacity: 0.7;
        line-height: 1.7;
    }

    .aio-accent {
        color: var(--secondary-color) !important;
        opacity: 1 !important;
    }

    .aio-bottom {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
    }

    .aio-stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
    }

    .aio-num {
        font-size: 17px;
        font-weight: 800;
        letter-spacing: -0.02em;
    }

    .aio-lbl {
        font-size: 7px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        opacity: 0.6;
    }

    /* ── Bio / card below ── */
    .about-content-wrapper {
        margin-top: 0;
        position: relative;
        z-index: 5;
        min-height: unset;
        padding: 0 var(--space-3);
        background: transparent;
        display: block;
    }

    .about-card {
        padding: var(--space-6);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.65);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.8);
        margin-top: 0;
    }

    .section-label {
        color: var(--secondary-color);
    }

    .about-card h2 {
        font-size: clamp(1.8rem, 9vw, 2.8rem);
        color: var(--black);
        line-height: 1.05;
        letter-spacing: -0.03em;
        margin-bottom: var(--space-5);
        word-wrap: break-word;
    }

    .about-card h2 .highlight {
        font-style: italic;
        color: var(--secondary-color);
        display: inline;
    }

    .about-text {
        font-size: 1rem;
        max-width: 100%;
        color: var(--gray-700);
        font-weight: 400;
        line-height: 1.65;
    }

    .about-tags {
        margin: var(--space-5) 0;
    }

    .tag-pill {
        border-color: rgba(145, 47, 86, 0.25);
        background: rgba(255, 255, 255, 0.85);
        color: var(--gray-700);
    }

    /* hide stat cards on mobile - shown on image overlay instead */
    .about-stats {
        display: none;
    }

    /* Stacked paragraph scroll-up effect */
    .about-para-stack {
        position: relative;
        overflow: hidden;
        min-height: 5.5rem;
    }

    .about-para-stack .about-text {
        transition: transform 0.65s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
    }

    .about-para-stack .about-text.para-second {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        transform: translateY(120%);
        opacity: 0;
    }

    .about-para-stack.revealed .about-text:first-child {
        transform: translateY(-110%);
        opacity: 0;
    }

    .about-para-stack.revealed .about-text.para-second {
        transform: translateY(0);
        opacity: 1;
    }

    .stat-card h3 {
        color: var(--secondary-color);
    }
}

.stat-item h3 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-2);
}

.stat-item p {
    font-size: var(--text-sm);
    margin-bottom: 0;
}

/* =========================================
   PORTFOLIO SECTION
   ========================================= */
.portfolio {
    background-color: transparent;
}

.portfolio-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.portfolio-header .text-accent {
    margin-bottom: var(--space-4);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    background-color: var(--white);
    aspect-ratio: 4/3;
    cursor: none;
}

/* =========================================
   NEW IMMERSIVE PROJECT STYLES
   "Beautiful & Intrusive"
   ========================================= */

/* Intrusive Typography */
.intrusive-title {
    font-size: clamp(4rem, 15vw, 12rem);
    line-height: 0.8;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--black);
    mix-blend-mode: exclusion;
    pointer-events: none;
    z-index: 10;
}

.intrusive-subtitle {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-4);
}

/* Fullscreen Immersive Hero */
.project-immersive-hero {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-10);
}

.project-immersive-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.8) contrast(1.1);
    transform: scale(1.1);
    /* For parallax */
}

.project-immersive-hero .hero-content-layer {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    /* Default for hero overlay */
    mix-blend-mode: normal;
}

/* Collage / Scroll Section */
.collage-section {
    padding: var(--space-32) 0;
    background-color: var(--white);
    position: relative;
    z-index: 5;
}

.collage-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-8);
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.collage-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.collage-item:hover {
    transform: scale(1.02);
    z-index: 20;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Example Collage Layouts */
.col-span-4 {
    grid-column: span 4;
}

.col-span-6 {
    grid-column: span 6;
}

.col-span-8 {
    grid-column: span 8;
}

.col-span-12 {
    grid-column: span 12;
}

/* Sticky Description Section */
.sticky-scroll-container {
    display: flex;
    min-height: 200vh;
    position: relative;
}

.sticky-content {
    width: 35%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-10);
    background: var(--primary-bg);
    z-index: 10;
}

.scroll-visuals {
    width: 65%;
    padding: var(--space-10);
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
    background: var(--white);
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-8);
    border-radius: 24px;
}

/* Dark Mode Overrides for specific projects */
.theme-dark {
    --primary-bg: #0a0a0a;
    --text-color: #ffffff;
    --heading-color: #ffffff;
    --gray-600: #a3a3a3;
    --black: #ffffff;
    /* Invert black utility for text */
    background-color: #0a0a0a;
    color: #ffffff;
}

.theme-dark .nav:not(.scrolled) .nav-link {
    color: #ffffff;
}

/* Disable system hand */


.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h4 {
    color: var(--white);
    margin-bottom: var(--space-2);
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay h4 {
    transform: translateY(0);
}

.portfolio-overlay p {
    color: var(--gray-400);
    font-size: var(--text-sm);
    margin-bottom: 0;
    transform: translateY(20px);
    transition: transform var(--transition-base) 0.1s;
}

.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

/* Featured Projects */
.portfolio-featured {
    margin-top: var(--space-16);
}

.featured-project {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-8);
    /* Reduced from 12 */
    align-items: center;
    padding: var(--space-8) 0;
    /* Reduced from 12 */
    border-top: 1px solid var(--gray-200);
    max-width: 1000px;
    /* Compact constraint */
    margin: 0 auto;
    /* Center */
}

.featured-project:nth-child(even) {
    direction: rtl;
}

.featured-project:nth-child(even)>* {
    direction: ltr;
}

.featured-image {
    overflow: hidden;
    background-color: var(--white);
}

.featured-image img {
    width: 100%;
    transition: transform var(--transition-slow);
}

.featured-image:hover img {
    transform: scale(1.03);
}

.featured-content .text-accent {
    margin-bottom: var(--space-4);
}

.featured-content h3 {
    margin-bottom: var(--space-4);
}

.featured-content p {
    margin-bottom: var(--space-6);
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.tag {
    padding: var(--space-1) var(--space-3);
    background-color: transparent;
    border: 1px solid var(--white);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white);
}

/* =========================================
   SKILLS SECTION (Liquid Glass)
   ========================================= */
.skills-glass {
    position: relative;
    background-color: transparent;
    color: var(--black);
    overflow: hidden;
    padding: 160px 0;
    /* Breathing room */
}

/* Canvas Layer */
#skills-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.relative-z10 {
    position: relative;
    z-index: 10;
}

/* Glass Panel  */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    /* Ultra transparent */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 32px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Crisper border */
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 24px 60px -12px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    max-width: 1000px;
    margin: 0 auto;
}

/* Background Texture for Glass Visibility */
.skills-glass::before {
    display: none;
}

.skills-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.skills-header h2 {
    color: var(--black);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.skills-header .text-accent {
    color: var(--gray-500);
    margin-bottom: 8px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns for single row */
    gap: 20px;
    /* Tighter gap */
}

.skill-category h4 {
    color: var(--black) !important;
    margin-bottom: var(--space-4);
}

.skill-list li {
    color: var(--gray-600) !important;
    margin-bottom: var(--space-2);
}

/* Base style for duplicate grids (Hidden on Desktop) */
.skills-grid:nth-child(n+2) {
    display: none;
}

/* Footer Redesign */
.footer {
    background-color: transparent !important;
    color: var(--black);
    padding: var(--space-8) 0;
    position: relative;
    z-index: 10;
    margin-top: 0;
    /* Prevent overlap issues */
}

.footer-layout {
    display: grid;
    gap: var(--space-12);
}

.footer-top {
    text-align: left;
}

.footer-email {
    color: var(--black);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-email:hover {
    opacity: 0.7;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-8);
    border-top: 1px solid rgba(0, 0, 0, 0);
    padding-top: var(--space-8);
}

.contact-info {
    margin-top: var(--space-10);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Desktop Alignment Fix: Make labels fixed width if side-by-side, 
   but user design shows "Label" then "Value" stacked or side? 
   The image showed "Label   Value". 
   Let's use CSS Grid for strict alignment like the image requested. 
*/
.contact-info-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    /* Fixed label width for alignment */
    align-items: center;
}

.contact-info-item span {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray-400);
    /* Muted label */
    font-weight: 500;
}

.contact-info-item p,
.contact-info-item a {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--black);
    /* Fix: Visible on Light Background */
    margin: 0;
    text-decoration: none;
}

.footer-social a {
    /* Keep social icons white (if links are used) or inherit */
    color: var(--white);
}

.footer-social {
    display: flex;
    gap: var(--space-6);
    /* Spacing between icons */
}

.footer-social svg {
    fill: var(--black);
    transition: opacity 0.3s ease;
    width: 20px;
    height: 20px;
}

.footer-social a:hover svg {
    opacity: 0.7;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-8);
    font-size: 0.9rem;
    color: var(--gray-500);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
}

.skill-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    color: var(--black);
    opacity: 0.9;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    font-size: 0.95rem;
    color: var(--black);
    opacity: 0.6;
    margin-bottom: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding-left: 0;
}

.skill-list li::before {
    display: none;
    /* Clean look */
}

.skill-list li:hover {
    opacity: 1;
    color: #007AFF;
    /* Apple Blue */
    transform: translateX(4px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .glass-panel {
        padding: 30px;
        backdrop-filter: blur(16px);
    }

    .skills-glass {
        padding: 100px 0;
    }

    .skills-grid {
        gap: 32px;
    }
}



/* =========================================
/* =========================================
   CONTACT SECTION (Compact Strip)
   ========================================= */
.contact {
    padding: var(--space-24) 0;
    position: relative;
    z-index: 5;
    background: transparent;
    /* STRICTLY TRANSPARENT */
}

.contact-compact-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-12);
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Left: Text --- */
.contact-text {
    flex: 0 0 40%;
}

.contact-text .section-label {
    display: block;
    margin-bottom: var(--space-4);
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: var(--text-sm);
}

.contact-text h2 {
    font-size: var(--text-5xl);
    line-height: 1.1;
    margin-bottom: var(--space-8);
    font-weight: 700;
}

.contact-direct-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.contact-direct-links a {
    font-size: var(--text-lg);
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.contact-direct-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.contact-direct-links a:hover::after {
    width: 100%;
}

.contact-direct-links p {
    color: var(--gray-500);
    margin: 0;
}

/* --- Right: Compact Form --- */
.compact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    background: transparent;
    /* No container bg */
}

/* Floating Label Inputs */
.form-group-floating {
    position: relative;
    padding-top: 15px;
    /* Space for label */
}

.form-group-floating input,
.form-group-floating textarea {
    width: 100%;
    padding: 15px 0;
    /* Underline style */
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: var(--black);
    transition: all 0.3s ease;
}

.form-group-floating textarea {
    min-height: 80px;
    resize: none;
}

.form-group-floating label {
    position: absolute;
    top: 25px;
    /* Center in input */
    left: 0;
    font-size: var(--text-base);
    color: var(--gray-400);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Focus States */
.form-group-floating input:focus,
.form-group-floating textarea:focus,
.form-group-floating input:not(:placeholder-shown),
.form-group-floating textarea:not(:placeholder-shown) {
    border-bottom-color: var(--secondary-color);
    outline: none;
}

/* Move Label Up */
.form-group-floating input:focus~label,
.form-group-floating textarea:focus~label,
.form-group-floating input:not(:placeholder-shown)~label,
.form-group-floating textarea:not(:placeholder-shown)~label {
    top: 0;
    font-size: var(--text-xs);
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compact-form .btn {
    align-self: flex-start;
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-10);
    border-radius: 50px;
    /* Pill button */
}

/* =========================================
   FOOTER (Simplified)
   ========================================= */
.footer {
    padding: var(--space-6) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    opacity: 0.8;
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .contact-compact-wrapper {
        flex-direction: column;
        gap: var(--space-10);
    }

    .contact-text {
        flex: auto;
        text-align: center;
    }

    .contact-text h2 br {
        display: none;
    }

    .contact-direct-links {
        align-items: center;
    }
}

.footer-social {
    display: flex;
    gap: var(--space-6);
}

.footer-social a {
    color: var(--gray-500);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color var(--transition-fast);
}

.footer-social a:hover {
    color: var(--black);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: 0;
}

.footer-bottom nav {
    display: flex;
    gap: var(--space-6);
}

.footer-bottom a {
    font-size: var(--text-sm);
    color: var(--gray-500);
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active,
.reveal.is-inview {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --text-6xl: 3.5rem;
        --text-7xl: 4.5rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-project {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .featured-project:nth-child(even) {
        direction: ltr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
        --text-7xl: 3.5rem;
        --nav-height: 70px;
    }


    /* Fix: Ensure nav links remain black on mobile even when scrolled */
    .nav.scrolled .nav-menu {
        background-color: rgba(234, 242, 239, 0.95);
        /* Light with slight translucency */
        backdrop-filter: blur(10px);
    }

    .nav.scrolled .nav-toggle span {
        background-color: var(--black);
        /* Toggle button stays black when nav is white */
    }

    /* When menu is active (open), ensure toggle turns white to be visible on black menu */
    .nav-toggle.active span {
        background-color: var(--white) !important;
    }

    /* PREMIUM MOBILE MENU REDESIGN (Refined) */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(234, 242, 239, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding-left: var(--space-8);
        gap: var(--space-6);
        transition: right 0.5s cubic-bezier(0.7, 0, 0.3, 1);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .nav-link {
        font-family: var(--font-display);
        font-size: 2rem;
        /* Reduced from 3rem for cleaner look */
        font-weight: 400;
        color: var(--black) !important;
        /* Force black text */
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
    }

    /* Staggered Animation on Open */
    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu.active li:nth-child(1) .nav-link {
        transition-delay: 0.1s;
    }

    .nav-menu.active li:nth-child(2) .nav-link {
        transition-delay: 0.15s;
    }

    .nav-menu.active li:nth-child(3) .nav-link {
        transition-delay: 0.2s;
    }

    .nav-menu.active li:nth-child(4) .nav-link {
        transition-delay: 0.25s;
    }

    .nav-menu.active li:nth-child(5) .nav-link {
        transition-delay: 0.3s;
    }

    /* Decorative Index Numbers */
    .nav-menu li {
        counter-increment: menu-counter;
        position: relative;
    }

    .nav-menu .nav-link::before {
        content: "0" counter(menu-counter);
        font-family: var(--font-body);
        font-size: 0.9rem;
        color: var(--gray-500);
        position: absolute;
        top: 4px;
        /* Align with top of text */
        left: -30px;
        opacity: 0;
        transform: translateX(-10px);
        transition: all 0.4s ease 0.2s;
    }

    .nav-menu.active .nav-link::before {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
        z-index: 1002;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .about-image::before {
        display: none;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        text-align: center;
    }

    /* Feature: Horizontal Scroll for 'Featured Projects' (Thumbnails) */
    .portfolio-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-4);
        padding-bottom: var(--space-4);
        margin: 0 calc(-1 * var(--space-6));
        /* Bleed */
        padding-left: var(--space-6);
        padding-right: var(--space-6);
        -webkit-overflow-scrolling: touch;
        /* Updated: Removed strict touch-action to allow vertical scroll */
        /* touch-action: pan-x; */
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        min-width: 280px;
        /* Large cards */
        aspect-ratio: 4/5;
        /* Taller on mobile looks better */
        scroll-snap-align: center;
        border-radius: 20px;
        /* Rounded corners */
        overflow: hidden;
    }

    /* Refinement: Always show text on mobile */
    .portfolio-overlay {
        opacity: 1 !important;
        background: rgba(234, 242, 239, 0.9);
        /* Light Overlay using primary bg color */
    }

    .portfolio-overlay h4,
    .portfolio-overlay p {
        transform: translateY(0) !important;
    }

    /* Feature: Infinite Skills Marquee */
    /* Mobile Styles for Marquee */
    .skills-glass {
        padding: 100px 0;
        overflow: hidden;
        /* Hide overflow for marquee */
    }

    .skills-marquee {
        display: flex;
        width: 100%;
        overflow-x: auto;
        /* Allow manual scroll */
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .skills-marquee::-webkit-scrollbar {
        display: none;
    }

    /* Pause animation on interaction (touch/hover) */
    .skills-marquee:active .skills-grid,
    .skills-marquee:hover .skills-grid,
    .skills-marquee:focus-within .skills-grid {
        animation-play-state: paused;
    }

    /* Fix: Ensure marquee items are visible (override scroll reveal) */
    .skills-marquee .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .skills-grid {
        display: flex;
        /* Row layout */
        flex-shrink: 0;
        min-width: 100%;
        gap: var(--space-8);
        padding-right: var(--space-8);
        /* Buffer between loops */
        animation: scrollMarquee 25s linear infinite;
        grid-template-columns: none;
        /* Reset grid */
    }

    .skills-grid:nth-child(n+2) {
        display: flex;
        /* Show all duplicates on mobile */
    }

    .skill-category {
        min-width: 250px;
        padding-right: var(--space-4);
    }

    .skill-category h4 {
        /* Inherits global white */
        margin-bottom: var(--space-4);
    }

    .skill-list li {
        /* Inherits global gray */
        margin-bottom: var(--space-2);
    }



    /* Animation Keyframes */
    @keyframes scrollMarquee {
        from {
            transform: translateX(0);
        }

        to {
            transform: translateX(-100%);
        }
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    /* Hide contact info on mobile (User Request) */
    .contact-info {
        display: none !important;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-6);
        text-align: center;
    }

    /* =========================================
       MOBILE FOOTER - COMPACT REDESIGN
       ========================================= */
    .footer {
        padding: 40px 20px !important;
        /* Tight mobile padding */
    }

    .footer-layout {
        display: flex;
        flex-direction: column;
        gap: var(--space-6);
        /* Reduced from space-8 */
        width: 100%;
        overflow-x: hidden;
    }

    .footer-top {
        text-align: center;
    }

    .footer-top h2 {
        font-size: 1.5rem;
        /* Smaller heading */
        margin-bottom: var(--space-3);
        display: none;
        /* Hide "Let's Start a Project" on mobile */
    }

    .footer-email {
        font-size: 1rem;
        /* Smaller email */
        word-break: break-all;
        display: block;
        text-align: center;
    }

    .footer-info {
        display: flex;
        flex-direction: column;
        gap: var(--space-4);
        /* Reduced gap */
        padding-top: var(--space-4);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .contact-info-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info-item span {
        display: none;
        /* Hide labels on mobile */
    }

    /* Social Icons - Inline Centered */
    .footer-social {
        display: flex;
        justify-content: center;
        gap: var(--space-4);
        flex-wrap: wrap;
    }

    .footer-social svg {
        width: 20px;
        height: 20px;
        fill: var(--black);
    }

    /* Footer Bottom - Compact */
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
        padding-top: var(--space-4);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .footer-bottom p {
        font-size: 0.75rem;
        margin: 0;
    }

    .footer-logo {
        font-size: 0.9rem;
    }

    /* =========================================
       MOBILE WORK SECTION - CARD BOX REDESIGN
       ========================================= */
    /* Hide Preview Panel on Mobile */
    .preview-panel {
        display: none !important;
    }

    /* Hide Tooltip on Mobile */
    .portfolio-tooltip {
        display: none !important;
    }

    /* Work Section Full Width */
    .portfolio-compact {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Calendar Grid - 3 Columns on Mobile */
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: var(--space-2) !important;
    }

    /* Project Card Boxes with Background Images - Mobile Only */
    .calendar-item {
        aspect-ratio: 1 !important;
        border-radius: 10px !important;
        position: relative;
        overflow: hidden;
        background-size: 80% !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-color: rgba(145, 47, 86, 0.08) !important;
        border: 1px solid rgba(0, 0, 0, 0.06);
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding-bottom: 8px !important;
        min-height: 0;
    }

    /* Remove Gradient Overlay on Mobile */
    .calendar-item::before {
        display: none;
    }

    /* Initials at Bottom with Background Color */
    .calendar-item span {
        position: relative;
        z-index: 2;
        font-size: var(--text-base) !important;
        font-weight: 600;
        color: var(--primary-bg) !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    /* Disable Hover Effects on Mobile */
    .calendar-item:hover {
        transform: none;
        box-shadow: none;
    }

    /* View All Box - Mobile Style */
    .view-all-box {
        background: var(--secondary-color);
    }

    .view-all-box::before {
        display: none;
    }

    /* =========================================
       MOBILE BOTTOM NAVIGATION
       ========================================= */
    /* Hide default nav completely on mobile */
    .nav {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        background: transparent;
        transform: none;
        z-index: 1000;
        padding: 0;
    }

    .nav.scrolled {
        transform: none;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        border: none;
    }

    .nav-container {
        justify-content: center;
        padding: var(--space-4);
    }

    /* Hide logo on mobile */
    .nav-logo {
        display: none;
    }

    /* Toggle Button - Small Square with Glass Effect */
    .nav-toggle {
        display: flex;
        position: fixed;
        bottom: var(--space-6);
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        padding: 0;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 50%;
        border: 1px solid rgba(0, 0, 0, 0.08);
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        z-index: 1002;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        visibility: hidden;
    }

    /* Show toggle after scrolling past hero */
    .nav-toggle.visible {
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle span {
        width: 18px;
        height: 2px;
        background-color: var(--black);
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .nav-toggle.active {
        background: #fff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .nav-toggle.active span {
        background-color: #111 !important;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
        width: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    /* Mobile Menu - Radial Layout Around Toggle */
    .nav-menu {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 150px !important;
        width: 100% !important;
        background: transparent !important;
        backdrop-filter: none !important;
        display: block !important;
        padding: 0 !important;
        z-index: 1001 !important;
        border: none !important;
        pointer-events: none;
        transform: none !important;
    }

    .nav-menu.active {
        pointer-events: auto;
    }

    .nav-menu li {
        position: absolute;
        opacity: 0;
        transform: scale(0.5);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: scale(1);
    }

    /* Position each button: 2 left, 1 top, 2 right - ALL AROUND THE CENTER TOGGLE */
    /* Far left button - same level as toggle */
    .nav-menu li:nth-child(1) {
        bottom: 28px;
        left: 10px;
        transition-delay: 0.05s;
    }

    /* Left-upper button */
    .nav-menu li:nth-child(2) {
        bottom: 75px;
        left: 50px;
        transition-delay: 0.1s;
    }

    /* Top center button - directly above toggle */
    .nav-menu li:nth-child(3) {
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%) scale(0.5);
        transition-delay: 0.15s;
    }

    .nav-menu.active li:nth-child(3) {
        transform: translateX(-50%) scale(1);
    }

    /* Right-upper button */
    .nav-menu li:nth-child(4) {
        bottom: 75px;
        right: 50px;
        transition-delay: 0.2s;
    }

    /* Far right button - same level as toggle */
    .nav-menu li:nth-child(5) {
        bottom: 28px;
        right: 10px;
        transition-delay: 0.25s;
    }

    .nav-menu .nav-link {
        font-family: var(--font-body);
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--black) !important;
        padding: var(--space-2) var(--space-4);
        border-radius: 999px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        transition: all 0.3s ease;
        display: block;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-menu .nav-link:active {
        background: var(--secondary-color);
        color: var(--white) !important;
        transform: scale(0.95);
    }

    /* Remove any decoration */
    .nav-menu .nav-link::before {
        display: none;
    }

    /* =========================================
       MOBILE PERFORMANCE OPTIMIZATIONS
       ========================================= */
    /* Disable parallax scroll effects */
    [data-scroll-speed] {
        transform: none !important;
    }

    /* Reduce shadow complexity */
    .about-card,
    .glass-panel,
    .preview-glass {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    /* Simplify backdrop-filter where not essential */
    .about-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Reduce animation intensity */
    .reveal {
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    /* =========================================
       MOBILE HERO SECTION
       ========================================= */
    .hero {
        min-height: 90vh;
        /* Avoid 100vh scroll issues */
        padding: var(--space-12) 0;
    }

    .hero-title {
        font-size: 2.5rem;
        /* Smaller on mobile */
    }

    .hero-badge {
        font-size: 11px;
        padding: 4px 12px;
    }

    .hero-scroll {
        bottom: var(--space-6);
    }

    /* Hide scroll indicator on very small screens */
    @media (max-height: 600px) {
        .hero-scroll {
            display: none;
        }
    }

    /* =========================================
       OTHER MOBILE FIXES
       ========================================= */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .about-image::before {
        display: none;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        text-align: center;
    }

    /* Feature: Horizontal Scroll for 'Featured Projects' (Thumbnails) */
    .portfolio-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-4);
        padding-bottom: var(--space-4);
        margin: 0 calc(-1 * var(--space-6));
        padding-left: var(--space-6);
        padding-right: var(--space-6);
        -webkit-overflow-scrolling: touch;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        min-width: 280px;
        aspect-ratio: 4/5;
        scroll-snap-align: center;
        border-radius: 20px;
        overflow: hidden;
    }

    .portfolio-overlay {
        opacity: 1 !important;
        background: rgba(234, 242, 239, 0.9);
    }

    .portfolio-overlay h4,
    .portfolio-overlay p {
        transform: translateY(0) !important;
    }

    /* Skills Marquee */
    .skills-glass {
        padding: 80px 0;
        overflow: hidden;
    }

    .skills-marquee {
        display: flex;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .skills-marquee::-webkit-scrollbar {
        display: none;
    }

    .skills-marquee:active .skills-grid,
    .skills-marquee:hover .skills-grid,
    .skills-marquee:focus-within .skills-grid {
        animation-play-state: paused;
    }

    .skills-marquee .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .skills-grid {
        display: flex;
        flex-shrink: 0;
        min-width: 100%;
        gap: var(--space-8);
        padding-right: var(--space-8);
        animation: scrollMarquee 25s linear infinite;
        grid-template-columns: none;
    }

    .skills-grid:nth-child(n+2) {
        display: flex;
    }

    .skill-category {
        min-width: 250px;
        padding-right: var(--space-4);
    }

    .skill-category h4 {
        margin-bottom: var(--space-4);
    }

    .skill-list li {
        margin-bottom: var(--space-2);
    }

    @keyframes scrollMarquee {
        from {
            transform: translateX(0);
        }

        to {
            transform: translateX(-100%);
        }
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .contact-info {
        display: none !important;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-6);
        text-align: center;
    }

    /* Feature: Horizontal Scroll for 'Case Studies' */
    .portfolio-featured {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-4);
        padding-bottom: var(--space-4);
        margin: var(--space-8) calc(-1 * var(--space-6)) 0;
        padding-left: var(--space-6);
        padding-right: var(--space-6);
        -webkit-overflow-scrolling: touch;
    }

    .portfolio-featured::-webkit-scrollbar {
        display: none;
    }

    .featured-project {
        min-width: 85vw;
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
        gap: var(--space-4);
        padding: 0;
        border-top: none;
        border-right: 1px solid var(--gray-200);
        padding-right: var(--space-4);
    }

    .featured-project:last-child {
        border-right: none;
    }

    .featured-project:nth-child(even) {
        direction: ltr;
    }

    .featured-image {
        border-radius: 20px;
        overflow: hidden;
    }

    .featured-content p,
    .featured-tags {
        display: none;
    }

    .featured-content h3 {
        margin-bottom: var(--space-2);
    }

    body {
        counter-reset: menu-counter;
    }
}

/* Fix: Disable Custom Cursor on Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .cursor {
        display: none !important;
    }

    /* Re-enable system cursor for touch devices if needed or just keep auto */
    *,
    a,
    button,
    .btn {
        cursor: auto !important;
    }
}

/* Force remove system cursor from all interactive elements GLOBALLY (Desktop) */
html,
body,
*,
a,
button,
.btn,
.portfolio-item,
.featured-image,
.cursor-hover-item,
.calendar-item {
    cursor: none !important;
}

/* Re-enable default cursor for interactive elements */
a,
button,
.btn,
.portfolio-item,
.featured-image,
.cursor-hover-item {
    cursor: pointer !important;
}


/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --text-4xl: 2rem;
        --text-5xl: 2.25rem;
        --text-6xl: 2.5rem;
        --text-7xl: 2.75rem;
    }

    .section {
        padding: var(--space-16) 0;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-4) 0;
        border-bottom: 1px solid var(--gray-200);
    }

    .stat-item h3 {
        margin-bottom: 0;
    }
}

/* =========================================
   ROTATING WORD SECTION
   ========================================= */
/* =========================================
   ROTATING WORD SECTION
   ========================================= */
.rotating-values {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    /* Allow global particles to show */
    color: #000000;
    position: relative;
    z-index: 20;
    /* Higher than other sections */
    overflow: visible;
    /* CRITICAL: Allow 3D elements to poke out if needed */
    margin-top: -1px;
    /* SUB-PIXEL FIX: Prevents white line between hero and this section */
}

.rotating-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    position: relative;
    /* Create stacking context */
    z-index: 10;
    /* Above canvas */
}

/* #rotating-canvas removed - using global particles */

.rotating-headline {
    font-size: 4rem;
    /* Explicit large size */
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    display: flex;
    flex-direction: row;
    /* Force row */
    flex-wrap: wrap;
    /* Wrap only on small screens */
    justify-content: center;
    align-items: center;
    gap: 0.05ch;
    /* Character width based gap */
    margin: 0;
}

/* The wrapper for the 3D element - ANIMATES WIDTH */
.word-rotator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 1.2em;
    /* Tighter height to match text */
    width: 4ch;
    /* Start width (Fast) */
    perspective: 1000px;
    transform-style: preserve-3d;
    animation: resizeWord 10s infinite cubic-bezier(0.5, 0, 0.5, 1);
    /* Sync exactly with spinWord */
    will-change: width;
}

/* The 3D Object itself */
.rotating-words {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: spinWord 10s infinite linear;
    /* Linear strict rotation */
    /* Use linear or cubic-bezier. User asked for slow. */
    animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1);
    /* Ease in out */
}

/* The Faces */
.rotating-words span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    /* Hide back for cleaner look */
    color: #912f56;
    /* Cyan */
    font-weight: 700;
    font-style: normal;
    /* Add style to differentiate */
    white-space: nowrap;
}

/* 
    3D Cube Mathematics
    Height = 1.2em (from .word-rotator)
    Radius (translateZ) = Height / 2 = 0.6em
*/

.rotating-words span:nth-child(1) {
    transform: rotateX(0deg) translateZ(0.6em);
}

.rotating-words span:nth-child(2) {
    transform: rotateX(-90deg) translateZ(0.6em);
}

.rotating-words span:nth-child(3) {
    transform: rotateX(-180deg) translateZ(0.6em);
}

.rotating-words span:nth-child(4) {
    transform: rotateX(-270deg) translateZ(0.6em);
}

/* Animation Keyframes - Rotation */
@keyframes spinWord {

    0%,
    20% {
        transform: rotateX(0deg);
    }

    25%,
    45% {
        transform: rotateX(90deg);
    }

    50%,
    70% {
        transform: rotateX(180deg);
    }

    75%,
    95% {
        transform: rotateX(270deg);
    }

    100% {
        transform: rotateX(360deg);
    }
}

/* Animation Keyframes - Width Resizing */
@keyframes resizeWord {

    0%,
    20% {
        width: 4.5ch;
    }

    /* Fast */
    25%,
    45% {
        width: 8.5ch;
    }

    /* Scalable */
    50%,
    70% {
        width: 6.5ch;
    }

    /* Secure */
    75%,
    95% {
        width: 8.5ch;
    }

    /* Reliable */
    100% {
        width: 4.5ch;
    }

    /* Loop back */
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .rotating-headline {
        font-size: 3rem;
    }

    .word-rotator {
        width: 10ch;
    }
}

@media (max-width: 500px) {
    .rotating-headline {
        font-size: 2rem;
        flex-direction: column;
        /* Stack on very small screens */
        gap: 0.5rem;
    }

    .word-rotator {
        width: 100%;
        /* Full width when stacked */
        height: 1.5em;
    }
}

/* =========================================
   PORTFOLIO (Compact Calendar Redesign)
   ========================================= */
.portfolio {
    padding: var(--space-20) 0;
    position: relative;
}

.portfolio-header {
    margin-bottom: var(--space-12);
    /* Tighter spacing */
}

.portfolio-header h2 {
    font-size: var(--text-4xl);
    /* Compact headline */
    letter-spacing: -0.02em;
}

/* --- Layout Wrapper --- */
.portfolio-compact {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* 60/40 Split */
    gap: var(--space-16);
    align-items: start;
    min-height: 600px;
}

/* --- Left: Preview Panel --- */
.preview-panel {
    position: sticky;
    top: var(--space-24);
    height: fit-content;
    z-index: 10;
}

.preview-glass {
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(145, 47, 86, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    padding: var(--space-4);
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-glass img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    transition: opacity 0.3s ease;
}

/* --- Right: Calendar Grid --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3x3 Grid */
    gap: var(--space-4);
}

.calendar-item {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(145, 47, 86, 0.12);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    user-select: none;
}

.calendar-item span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-2xl);
    color: var(--secondary-color);
    letter-spacing: 0.05em;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

/* Hover States */
.calendar-item:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.65);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px -5px rgba(145, 47, 86, 0.15);
    z-index: 2;
}

/* View All Box */
.view-all-box {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.view-all-text {
    color: var(--white) !important;
    font-size: var(--text-sm) !important;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

.view-all-box:hover {
    background: #7a2245;
    /* Darker shade */
    transform: translateY(-4px);
}


/* --- Floating Tooltip --- */
.portfolio-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(145, 47, 86, 0.2);
    padding: var(--space-5);
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.portfolio-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-tooltip h4 {
    color: var(--secondary-color);
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
}

.portfolio-tooltip p {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-compact {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .preview-panel {
        position: relative;
        top: 0;
    }

    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Keep 3 or go to 2? 3 fits nicely on mobile usually */
    }
}

@media (max-width: 600px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   VISIBILITY FIXES (Final Override)
   ========================================= */

/* --- Global Particles (Force Top) --- */
#global-particles {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99;
    /* Force ON TOP of everything */
    pointer-events: none;
    /* Click through */
}

/* --- Content Z-Index Fix --- */
.section {
    position: relative;
    z-index: 10;
    background: transparent !important;
}

.contact {
    z-index: 10;
    background: transparent !important;
}

/* Ensure body background lets particles show if they are behind */
body {
    background-color: var(--primary-bg);
}

/* --- Custom Cursor (Absolute Top) --- */
body {
    cursor: none !important;
    /* Force hide default */
}

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000 !important;
    /* Absolute top */
    pointer-events: none;
    display: block !important;
    /* Prevent accidental hiding */
}

.cursor--small {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--secondary-color) !important;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    z-index: 10001;
}

.cursor--large {
    z-index: 10000;
}

/* =========================================
   CUSTOM CURSOR STYLES (Ensuring Global Availability)
   ========================================= */
body {
    cursor: none;
}

.cursor {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 9999;
}

.cursor--small {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 8px;
    background: var(--black);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    z-index: 10001;
}

.cursor--large {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--black);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.cursor--text {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    z-index: 10002;
}

.cursor.is-hovering .cursor--large {
    width: 60px;
    height: 60px;
    border-color: transparent;
    background: rgba(0, 0, 0, 0.1);
}

.cursor.is-text-mode .cursor--small {
    opacity: 0;
}

.cursor.is-text-mode .cursor--large {
    width: 120px;
    height: 120px;
    border-color: transparent;
    background: transparent;
    opacity: 1;
}

.cursor.is-text-mode .cursor--text {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cursor--text .text {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    animation: rotateText 10s linear infinite;
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
}

.cursor--text .text span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    white-space: pre;
    font-size: 14px;
    backface-visibility: hidden;
    will-change: transform;
}

@keyframes rotateText {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Theme overrides for dark mode pages */
.theme-dark .cursor--small {
    background: #fff;
}

.theme-dark .cursor--large {
    border-color: #fff;
}

.theme-dark .cursor--text .text {
    color: #fff;
}

/* Force remove system cursor */
a,
button,
.btn,
.cursor-hover-item {
    cursor: none !important;
}

/* VNotes Image Sizing Fix */
.vnotes-scroll-img {
    max-width: 60%;
    width: 60%;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .vnotes-scroll-img {
        max-width: 90%;
        width: 90%;
        border-radius: 8px;
        margin: 0 auto;
        position: relative;
        z-index: 20;
    }
}

/* =========================================
   PROJECT PAGE — IMMERSIVE HERO
   ========================================= */
.project-immersive-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #111;
}

.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: brightness(0.85);
}

.hero-content-layer {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.intrusive-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
}

.intrusive-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1.5rem;
}

/* Dark-theme hero overrides */
.theme-dark .project-immersive-hero {
    background: var(--primary-bg, #0F0F12);
}

/* Mobile hero */
@media (max-width: 768px) {
    .project-immersive-hero {
        min-height: 70vh;
    }

    .intrusive-title {
        font-size: clamp(2.5rem, 14vw, 5rem);
    }

    .intrusive-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
    }

    .hero-content-layer {
        padding: 1rem;
    }
}

/* =========================================
   PROJECT PAGE CONTENT DESIGN
   ========================================= */

/* Section Layouts */
.project-content-section {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
}

.content-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.content-label {
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
    position: sticky;
    top: 4rem;
    padding-top: 0.5rem;
    border-top: 2px solid #222;
}

.content-body h3 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.15;
    color: #111;
    font-weight: 700;
}

.content-body p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

.theme-dark .content-label {
    border-top-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
}

.theme-dark .content-body p {
    color: rgba(255, 255, 255, 0.7);
}

.theme-dark .content-body h3 {
    color: #fff;
}

/* Section Gray Background */
.section-gray {
    background-color: #f5f5f5;
}

.theme-dark .section-gray {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Tech Stack Grid */
.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-dark .tech-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.tech-item:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.theme-dark .tech-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tech-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #333;
}

.theme-dark .tech-name {
    color: rgba(255, 255, 255, 0.8);
}

/* Sliding Window Navigation */
.next-project-trigger {
    position: relative;
    width: 100%;
    padding: 10rem 0;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-decoration: none;
}

.theme-dark .next-project-trigger {
    background: #fff;
    color: #111;
}

.next-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1rem;
    opacity: 0.5;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.next-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    z-index: 2;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease;
}

.sliding-window {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    transition: bottom 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.theme-dark .sliding-window {
    background: #111;
    color: #fff;
}

.next-project-trigger:hover .sliding-window {
    bottom: 0;
}

.next-project-trigger:hover .next-title {
    transform: translateY(-150%);
    opacity: 0;
}

.next-project-trigger:hover .next-label {
    transform: translateY(-300%);
    opacity: 0;
}

.window-content {
    flex: 1;
    text-align: left;
    max-width: 40%;
}

.window-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.window-desc {
    font-size: 1.1rem;
    color: #777;
    line-height: 1.6;
}

.window-image {
    width: 50%;
    height: 80%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Footer Hover */
.footer a,
.footer-logo {
    transition: color 0.3s ease, opacity 0.3s ease;
}

.footer a:hover,
.footer-logo:hover {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .content-grid-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-label {
        position: static;
        margin-bottom: 0.5rem;
    }

    .sliding-window {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding: 2rem;
    }

    .window-content {
        max-width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .window-image {
        width: 80%;
        height: 40%;
    }
}

/* ========================================
   MOBILE: Tighten Work → Skills gap
   Must stay at bottom to win specificity
   ======================================== */
@media (max-width: 900px) {
    #portfolio {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    #skills {
        padding-top: 16px !important;
        padding-bottom: 24px !important;
    }

    /* Contact heading: scale down and let it wrap naturally */
    .contact-heading {
        font-size: clamp(1.8rem, 9vw, 2.6rem) !important;
        line-height: 1.15 !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        hyphens: auto !important;
    }
}