/* ============================================
   THEME VARIABLES — dark (default) & light
   ============================================ */
:root {
    --bg-overlay: rgba(0, 0, 0, 0.92);
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dim: rgba(255, 255, 255, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.10);
    --border-hover: rgba(255, 255, 255, 0.30);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-bg-hover: rgba(255, 255, 255, 0.05);
    --tag-bg: rgba(255, 255, 255, 0.08);
    --tag-bg-hover: rgba(255, 255, 255, 0.12);
    --nav-bg: rgba(24, 24, 27, 0.90);
    /* zinc-900/90 */
    --nav-border: rgba(63, 63, 70, 1);
    /* zinc-700 */
    --mobile-menu-bg: rgba(0, 0, 0, 0.95);
    --highlight-glow: rgba(255, 255, 255, 0.4);
    --theme-transition: background 0.4s ease, color 0.4s ease,
        border-color 0.4s ease, background-color 0.4s ease;
}

[data-theme="light"] {
    --bg-overlay: rgba(245, 243, 235, 0.94);
    --bg-color: #f5f3eb;
    --text-primary: #111111;
    --text-muted: rgba(17, 17, 17, 0.55);
    --text-dim: rgba(17, 17, 17, 0.15);
    --border-subtle: rgba(17, 17, 17, 0.12);
    --border-hover: rgba(17, 17, 17, 0.30);
    --card-bg: rgba(17, 17, 17, 0.04);
    --card-bg-hover: rgba(17, 17, 17, 0.07);
    --tag-bg: rgba(17, 17, 17, 0.07);
    --tag-bg-hover: rgba(17, 17, 17, 0.12);
    --nav-bg: rgba(245, 243, 235, 0.88);
    --nav-border: rgba(17, 17, 17, 0.12);
    --mobile-menu-bg: rgba(245, 243, 235, 0.97);
    --highlight-glow: rgba(17, 17, 17, 0.25);
}

/* BASE STYLES */
body {
    font-family: 'Space Mono', monospace;
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    transition: var(--theme-transition);
    background-color: var(--bg-color); /* Fallback */
}

/* Fixed background for performance + compatibility */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--bg-overlay), var(--bg-overlay)),
        url('Homepage%20Assets/netbackdrop.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: var(--theme-transition);
}



/* --- PRELOADER ANIMATION CSS (Speed Up Version) --- */
.preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 9999;
    pointer-events: none;
}

.loader-text {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 700;
    opacity: 0;
    transform: translateY(100%);
    position: absolute;
    white-space: nowrap;
    letter-spacing: -0.05em;
}

/* CHANGED: Duration 0.8s -> 0.5s for snappier movement */
.text-enter {
    animation: text-in 0.5s cubic-bezier(0.87, 0, 0.13, 1) forwards;
}

.text-exit {
    animation: text-out 0.5s cubic-bezier(0.87, 0, 0.13, 1) forwards;
}

@keyframes text-in {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

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

@keyframes text-out {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

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

/* Skip Button Styles */
.skip-button {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 8px 16px;
    background: var(--card-bg-hover);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 11.2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    /* Allow clicks even though parent has pointer-events: none */
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateX(-50%) translateY(-2px);
}

.skip-button:active {
    transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE ADJUSTMENTS FOR MOBILE */
@media (max-width: 768px) {
    .skip-button {
        bottom: 32px;
        font-size: 10.4px;
        padding: 6.4px 12.8px;
    }

    .loader-text {
        font-size: clamp(24px, 8vw, 48px);
        padding: 0 16px;
        text-align: center;
    }
}

/* NAVIGATION LOGO SPACING */
.nav-logo {
    margin-left: 8px;
}

/* NAVBAR FIXED AT TOP - Always visible */
#navbar-container {
    transition: none;
}

/* Active navigation link highlighting */
.nav-link.active {
    color: var(--text-primary) !important;
}

/* ============================================
   THEME TOGGLE BUTTON — moon / sun
   ============================================ */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease,
        transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-hover);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--highlight-glow);
}

/* Floating toggles outside nav pill */
.theme-toggle--floating {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.theme-toggle--floating:hover {
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
    .theme-toggle--floating {
        right: 16px;
        width: 38px;
        height: 38px;
    }
}

.theme-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode: show moon, hide sun */
.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}


/* MOBILE MENU STYLES */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(10px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.mobile-menu-close {
    position: absolute;
    top: 32px;
    right: 32px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-hover);
    transform: rotate(90deg);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}

.mobile-nav-link {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    transform: translateX(10px);
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover::before {
    transform: translateY(-50%) scaleX(1);
}

.mobile-nav-resume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
}

.mobile-nav-resume:hover {
    background: var(--card-bg-hover);
    transform: translateX(0) translateY(-2px);
}

/* Hide mobile menu on larger screens */
@media (min-width: 768px) {
    .mobile-menu {
        display: none;
    }
}

/* --- HOMEPAGE REVEAL ANIMATION --- */
#main-content {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

#main-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HERO SECTION - EXACT REFERENCE REPLICA
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 160px 32px 64px;
    position: relative;
    overflow-x: hidden;
    /* Prevent horizontal scroll from animated elements */
}

/* Global backdrop is handled by a fixed element in HTML */

.hero-container {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 0 64px;
}

/* Top Left: Malayalam Welcome */
.hero-welcome-left {
    position: absolute;
    top: 50px;
    left: 50px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    will-change: transform, opacity;
}

.malayalam-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(28.8px, 4vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: 0.05em;
    transform: translateY(-3px);
}

.welcome-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
    transform: translateY(-11px);
}

/* Bottom Left: Skills */
.hero-skills-left {
    position: absolute;
    bottom: calc(50% - clamp(175px, 14vw, 225px) + 11px);
    left: 62px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    will-change: transform, opacity;
}

.hero-skills-left p {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    margin: 0;
    font-weight: 400;
}

.hero-skills-left p:last-child {
    margin-bottom: 0;
}

/* Center: Profile Image with Caption */
.hero-image {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    will-change: transform, opacity;
}

.photo-wrapper {
    position: relative;
    width: clamp(350px, 28vw, 450px);
    height: clamp(350px, 28vw, 450px);
}

.hero-image .profile-photo {
    width: clamp(350px, 28vw, 450px);
    height: clamp(350px, 28vw, 450px);
    object-fit: cover;
    border-radius: 20px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-image .profile-photo.grayscale {
    z-index: 1;
}

.hero-image .profile-photo.colorful {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.photo-wrapper:hover .profile-photo.colorful {
    opacity: 1;
}

.photo-caption {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
    text-align: center;
}

/* Wave Emoji Overlay (REMOVED) */



/* Top Right: Quote */
.hero-quote-right {
    position: absolute;
    top: 50px;
    right: 50px;
    max-width: 280px;
    text-align: right;
    will-change: transform, opacity;
}

.hero-quote-right p {
    font-family: 'Space Mono', monospace;
    font-size: 14.4px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    font-weight: 400;
}

/* Bottom Right: HUGE Name that OVERLAPS image */
.hero-name-right {
    position: absolute;
    bottom: calc(50% - clamp(175px, 14vw, 225px) + 12px);
    right: 52px;
    z-index: 10;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    will-change: transform, opacity;
}

.hero-name-right h1 {
    font-family: 'Space Mono', monospace;
    font-size: clamp(40px, 6vw, 88px);
    font-weight: 700;
    line-height: 0.85;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.05em;
}

.hero-name-right h1 br {
    display: block;
    content: "";
    margin: 0;
}

/* Swipe Down Indicator */
.swipe-indicator {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float-vertical 2s ease-in-out infinite;
}

.swipe-line {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

.swipe-indicator i {
    color: var(--text-muted);
}

.scroll-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    margin-top: 4px;
}

@keyframes float-vertical {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-name-right h1 {
        font-size: clamp(35.2px, 6vw, 80px);
    }

    .photo-wrapper,
    .hero-image .profile-photo {
        width: clamp(300px, 25vw, 380px);
        height: clamp(300px, 25vw, 380px);
    }
}

@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        min-height: auto;
        gap: 48px;
    }

    .hero-welcome-left,
    .hero-skills-left,
    .hero-image,
    .hero-quote-right,
    .hero-name-right {
        position: static;
    }

    .hero-welcome-left {
        order: 1;
        text-align: center;
    }

    .hero-image {
        order: 2;
    }

    .photo-wrapper,
    .hero-image .profile-photo {
        width: 320px;
        height: 320px;
    }

    .hero-skills-left {
        order: 3;
        text-align: center;
    }

    .hero-quote-right {
        order: 4;
        text-align: center;
        max-width: 100%;
    }

    .hero-name-right {
        order: 5;
        text-align: center;
    }

    .hero-name-right h1 {
        font-size: clamp(35.2px, 10vw, 72px);
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 96px 24px 64px;
    }

    .photo-wrapper,
    .hero-image .profile-photo {
        width: 280px;
        height: 280px;
    }

    .hero-quote-right p {
        font-size: 12.8px;
    }

    .hero-name-right h1 {
        font-size: clamp(32px, 12vw, 56px);
    }

    .hero-skills-left p {
        font-size: 0.875rem;
    }

    .malayalam-text {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .swipe-indicator {
        bottom: 2rem;
    }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
    height: 400vh;
    /* Increased from 120vh to slow scroll/reading pace */
    position: relative;
    padding: 0;
    width: 100%;
}

/* Wrapper to strictly contain the 3D scattering text */
.about-overflow-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Global backdrop is handled by a fixed element in HTML */

.about-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    z-index: 10;
    text-align: center;
    padding: 32px;
    will-change: transform, opacity;
}

.about-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1.6;
    color: var(--text-dim);
    text-align: center;
    margin: 0 0 48px 0;
    font-weight: 700;
}

/* Word container to keep letters grouped */
.about-word {
    display: inline-block;
    white-space: nowrap;
}

/* Individual letter highlighting & scattering */
.about-letter {
    display: inline-block;
    color: var(--text-dim);
    transition: color 0.1s ease-out, text-shadow 0.1s ease-out;
    will-change: transform, opacity, color;
    /* Added translateZ to support hardware acceleration when JS controls transforms */
    transform: translateZ(0);
}

.about-letter.highlighted {
    color: var(--text-primary);
    text-shadow: 0 0 15px var(--highlight-glow);
}

.know-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.5s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.know-more-link.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.know-more-link.visible:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.know-more-link .arrow-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.know-more-link.visible:hover .arrow-icon {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-text {
        font-size: clamp(20px, 5vw, 24px);
    }
}

@media (max-width: 480px) {
    .about-text {
        font-size: 18px;
    }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 120px 40px 96px;
    position: relative;
    width: 100%;
}



/* Projects Header with Category List */
.projects-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 auto 80px auto;
    max-width: 1600px;
    gap: 64px;
    width: 100%;
}

.projects-header-left {
    flex: 1;
    max-width: 600px;
}

.projects-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.projects-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
    line-height: 1.6;
}

/* Category Dropdown Wrapper */
.category-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 280px;
}

.category-label {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.category-dropdown {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 12px 40px 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2L8 8L14 2' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.category-dropdown:hover {
    background-color: var(--tag-bg);
    background-position: right 16px center;
    border-color: var(--text-muted);
}

.category-dropdown:focus {
    outline: none;
    background-color: var(--card-bg-hover);
    background-position: right 16px center;
    border-color: var(--border-hover);
}

.category-dropdown option {
    background: #1a1a1a;
    color: var(--text-primary);
    padding: 12px;
}

/* Projects Container */
.projects-container {
    width: 100%;
    margin: 0 auto;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
}

/* Project Card */
.project-card {
    background: transparent;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.5s ease,
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    opacity: 1;
}

.project-card.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.project-card:hover {
    transform: translateY(-8px);
}

/* Project Image */
.project-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--card-bg-hover);
    position: relative;
    border-radius: 12px;
    transition: all 0.4s ease;
}

.project-card:hover .project-image-wrapper {
    box-shadow:
        0 0 16px var(--glow-color, rgba(0, 255, 255, 0.3)),
        0 0 35px var(--glow-color, rgba(0, 255, 255, 0.12));
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    color: var(--text-muted);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.project-card:hover .project-image-placeholder {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
}

/* 360° Viewer Placeholder */
.project-image-wrapper--viewer {
    background: linear-gradient(135deg, rgba(120, 100, 255, 0.08) 0%, rgba(80, 60, 180, 0.04) 100%);
    border: 1px dashed rgba(120, 100, 255, 0.25);
}

.viewer-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.viewer-icon {
    font-size: 48px;
    color: rgba(160, 140, 255, 0.6);
    animation: spin-slow 4s linear infinite;
    line-height: 1;
    user-select: none;
}

.viewer-label {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: rgba(160, 140, 255, 0.8);
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.viewer-hint {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.4s ease;
}

.project-thumbnail.zoomed {
    transform: scale(1.17);
}

.project-card:hover .project-thumbnail {
    transform: scale(1.03);
}

.project-card:hover .project-thumbnail.zoomed {
    transform: scale(1.22);
}

/* Project Info */
.project-info {
    padding: 12px 0 0 0;
}

.project-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(22px, 2.5vw, 36px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.project-description {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    padding-top: 0;
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: default;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-section {
        padding: 96px 48px 64px;
    }

    .projects-header-wrapper {
        flex-direction: column;
        gap: 48px;
    }

    .category-list {
        align-items: flex-start;
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .projects-section {
        padding: 96px 24px 64px;
    }

    .projects-header-wrapper {
        gap: 40px;
        margin-bottom: 60px;
    }

    .projects-title {
        font-size: clamp(28px, 6vw, 40px);
    }

    .projects-subtitle {
        font-size: 14px;
    }

    .category-dropdown-wrapper {
        min-width: unset;
        width: 100%;
    }

    .category-dropdown {
        font-size: 14px;
        padding: 14px 18px;
        padding-right: 45px;
    }

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

    .project-title {
        font-size: 18px;
    }

    .project-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .projects-section {
        padding: 80px 20px 48px;
    }

    .category-dropdown-wrapper {
        min-width: unset;
    }

    .category-dropdown {
        font-size: 13px;
        padding: 12px 16px;
        padding-right: 40px;
        background-position: right 16px center;
    }

    .category-label {
        font-size: 11px;
    }

    .project-info {
        padding: 20px;
    }
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 140px 48px 40px;
    /* Adjusted padding so everything fits on a single screen */
    position: relative;
    text-align: center;
    /* Removed gap: 36px because it forces a massive gap between the email and the socials */
}

/* --- Contact Image --- */
.contact-image {
    width: 240px;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
    /* This margin pushes the big heading below it a bit down as requested */
}

/* --- Headline block: centered, two big lines --- */
.contact-headline-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.contact-headline {
    font-family: 'Space Mono', monospace;
    font-size: clamp(48px, 8vw, 110px);
    font-weight: 700;
    line-height: 1.0;
    color: var(--text-primary);
    margin: 0;
    /* Negative letter spacing helps pull Wide Monospace characters together */
    letter-spacing: -0.05em;
    transition: color 0.4s ease;
    white-space: nowrap;
}

/* Second line — italic, slightly smaller, muted */
.contact-headline--italic {
    font-style: italic;
    font-size: clamp(28px, 4.5vw, 60px);
    /* Made notably smaller */
    color: var(--text-muted);
    letter-spacing: -0.04em;
    margin-top: 16px;
    margin-bottom: 24px;
    /* Reduced to pull subtext closer */
}

/* --- Subtext --- */
.contact-subtext {
    font-family: 'Space Mono', monospace;
    font-size: clamp(13px, 1.5vw, 16px);
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0;
    margin-top: 36px;
    /* Replaced the section gap here */
    max-width: 520px;
    padding-bottom: 24px;
    /* Added padding under description */
}

/* --- Email CTA --- */
.contact-email {
    font-family: 'Space Mono', monospace;
    font-size: clamp(14px, 1.6vw, 18px);
    /* slightly bumped up the email size too */
    font-weight: 700;
    color: #ef4444;
    text-decoration: none;
    letter-spacing: 0.06em;
    position: relative;
    padding-bottom: 4px;
    display: block;
    margin-top: 80px;
    /* Reduced margin-top so the email and socials stay on screen */
    margin-bottom: 24px;
    /* Small, tightly controlled gap between email and socials */
    transition: color 0.3s ease;
}

/* underline removed per request */

/* --- Social links row --- */
.contact-socials {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0px;
    /* Email margin-bottom handles the gap now */
    padding-bottom: 32px;
    /* Pad the absolute bottom of the section */
}

.contact-social-link {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    /* Increased from 11px */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.contact-social-sep {
    color: var(--border-subtle);
    font-size: 18px;
    /* Bumped up separator size too */
    user-select: none;
}



/* Responsive */
@media (max-width: 768px) {
    .contact-section {
        padding: 96px 24px 64px;
        gap: 28px;
    }

    .contact-headline {
        font-size: clamp(36px, 10vw, 72px);
        white-space: normal;
    }

    .contact-headline--italic {
        font-size: clamp(28px, 8vw, 56px);
    }
}

@media (max-width: 480px) {
    .contact-headline {
        font-size: clamp(28px, 12vw, 48px);
    }

    .contact-headline--italic {
        font-size: clamp(22px, 10vw, 38px);
    }
}


/* ============================================
   LIGHT MODE OVERRIDES
   Covers elements styled via Tailwind or other
   hardcoded values that CSS variables don't reach.
   ============================================ */

/* Navbar pill */
[data-theme="light"] nav.bg-zinc-900\/90 {
    background-color: var(--nav-bg) !important;
    border-color: var(--nav-border) !important;
}

[data-theme="light"] .nav-link {
    color: rgba(17, 17, 17, 0.6) !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #111111 !important;
}

[data-theme="light"] #navbar-container a {
    color: rgba(17, 17, 17, 0.8);
}

[data-theme="light"] #navbar-container a:hover {
    color: #111111;
}

[data-theme="light"] #mobile-menu-toggle {
    color: #111111;
}

/* Hero text */
[data-theme="light"] .malayalam-text,
[data-theme="light"] .hero-skills-left p,
[data-theme="light"] .hero-quote-right p,
[data-theme="light"] .hero-name-right h1 {
    color: var(--text-primary);
}

[data-theme="light"] .welcome-subtitle,
[data-theme="light"] .photo-caption,
[data-theme="light"] .scroll-text {
    color: var(--text-muted);
}

[data-theme="light"] .swipe-line {
    background: rgba(17, 17, 17, 0.3);
}

[data-theme="light"] .swipe-indicator i {
    color: rgba(17, 17, 17, 0.5);
}

/* About section */
[data-theme="light"] .about-text,
[data-theme="light"] .about-letter {
    color: var(--text-dim);
}

[data-theme="light"] .about-letter.highlighted {
    color: var(--text-primary);
    text-shadow: 0 0 15px var(--highlight-glow);
}

[data-theme="light"] .know-more-link {
    color: var(--text-muted);
}

[data-theme="light"] .know-more-link.visible:hover {
    color: var(--text-primary);
}

/* Project cards */
[data-theme="light"] .project-card {
    background: transparent;
    border-color: transparent;
}

[data-theme="light"] .project-card:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

[data-theme="light"] .project-image-wrapper {
    background: var(--card-bg-hover);
    border-color: var(--border-subtle);
}

[data-theme="light"] .project-card:hover .project-image-wrapper {
    box-shadow:
        0 0 0 1px var(--glow-color, rgba(0, 220, 255, 0.6)),
        0 0 30px var(--glow-color, rgba(0, 220, 255, 0.5)),
        0 0 70px var(--glow-color, rgba(0, 220, 255, 0.25));
    border-color: var(--glow-color, rgba(0, 220, 255, 0.6));
}

[data-theme="light"] .project-image-placeholder {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.04) 0%, rgba(17, 17, 17, 0.02) 100%);
    color: var(--text-muted);
}

[data-theme="light"] .project-card:hover .project-image-placeholder {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.07) 0%, rgba(17, 17, 17, 0.04) 100%);
}

[data-theme="light"] .project-title {
    color: var(--text-primary);
}

[data-theme="light"] .project-description {
    color: var(--text-muted);
}

[data-theme="light"] .tag {
    background: var(--tag-bg);
    border-color: var(--border-subtle);
    color: rgba(17, 17, 17, 0.7);
}

[data-theme="light"] .tag:hover {
    background: var(--tag-bg-hover);
    color: var(--text-primary);
}

/* Category dropdown */
[data-theme="light"] .category-label {
    color: var(--text-muted);
}

[data-theme="light"] .category-dropdown {
    color: var(--text-primary);
    background-color: var(--card-bg);
    border-color: var(--border-subtle);
    /* Invert SVG arrow so it looks dark */
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2L8 8L14 2' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="light"] .category-dropdown option {
    background: #f5f3eb;
    color: #111111;
}

/* Projects section title & subtitle */
[data-theme="light"] .projects-title {
    color: var(--text-primary);
}

[data-theme="light"] .projects-subtitle {
    color: var(--text-muted);
}

/* ============================================
   FOOTER SECTION
   ============================================ */

.contact-footer {
    width: 100%;
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    line-height: 1.8;
    opacity: 0.6;
    margin-top: auto;
    padding-top: 32px;
    transition: opacity 0.3s ease;
}

.contact-footer:hover {
    opacity: 1;
}

.contact-footer p {
    margin: 0;
}

[data-theme="light"] .contact-footer {
    color: var(--text-muted);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal-up {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(100px);
    transition: opacity 1s ease-out, transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 1s ease-out;
    will-change: opacity, transform, filter;
}

.reveal-up.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- COMING SOON MODAL --- */
.coming-soon-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
}

.coming-soon-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.cs-modal-content {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    padding: 48px 32px;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.coming-soon-modal.active .cs-modal-content {
    transform: translateY(0) scale(1);
}

.cs-modal-title {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.cs-modal-text {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 32px;
}

.cs-modal-close-btn {
    font-family: 'Space Mono', monospace;
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .cs-modal-content {
    background: rgba(245, 243, 235, 0.8);
    border: 1px solid rgba(17, 17, 17, 0.1);
    color: #111;
}

[data-theme="light"] .cs-modal-title { color: #111; }
[data-theme="light"] .cs-modal-text { color: rgba(17, 17, 17, 0.6); }
[data-theme="light"] .cs-modal-close-btn { background: #111; color: #fff; }
