/* CSS Variables for Theming */
:root {
    --bg-color: #fbfbff;
    --bg-gradient:
        radial-gradient(at 0% 100%, rgba(56, 189, 248, 0.3) 0%, transparent 50%),
        radial-gradient(at 100% 80%, rgba(192, 132, 252, 0.4) 0%, transparent 50%),
        radial-gradient(at 50% 0%, rgba(56, 189, 248, 0.1) 0%, transparent 40%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --card-bg: rgba(255, 255, 255, 0.6);
    --modal-bg: rgba(255, 255, 255, 0.98);
    --accent-glow: rgba(99, 102, 241, 0.12);
    --brand-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --brand-primary: #4f46e5;
}

:root[data-theme="dark"] {
    --bg-color: #030014;
    --bg-gradient:
        radial-gradient(circle at 50% 0%, rgba(118, 58, 240, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 10% 50%, rgba(56, 189, 248, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 50%, rgba(236, 72, 153, 0.2) 0%, transparent 40%);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    /* Brighter for better contrast */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --card-bg: rgba(255, 255, 255, 0.02);
    --modal-bg: rgba(10, 10, 20, 0.95);
    --accent-glow: rgba(192, 132, 252, 0.25);
    --brand-gradient: linear-gradient(135deg, #c084fc 0%, #6366f1 50%, #3b82f6 100%);
    --brand-primary: #a855f7;
}



/* Performance Optimization: Disable transitions during theme switch */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.no-transition,
.no-transition * {
    transition: none !important;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    transition: background-color 0.8s cubic-bezier(0.23, 1, 0.32, 1), color 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Typography System */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif !important;
    letter-spacing: -0.01em;
    font-weight: 700 !important;
}

.font-display {
    font-family: 'Playfair Display', serif !important;
}

.font-script {
    font-family: 'Dancing Script', cursive;
}

.font-tech {
    font-family: 'JetBrains Mono', monospace;
}


/* Crystal-Clear Glassmorphism: Ultra Round (3rem) */
.glass,
.project-card,
.smart-search-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(60px) saturate(210%);
    -webkit-backdrop-filter: blur(60px) saturate(210%);
    box-shadow: var(--glass-shadow);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card {
    border-radius: 1.5rem;
    position: relative;
    /* Remove overflow:hidden to allow 3D */
    overflow: visible;
    /* Height will be determined by content if we use relative front, 
               but grid stretches height so 100% is good if we want uniform cards. 
               However, to establish initial height, front face must be in flow OR 
               we set min-height. 
               Let's make Front Face Relative so it dictates height. */
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    flex-grow: 1;
    display: flex;
    /* Ensure inner stretches */
    flex-direction: column;
}

.project-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front {
    position: relative;
    /* Changed from absolute to relative to give height */
    width: 100%;
    height: 100%;
    /* Stretches to fill inner */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 2;
    background: var(--glass-bg);
    /* Ensure it fills the card visually */
    flex: 1;
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: rotateY(180deg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    z-index: 1;
    /* Back face glass effect */
    backdrop-filter: blur(60px) saturate(210%);
    -webkit-backdrop-filter: blur(60px) saturate(210%);
}

#header.scrolled {
    height: 72px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

#header.scrolled .container>div {
    height: 72px;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    /* Auto enlarge (Scale) + Lift */
    border-color: rgba(168, 85, 247, 0.4);
    /* Primary color hint */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* Deeper shadow */
    z-index: 50;
}



/* Flagship Card Style */
.project-card.flagship {
    border: 1px solid rgba(251, 113, 133, 0.3);
    /* Subtle rose highlight */
}

.project-card.flagship:hover {
    border-color: rgba(251, 113, 133, 0.6);
    box-shadow: 0 20px 40px -5px rgba(251, 113, 133, 0.1);
}

/* Footer Social Hover: High Fidelity Glass */
.footer-social-link {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    border: 1px solid var(--glass-border) !important;
    background: var(--glass-bg);
}

.footer-social-link:hover {
    transform: translateY(-10px) scale(1.15);
    background: var(--brand-gradient) !important;
    border-color: transparent !important;
    box-shadow: 0 20px 40px -10px var(--accent-glow);
    color: #ffffff !important;
}

.footer-social-link:hover i {
    color: #ffffff !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Performance Optimizations */
.project-card,
.gsap-hero,
.section-content,
.modal-container {
    will-change: transform, opacity;
}

/* Mouse Spotlight */
.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            var(--accent-glow),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none !important;
    z-index: 2;
}

.project-card:hover::after {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--modal-bg);
    backdrop-filter: blur(80px) saturate(210%);
    -webkit-backdrop-filter: blur(80px) saturate(210%);
    border: 1px solid var(--glass-border);
    width: 95%;
    max-width: 850px;
    max-height: 85vh;
    border-radius: 3rem;
    overflow-y: auto;
    transform: scale(0.9) translateY(40px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
    scrollbar-width: thin;
    scrollbar-color: var(--brand-primary) transparent;
    padding: 2.5rem;
}

#modal-content {
    color: var(--text-primary) !important;
}

#modal-content h2 {
    font-weight: 900;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#modal-content h4 {
    color: var(--brand-primary) !important;
    font-weight: 800;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

#modal-content p,
#modal-content li {
    color: var(--text-secondary) !important;
    line-height: 1.8;
    font-size: 1.05rem;
}

[data-theme="dark"] #modal-content p,
[data-theme="dark"] #modal-content li {
    color: #f1f5f9 !important;
    /* Vivid slates for dark mode accessibility */
}

[data-theme="dark"] #modal-content .font-mono {
    color: #d8b4fe !important;
    /* Brighter tech accents */
}

#modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    color: var(--text-primary);
}

#modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

@media (max-width: 768px) {
    .modal-container {
        max-height: 92vh;
        border-radius: 2rem 2rem 0 0;
        position: absolute;
        bottom: 0;
        transform: scale(1) translateY(100%);
    }

    .modal-overlay.active .modal-container {
        transform: scale(1) translateY(0);
    }

    #modal-close {
        top: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
}

body.modal-open {
    overflow: hidden;
}

/* Typography & Utilities */
.logo-gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

#header.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

/* Modern Inputs */
.modern-input {
    background: transparent;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.modern-input:focus {
    border-bottom-color: #a855f7;
    background: linear-gradient(180deg, transparent, var(--accent-glow));
}

.modern-input::placeholder {
    color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.hero-bg {
    background: radial-gradient(circle at 15% 25%, rgba(192, 132, 252, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    position: relative;
}

/* Deep Glass Orbs */
.glass-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--brand-gradient);
    filter: blur(100px);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    animation: orbFloat 20s infinite alternate ease-in-out;
}

@keyframes orbFloat {
    from {
        transform: translate(-10%, -10%) scale(1);
    }

    to {
        transform: translate(10%, 10%) scale(1.1);
    }
}

@media (max-width: 768px) {
    .glass-orb {
        width: 200px;
        height: 200px;
        filter: blur(60px);
        opacity: 0.1;
    }

    .orb-secondary {
        width: 300px;
        height: 300px;
        filter: blur(80px);
    }

    .glass,
    .project-card,
    .smart-search-box {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }
}

.orb-1 {
    top: 10%;
    left: 10%;
    background: #c084fc;
    animation-delay: 0s;
}

.orb-2 {
    bottom: 10%;
    right: 10%;
    background: #6366f1;
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    right: 20%;
    background: #ec4899;
    animation-delay: -10s;
    opacity: 0.1;
}

.orb-secondary {
    width: 500px;
    height: 500px;
    opacity: 0.1;
    filter: blur(120px);
    background: var(--brand-gradient);
}



main {
    position: relative;
    z-index: 10;
    /* Ensure content flows above canvas */
}

.project-card.hidden {
    display: none;
}

/* Micro-interactions */
.btn-press:active {
    transform: scale(0.98);
}

.icon-float {
    animation: float 4s ease-in-out infinite;
}

/* 20. Control Center Glass Component Foundations */
.glass-btn,
.filter-btn,
.tab-button,
.magnetic-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(25px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(160%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    border-radius: 24px !important;
    /* Squaricle shape */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* Primary Energy Glass */
.glass-btn-primary {
    background: rgba(168, 85, 247, 0.25) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    box-shadow: 0 8px 32px 0 rgba(168, 85, 247, 0.2) !important;
}

.glass-btn-primary:hover {
    background: rgba(168, 85, 247, 0.4) !important;
    transform: scale(1.02) translateY(-2px) !important;
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.3) !important;
}

.glass-btn:hover,
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.glass-btn:hover i,
.filter-btn:hover i {
    stroke: #ffffff !important;
}

.filter-btn.active {
    background: var(--brand-gradient) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 30px -5px var(--accent-glow);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Unified Glass Back to Top */
/* Liquid Glass Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Liquid Glass Base */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.1),
        inset 0px 0px 15px rgba(255, 255, 255, 0.2);
    /* Internal fluid glow */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Fluid bounce */
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    color: var(--text-primary);
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top:hover {
    width: 150px;
    border-radius: 50px;
    /* Liquid White Hover */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 255, 0.8));
    border-color: rgba(255, 255, 255, 0.8);
    /* High Gloss Liquid Effect */
    box-shadow:
        0 20px 40px -10px rgba(255, 255, 255, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    color: #1e293b;
    /* Dark text for contrast */
    align-items: center;
}

.back-to-top-icon {
    width: 20px;
    height: 20px;
    transition-duration: 0.3s;
    fill: currentColor;
}

#back-to-top:hover .back-to-top-icon {
    transition-duration: 0.3s;
    transform: translateY(-250%);
    opacity: 0;
}

#back-to-top::before {
    position: absolute;
    bottom: -30px;
    content: "Back to Top";
    color: #1e293b;
    /* Dark text matching hover */
    font-size: 0px;
    transition-duration: 0.3s;
    font-weight: 700;
}

#back-to-top:hover::before {
    font-size: 14px;
    opacity: 1;
    bottom: unset;
    transition-duration: 0.3s;
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }

    #back-to-top:hover {
        width: 48px;
        border-radius: 50%;
        transform: translateY(0);
    }

    #back-to-top:hover::after {
        display: none;
    }

    #back-to-top:hover .back-to-top-icon {
        transform: none;
    }
}

.tab-button.active {
    color: #ffffff !important;
    background: transparent !important;
}

.tab-button:not(.active) {
    color: var(--text-secondary);
}

/* Loading Animation Styles */
#loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    transition: opacity 0.6s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.6s;
}

#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}

.three-body {
    --uib-size: 45px;
    --uib-speed: 0.8s;
    --uib-color: #a855f7;
    position: relative;
    display: inline-block;
    height: var(--uib-size);
    width: var(--uib-size);
    animation: spin78236 calc(var(--uib-speed) * 2.5) infinite linear;
}

.three-body__dot {
    position: absolute;
    height: 100%;
    width: 30%;
}

.three-body__dot:after {
    content: '';
    position: absolute;
    height: 0%;
    width: 100%;
    padding-bottom: 100%;
    background-color: var(--uib-color);
    border-radius: 50%;
}

.three-body__dot:nth-child(1) {
    bottom: 5%;
    left: 0;
    transform: rotate(60deg);
    transform-origin: 50% 85%;
}

.three-body__dot:nth-child(1)::after {
    bottom: 0;
    left: 0;
    animation: wobble1 var(--uib-speed) infinite ease-in-out;
    animation-delay: calc(var(--uib-speed) * -0.3);
}

.three-body__dot:nth-child(2) {
    bottom: 5%;
    right: 0;
    transform: rotate(-60deg);
    transform-origin: 50% 85%;
}

.three-body__dot:nth-child(2)::after {
    bottom: 0;
    left: 0;
    animation: wobble1 var(--uib-speed) infinite calc(var(--uib-speed) * -0.15) ease-in-out;
}

.three-body__dot:nth-child(3) {
    bottom: -5%;
    left: 0;
    transform: translateX(116.666%);
}

.three-body__dot:nth-child(3)::after {
    top: 0;
    left: 0;
    animation: wobble2 var(--uib-speed) infinite ease-in-out;
}

@keyframes spin78236 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes wobble1 {

    0%,
    100% {
        transform: translateY(0%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(-66%) scale(0.65);
        opacity: 0.8;
    }
}

@keyframes wobble2 {

    0%,
    100% {
        transform: translateY(0%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(66%) scale(0.65);
        opacity: 0.8;
    }
}



/* Expanding Showcase Styles */
.showcase-container {
    display: flex;
    gap: 15px;
    width: 100%;
    height: 450px;
    margin: 40px 0 60px 0;
}

.showcase-item {
    height: 100%;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 24px;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    backdrop-filter: blur(12px);
}

.showcase-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.showcase-item:hover::before {
    opacity: 1;
}

.showcase-item:hover {
    flex: 8;
    border-color: #ff568e;
    box-shadow: 0 40px 80px -15px rgba(255, 86, 142, 0.25);
}

.showcase-item .label-text {
    min-width: 18em;
    padding: 1.5em;
    text-align: center;
    transform: rotate(-90deg);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    color: #ff568e;
    letter-spacing: .3em;
    font-size: 1.1rem;
    font-weight: 800;
    white-space: nowrap;
    display: block;
    z-index: 10;
}

.showcase-item:hover .label-text {
    transform: rotate(0);
    font-size: 2.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 200px;
    color: var(--text-primary);
}

.showcase-details {
    position: absolute;
    bottom: -150px;
    left: 0;
    width: 100%;
    padding: 50px;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    pointer-events: none;
    z-index: 20;
}

.showcase-item:hover .showcase-details {
    bottom: 0;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .showcase-container {
        height: 400px;
    }

    .showcase-item span {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .showcase-container {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }

    .showcase-item {
        height: 100px;
        flex: none;
    }

    .showcase-item:hover {
        height: 400px;
        flex: none;
    }

    .showcase-item .label-text {
        transform: rotate(0);
        font-size: 1rem;
        letter-spacing: 0.1em;
    }

    .showcase-item:hover .label-text {
        margin-bottom: 220px;
        font-size: 1.8rem;
    }

    .showcase-details {
        padding: 30px;
    }
}

/* Project Grid Neighbor Blur Effect */
#projects-grid:hover>.project-card:not(:hover) {
    filter: blur(1px);
    opacity: 0.9;
    transform: scale(0.98);
    transition: all 0.4s ease;
}

/* EKG Pulse Animation Styles (Resized) */
.loading {
    width: 40px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading svg polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.loading svg polyline#back {
    fill: none;
    stroke: #ff4d5033;
}

.loading svg polyline#front {
    fill: none;
    stroke: #ff4d4f;
    stroke-dasharray: 48, 144;
    stroke-dashoffset: 192;
    animation: dash_682 1.4s linear infinite;
}

@keyframes dash_682 {
    72.5% {
        opacity: 0;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Send Message Button */
.send-msg-btn {
    font-family: inherit;
    font-size: 18px;
    background: linear-gradient(to bottom, #4dc7d9 0%, #66a6ff 100%);
    color: white;
    padding: 0.8em 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 25px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    cursor: pointer;
    width: 100%;
}

.send-msg-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}

.send-msg-btn:active {
    transform: scale(0.95);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.send-msg-btn span {
    display: block;
    margin-left: 0.4em;
    transition: all 0.3s;
}

.send-msg-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
    transition: all 0.3s;
}

.send-msg-btn .svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    margin-right: 0.5em;
    transition: all 0.3s;
}

.send-msg-btn:hover .svg-wrapper {
    background-color: rgba(255, 255, 255, 0.5);
}

.send-msg-btn:hover svg {
    transform: rotate(45deg);
}

/* --- Project Icon Animations --- */

/* 1. Beating Heart (Pregnancy Diabetes) */
.heart-beat {
    animation: heartPulse 1.5s infinite ease-in-out;
    transform-origin: center;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

/* 2. Scanning Shield (Breast Cancer) */
.shield-scan-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: shieldDraw 3s infinite ease-in-out;
}

.shield-inner {
    animation: shieldFade 3s infinite ease-in-out;
}

@keyframes shieldDraw {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes shieldFade {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

/* 3. Rising Bars (ClassPulse AI) */
.bar-anim {
    transform-origin: bottom;
    animation: barRise 1.2s infinite ease-in-out alternate;
}

.bar-1 {
    animation-delay: 0s;
}

.bar-2 {
    animation-delay: 0.2s;
}

.bar-3 {
    animation-delay: 0.4s;
}

@keyframes barRise {
    0% {
        transform: scaleY(0.4);
    }

    100% {
        transform: scaleY(1);
    }
}

/* 4. Flashing Zap (Synergy 2K26) */
.zap-flash {
    animation: zapPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes zapPulse {

    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 0 rgba(6, 182, 212, 0));
    }

    50% {
        opacity: 0.5;
        filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
    }

    55% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.8));
    }

    60% {
        opacity: 0.5;
    }
}

/* 5. Typing Text (Resume Screening) */
.doc-line {
    stroke-dasharray: 12;
    stroke-dashoffset: 12;
    animation: lineWrite 2s infinite linear;
}

.doc-line-1 {
    animation-delay: 0s;
}

.doc-line-2 {
    animation-delay: 0.5s;
}

.doc-line-3 {
    animation-delay: 1s;
}

@keyframes lineWrite {
    0% {
        stroke-dashoffset: 12;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

/* 6. Camera Flash (AR Gesture Games) */
.camera-flash {
    animation: cameraPulse 2s infinite ease-out;
    transform-origin: center;
}

@keyframes cameraPulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    2% {
        opacity: 1;
        transform: scale(1.1);
        fill: currentColor;
    }

    4% {
        opacity: 0.5;
        transform: scale(1);
        fill: none;
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* 7. Calendar Page Flip (Academic Suite) */
.calendar-flip {
    transform-origin: top;
    animation: pageFlip 3s infinite ease-in-out;
}

@keyframes pageFlip {

    0%,
    80% {
        transform: rotateX(0deg);
    }

    90% {
        transform: rotateX(-180deg);
        opacity: 0;
    }

    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

/* 8. Glasses Scan (NeuroLink) */
.glasses-scan {
    animation: glassesScan 4s infinite ease-in-out;
    transform-origin: center;
}

@keyframes glassesScan {

    0%,
    100% {
        stroke-dasharray: 20;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 20;
        stroke-dashoffset: 40;
    }
}

/* 9. Safety Shield Pulse (Project Vishnu) */
.shield-pulse {
    animation: shieldPulse 3s infinite ease-in-out;
    transform-origin: center;
}

@keyframes shieldPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 0 5px currentColor);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* Cosmic Morph Theme Toggle */
/* Premium Crystal Theme Toggle */
.theme-toggle-container {
    position: relative;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    z-index: 1001;
    box-shadow: var(--glass-shadow);
}

.theme-toggle-container:hover {
    transform: translateY(-2px) scale(1.08);
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle-icon {
    width: 28px;
    height: 28px;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-main-body {
    fill: url(#crystal-gradient);
    filter: drop-shadow(0 0 5px var(--accent-glow));
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .toggle-main-body {
    fill: #f8fafc;
}

.sun-ray {
    stroke: #fbbf24;
    stroke-width: 2.5;
    stroke-linecap: round;
    transform-origin: center;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .sun-ray {
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
}

.moon-mask-circle {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .moon-mask-circle {
    transform: translate(25px, -25px);
}

[data-theme="dark"] .moon-mask-circle {
    transform: translate(10px, -6px);
}

/* High-Contrast Visibility Purge */
.text-gray-500,
.text-gray-400 {
    color: var(--text-secondary) !important;
}

.section-heading h2 {
    font-weight: 800;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.1));
}

/* Social Icon Hover Animations */
.footer-social-link {
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-social-link:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--text-primary);
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.footer-social-link i {
    transition: all 0.3s ease;
}

.footer-social-link:hover i {
    filter: drop-shadow(0 0 8px currentColor);
}

/* 10. Core Competency (Chip Pulse) */
.chip-pulse {
    animation: chipPulse 3s infinite ease-in-out;
    transform-origin: center;
}

@keyframes chipPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(79, 70, 229, 0));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px rgba(79, 70, 229, 0.5));
    }
}

/* 11. Languages (Code Typing) */
.code-typing {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: codeType 3s infinite steps(20);
}

@keyframes codeType {

    0%,
    20% {
        stroke-dashoffset: 20;
    }

    50%,
    90% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* 12. Domains (Layers Float) */
.layer-float-1 {
    animation: layerFloat 3s infinite ease-in-out 0s;
}

.layer-float-2 {
    animation: layerFloat 3s infinite ease-in-out 0.2s;
}

.layer-float-3 {
    animation: layerFloat 3s infinite ease-in-out 0.4s;
}

@keyframes layerFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* 13. Hardware (Circuit Flow) */
.circuit-flow {
    stroke-dasharray: 10;
    stroke-dashoffset: 100;
    animation: circuitFlow 4s infinite linear;
}

@keyframes circuitFlow {
    100% {
        stroke-dashoffset: 0;
    }
}

/* 14. Tools (Wrench Rotate) */
.tool-rotate {
    transform-origin: center;
    animation: toolRotate 2s infinite ease-in-out;
}

@keyframes toolRotate {

    0%,
    100% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(15deg);
    }
}

/* 15. Aurora (Cloud Drift) */
.cloud-drift {
    transform-origin: center;
    animation: cloudDrift 5s infinite ease-in-out;
}

@keyframes cloudDrift {

    0%,
    100% {
        transform: translateX(0) scale(1);
    }

    50% {
        transform: translateX(3px) scale(1.08);
    }
}

/* 16. Bhavya (Mind Pulse) */
.mind-pulse {
    transform-origin: center;
    animation: mindPulse 2s infinite ease-in-out;
}

@keyframes mindPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(225, 29, 72, 0.4));
    }
}

/* 17. ClassPulse (Bar Pulse) */
.bar-pulse .bar-1 {
    animation: barPulse 1s infinite ease-in-out;
}

.bar-pulse .bar-2 {
    animation: barPulse 1s infinite ease-in-out 0.2s;
}

.bar-pulse .bar-3 {
    animation: barPulse 1s infinite ease-in-out 0.4s;
}

@keyframes barPulse {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.6);
    }
}

/* 18. Synergy (Zap Pulse) */
.zap-pulse {
    animation: zapPulse 2s infinite ease-in-out;
    transform-origin: center;
}

@keyframes zapPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
    }
}

/* 19. Resume Bot (Doc Scan) */
.doc-scan .doc-line {
    stroke-dasharray: 10;
    stroke-dashoffset: 10;
    animation: docScan 2s infinite linear;
}

.doc-scan .doc-line-1 {
    animation-delay: 0s;
}

.doc-scan .doc-line-2 {
    animation-delay: 0.5s;
}

.doc-scan .doc-line-3 {
    animation-delay: 1s;
}

@keyframes docScan {
    0% {
        stroke-dashoffset: 10;
        opacity: 0.2;
    }

    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -10;
        opacity: 0.2;
    }
}

/* 20. Academic Suite (Calendar Flip) */
.calendar-flip {
    transform-origin: top center;
    animation: calendarFlip 3s infinite ease-in-out;
}

@keyframes calendarFlip {

    0%,
    100% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(-20deg);
    }
}

/* 21. DNA Spin (Diabetes) - Smooth Rotation */
.dna-helix {
    transform-origin: center;
    animation: dnaRotate 6s linear infinite;
}

.blood-drop {
    animation: dropBounce 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform-origin: top center;
}

@keyframes dnaRotate {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

@keyframes dropBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* 22. Brain Stroke - Neuron Pulse */
.neuron-node {
    animation: nodePulse 2s ease-in-out infinite alternate;
}

.neuron-path {
    stroke-dasharray: 8;
    animation: synapseFlow 1.5s linear infinite;
}

@keyframes nodePulse {
    0% {
        r: 2;
        fill-opacity: 0.6;
    }

    100% {
        r: 3;
        fill-opacity: 1;
    }
}

@keyframes synapseFlow {
    to {
        stroke-dashoffset: -16;
    }
}

/* 23. Breast Cancer - Target Scan */
.scan-beam {
    transform-origin: top;
    animation: beamScan 3s ease-in-out infinite;
}

.target-reticle {
    transform-origin: center;
    animation: reticleFocus 4s ease-in-out infinite;
}

@keyframes beamScan {

    0%,
    100% {
        transform: scaleY(0.8) translateY(-2px);
        opacity: 0.3;
    }

    50% {
        transform: scaleY(1.2) translateY(4px);
        opacity: 0.8;
    }
}

@keyframes reticleFocus {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(0.9) rotate(45deg);
    }
}

/* 24. Mind Flow (Bhavya) - Cognitive Waves */
/* 24. ClassPulse - Eye Tracking */
.pupil-track {
    animation: trackEye 4s ease-in-out infinite;
}

.iris-shutter {
    animation: shutterBlink 5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes trackEye {

    0%,
    100% {
        d: path('M3 11c0-3.866 3.582-7 8-7s8 3.134 8 7');
    }

    50% {
        d: path('M3 11c0-2 3.582-5 8-5s8 3 8 5');
    }
}

@keyframes shutterBlink {

    0%,
    96%,
    100% {
        transform: scaleY(1);
    }

    98% {
        transform: scaleY(0.1);
    }
}

/* 25. Synergy - Node Orbit */
.central-node {
    animation: corePulse 3s ease-in-out infinite;
    transform-origin: center;
}

.orbit-node {
    transform-origin: center;
    animation: orbitSpin 8s linear infinite;
}

@keyframes corePulse {

    0%,
    100% {
        r: 3;
        opacity: 1;
    }

    50% {
        r: 2.5;
        opacity: 0.7;
    }
}

@keyframes orbitSpin {
    100% {
        transform: rotate(360deg);
    }
}

/* 26. Resume Bot - Document Flow */
.doc-feed {
    animation: docFeed 3s linear infinite;
}

@keyframes docFeed {
    0% {
        transform: translateY(-3px);
        opacity: 0.5;
    }

    50% {
        transform: translateY(3px);
        opacity: 1;
    }

    100% {
        transform: translateY(-3px);
        opacity: 0.5;
    }
}

/* 27. AR Games - Hand Gesture */
.hand-skeleton {
    animation: handWave 4s ease-in-out infinite;
    transform-origin: bottom center;
}

.track-point {
    animation: pointPulse 1.5s ease-in-out infinite alternate;
}

@keyframes handWave {

    0%,
    100% {
        transform: rotate(-5deg) scale(0.95);
    }

    50% {
        transform: rotate(5deg) scale(1.05);
    }
}

@keyframes pointPulse {
    0% {
        r: 1.5;
        opacity: 0.5;
    }

    100% {
        r: 2.5;
        opacity: 1;
    }
}

/* 28. Academic Suite - Gear Mechanics */
.gear-spin {
    transform-origin: center;
    animation: gearRotate 6s linear infinite;
}

.cal-page {
    transform-origin: top;
    animation: pageFlip 3s ease-in-out infinite;
}

@keyframes gearRotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pageFlip {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.85);
    }
}

/* 29. Vishnu - Satellite Float */
.sat-body {
    animation: satFloat 5s ease-in-out infinite;
    transform-origin: center;
}

.sat-waves {
    animation: waveEmit 2.5s linear infinite;
    stroke-width: 1;
    transform-origin: center;
}

@keyframes satFloat {

    0%,
    100% {
        transform: translateY(0) rotate(3deg);
    }

    50% {
        transform: translateY(-4px) rotate(-3deg);
    }
}

@keyframes waveEmit {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* 30. NeuroLink - Brain Signals */
.bci-waves path {
    stroke-dasharray: 4;
    animation: bciFlow 1.2s linear infinite;
}

@keyframes bciFlow {
    to {
        stroke-dashoffset: -8;
    }
}

/* 31. Aurora - Cloud Morphing */
.cloud-morph {
    animation: cloudMorph 6s ease-in-out infinite;
    transform-origin: center;
}

.rain-binary {
    animation: rainFall 2s linear infinite;
}

@keyframes cloudMorph {

    0%,
    100% {
        transform: scale(1) translateX(0);
    }

    50% {
        transform: scale(1.05) translateX(2px);
    }
}

@keyframes rainFall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* 32. Bhavya - Cognitive Neural Map */
.mind-profile {
    opacity: 0.4;
}

.signal-pulse {
    transform-origin: 12px 13px;
    animation: signalExpand 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.mind-core {
    animation: coreBlink 2s ease-in-out infinite alternate;
    transform-origin: 12px 13px;
}

@keyframes signalExpand {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
        stroke-width: 1.5;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
        stroke-width: 0.5;
    }
}

@keyframes coreBlink {
    0% {
        opacity: 0.6;
        transform: scale(0.9);
        fill-opacity: 0.4;
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
        fill-opacity: 1;
    }

}


/* 33. Circular Theme Portal Switch */
.circular-toggle-container {
    --toggle-sz: 48px;
    --toggle-orb-sz: 28px;
    --toggle-transition: 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);

    position: relative;
    width: var(--toggle-sz);
    height: var(--toggle-sz);
    margin-left: 1rem;
}

.circular-toggle-input {
    display: none;
}

.circular-switch {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        inset 0 0 6px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(255, 255, 255, 0.2);
    transition: all 0.6s ease;
    transform: scale(1);
}

.circular-switch:active {
    transform: scale(0.92);
}

/* Dark Mode Switch Background */
.circular-toggle-input:checked+.circular-switch {
    background: linear-gradient(180deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.05);
}

.circular-sky-objects {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* SUN */
.circular-sun {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--toggle-orb-sz);
    height: var(--toggle-orb-sz);
    background: radial-gradient(circle at center, #fff176 0%, #ffb300 40%, #ff6f00 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 5px rgba(255, 235, 59, 0.8),
        0 0 10px rgba(255, 152, 0, 0.6),
        inset 0 0 6px rgba(255, 255, 255, 0.5);
    transition: var(--toggle-transition);
    z-index: 2;
}

.circular-sun::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: sun-pulse 2s infinite alternate ease-in-out;
    z-index: -1;
}

.circular-sun::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180%;
    height: 180%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 193, 7, 0.2) 0deg 10deg, transparent 10deg 20deg);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin-rays 20s linear infinite;
    z-index: -2;
    mask-image: radial-gradient(black 40%, transparent 70%);
    -webkit-mask-image: radial-gradient(black 40%, transparent 70%);
}

/* MOON */
.circular-moon {
    position: absolute;
    top: 150%;
    left: 50%;
    width: var(--toggle-orb-sz);
    height: var(--toggle-orb-sz);
    background: radial-gradient(circle at 30% 30%, #f3f4f6, #cbd5e1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), inset -3px -3px 6px rgba(0, 0, 0, 0.2);
    transition: var(--toggle-transition);
}

.circular-crater {
    position: absolute;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.cc1 {
    top: 20%;
    left: 30%;
    width: 20%;
    height: 20%;
}

.cc2 {
    bottom: 25%;
    right: 20%;
    width: 15%;
    height: 15%;
}

.cc3 {
    top: 40%;
    right: 15%;
    width: 10%;
    height: 10%;
}

.circular-toggle-input:checked+.circular-switch .circular-sun {
    top: 150%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
}

.circular-toggle-input:checked+.circular-switch .circular-moon {
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* CLOUDS */
.circular-clouds-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: 0.5s ease;
}

.circular-cloud {
    position: absolute;
    background: linear-gradient(to bottom, #fff 0%, #f1f5f9 100%);
    border-radius: 50px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.circular-cloud::before,
.circular-cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.circular-cloud::before {
    top: -60%;
    left: 10%;
    width: 50%;
    height: 160%;
}

.circular-cloud::after {
    top: -40%;
    right: 10%;
    width: 60%;
    height: 140%;
}

.ccl-1 {
    top: 12px;
    left: 8px;
    width: 15px;
    height: 6px;
    opacity: 0.9;
    animation: float 5s ease-in-out infinite alternate;
}

.ccl-2 {
    top: 25px;
    right: 8px;
    width: 12px;
    height: 5px;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite alternate-reverse;
}

.ccl-3 {
    top: 8px;
    right: 12px;
    width: 8px;
    height: 4px;
    opacity: 0.5;
    animation: float 7s ease-in-out infinite alternate 1s;
}

.circular-toggle-input:checked+.circular-switch .circular-clouds-container {
    transform: translateY(30px);
    opacity: 0;
}

/* STARS */
.circular-stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: 0.8s ease;
    transform: translateY(-20px);
}

.circular-star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out;
}

.cs1 {
    top: 8px;
    left: 12px;
    width: 1.5px;
    height: 1.5px;
}

.cs2 {
    bottom: 10px;
    left: 10px;
    width: 1px;
    height: 1px;
    animation-delay: 0.5s;
}

.cs3 {
    top: 12px;
    right: 10px;
    width: 1px;
    height: 1px;
    animation-delay: 1s;
}

.cs4 {
    bottom: 15px;
    right: 15px;
    width: 1.5px;
    height: 1.5px;
    animation-delay: 0.2s;
}

.circular-shooting-star {
    position: absolute;
    top: 10px;
    left: 0;
    width: 15px;
    height: 1px;
    background: linear-gradient(90deg, white, transparent);
    transform: rotate(-45deg) translateX(-30px);
    opacity: 0;
}

.circular-toggle-input:checked+.circular-switch .circular-stars-container {
    opacity: 1;
    transform: translateY(0);
}

.circular-toggle-input:checked+.circular-switch .circular-shooting-star {
    animation: shoot 3s infinite ease-in-out 1s;
}

/* 100x Upgraded Circular Theme Toggle */
.circular-toggle-container-ug {
    --toggle-sz: 52px;
    --toggle-orb-sz: 28px;
    --toggle-transition: 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);

    position: relative;
    width: var(--toggle-sz);
    height: var(--toggle-sz);
    margin-left: 1rem;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.circular-toggle-input-ug {
    display: none;
}

.circular-switch-ug {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(180deg, #38bdf8 0%, #818cf8 100%);
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform: scale(1);
}

.circular-switch-ug:hover {
    transform: scale(1.05);
}

.circular-switch-ug:active {
    transform: scale(0.95);
}

.circular-toggle-input-ug:checked+.circular-switch-ug {
    background: linear-gradient(180deg, #020617 0%, #4c1d95 100%);
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(168, 85, 247, 0.2);
}

.circular-sky-objects-ug {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* SUN - 100x Glow */
.circular-sun-ug {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--toggle-orb-sz);
    height: var(--toggle-orb-sz);
    background: radial-gradient(circle at 30% 30%, #fef3c7 0%, #fbbf24 40%, #d97706 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 10px rgba(251, 191, 36, 0.8),
        0 0 20px rgba(245, 158, 11, 0.5),
        inset -2px -2px 6px rgba(180, 83, 9, 0.2);
    transition: var(--toggle-transition);
    z-index: 2;
}

.circular-sun-ug::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160%;
    height: 160%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    border-radius: 50%;
    animation: sun-pulse 3s infinite alternate ease-in-out;
    z-index: -1;
}

.circular-sun-ug::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180%;
    height: 180%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.2) 0deg 10deg, transparent 10deg 20deg);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin-rays 12s linear infinite;
    z-index: -2;
    mask-image: radial-gradient(black 40%, transparent 70%);
    -webkit-mask-image: radial-gradient(black 40%, transparent 70%);
}

/* MOON */
.circular-moon-ug {
    position: absolute;
    top: 150%;
    left: 50%;
    width: var(--toggle-orb-sz);
    height: var(--toggle-orb-sz);
    background: radial-gradient(circle at 30% 30%, #e2e8f0, #94a3b8);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    box-shadow: inset -4px -4px 8px rgba(15, 23, 42, 0.5), 0 0 15px rgba(148, 163, 184, 0.4);
    transition: var(--toggle-transition);
}

.circular-crater-ug {
    position: absolute;
    background: rgba(15, 23, 42, 0.15);
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.2);
}

.cc1 {
    top: 25%;
    left: 30%;
    width: 25%;
    height: 25%;
}

.cc2 {
    bottom: 20%;
    right: 20%;
    width: 18%;
    height: 18%;
}

.cc3 {
    top: 35%;
    right: 15%;
    width: 12%;
    height: 12%;
}

.circular-toggle-input-ug:checked+.circular-switch-ug .circular-sun-ug {
    top: 150%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
}

.circular-toggle-input-ug:checked+.circular-switch-ug .circular-moon-ug {
    top: 50%;
    transform: translate(-50%, -50%) scale(1) rotate(-15deg);
    opacity: 1;
}

/* High-End Sun/Moon Toggle */
:root {
    --toggle-border: #27272a;
    --toggle-bg: #ffffff;
    --icon-color: #27272a;
    --moon-mask: var(--bg-color);
    /* Matches theme background */
}

:root[data-theme="dark"] {
    --toggle-border: #52525b;
    --toggle-bg: #09090b;
    --icon-color: #ffffff;
    --moon-mask: var(--bg-color);
}

/* The Toggle Component */
/* The Toggle Component - Resized */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    /* Use flex for alignment */
    align-items: center;
    vertical-align: middle;
}

/* Hide Default Checkbox */
.toggle-switch input {
    display: none;
}

/* The Track (Outline) */
.track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    border: 2px solid var(--toggle-border);
    border-radius: 20px;
    transition: border-color 0.4s ease;
}

/* The Moving Icon Container */
.icon {
    position: absolute;
    top: 4px;
    /* Centered: (26 - 18) / 2 = 4 */
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* The Central Circle (Sun Body / Moon Body) */
.icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--icon-color);
    transition: background-color 0.4s ease;
    z-index: 1;
}

/* The Moon Mask (Shadow) */
.icon::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--moon-mask);
    transform: scale(0) translate(8px, -8px);
    /* Adjusted for smaller size */
    transform-origin: top right;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), background-color 0.4s ease;
    z-index: 2;
    /* On top of sun body */
}

/* Dark Mode (Checked) States */
/* Translation: 48 (w) - 18 (icon) - 4 (l) - 4 (r) = 22px */
.toggle-switch input:checked~.icon {
    transform: translateX(22px) rotate(100deg);
}

/* Reveal the moon mask */
.toggle-switch input:checked~.icon::after {
    transform: scale(0.85) translate(0, 0);
}

/* Hover & Active Effects */
.toggle-switch:active .track {
    border-color: var(--icon-color);
}

.toggle-switch:active .icon {
    /* Squish effect on click */
    width: 22px;
    margin-left: -2px;
    /* Center the squish */
}



.cert-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.cert-image-wrapper {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 1.2rem;
    margin: 0.3rem;
    background: #0f0f0f;
    aspect-ratio: 4/3;
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cert-card:hover .cert-img {
    transform: scale(1.05);
}

/* Removed interactive overlay and lightbox styles */
/* INFINITE MARQUEE (BADGES) */
.marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.02) 20%, rgba(255, 255, 255, 0.02) 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll 45s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.badge-item:hover {
    opacity: 1;
}

.badge-img {
    height: 48px;
    /* Reduced for better fit */
    max-width: 100px;
    /* Constrain wide logos further */
    width: auto;
    margin-bottom: 0.5rem;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
    object-fit: contain;
}

.badge-item:hover .badge-img {
    filter: grayscale(0%);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Assumes content is duplicated once */
}

/* CERTIFICATE TABS */
.cert-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
}

.cert-tab-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
    z-index: 2;
}

.cert-tab-btn.active {
    color: white;
}

.cert-tab-slider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 9999px;
    z-index: 1;
    /* width and transform handled by JS */
}


/* Zero Gravity Float Animation */
@keyframes float-random {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes float-random-reverse {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(15px);
    }
}

/* Floating Layout - Minimal Icon Only */
.skill-card {
    /* Size Container */
    width: 64px;
    height: 64px;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;

    /* Transparent - No Bubble/Circle */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;

    /* Default State */
    filter: grayscale(100%) opacity(0.6);
    transform: scale(0.85);
    /* Will be overridden by JS */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: visible;
    margin: 0 1rem;
}

/* Active Spotlight State (Applied via JS) */
.skill-card.active {
    /* Full Pop */
    filter: grayscale(0%) opacity(1) !important;
    transform: scale(1.4) translateY(-10px);
    /* Slightly larger scale since no border */
    z-index: 100;

    /* No Bubble Background */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Dark Mode Active Override */
[data-theme="dark"] .skill-card.active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Hover State */
.skill-card:hover {
    filter: grayscale(0%) opacity(1) !important;
    transform: scale(1.45) translateY(-5px) !important;
    z-index: 110;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .skill-card:hover {
    background: transparent !important;
    border: none !important;
}

/* Logo Image Styling */
.skill-img {
    height: 48px;
    /* Larger icon since container is invisible */
    width: 48px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Add a subtle drop shadow to lift it off the page */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .skill-img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Utility for dark icons (like n8n) */
[data-theme="dark"] .skill-img.invert-dark {
    filter: invert(1) brightness(2) drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Active/Hover Image Styling */
.skill-card.active .skill-img,
.skill-card:hover .skill-img {
    filter: grayscale(0%) drop-shadow(0 10px 20px rgba(var(--primary-rgb, 168, 85, 247), 0.5));
    transform: scale(1.1);
}

/* Text Styling - Show on Hover */
.skill-name {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.05em;
}

.skill-card {
    position: relative;
    /* Ensure positioning context */
}

.skill-card:hover .skill-name {
    opacity: 1;
    visibility: visible;
    bottom: -3rem;
    transform: translateX(-50%) translateY(0);
}



/* Marquee Track */
.marquee-track {
    display: flex;
    gap: 2rem;
    /* Reduced gap */
    width: max-content;
    padding: 4rem 0;
}

/* Animation Controls */
.marquee-left {
    animation: scroll-left 40s linear infinite;
    /* Slightly faster to show effect */
}

.marquee-right {
    animation: scroll-right 40s linear infinite;
}

.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    to {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}



.no-invert {
    filter: none !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
}

/* Wavy Animation Keyframes */
@keyframes float-wave {

    0%,
    100% {
        transform: translateY(0) scale(0.85);
    }

    50% {
        transform: translateY(-12px) scale(0.85);
    }
}

.skill-card {
    /* Apply wave animation */
    animation: float-wave 3s ease-in-out infinite;
    will-change: transform;
    /* Optimize for performance */
}

.skill-card:hover {
    /* Pause wave on hover to allow scale effect to take over smoothly */
    animation-play-state: paused;
}

/* ----- New Project Icons Animations ----- */

/* 8. Aurora */
@keyframes cloudFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.cloud-morph {
    animation: cloudFloat 4s ease-in-out infinite;
}

@keyframes rainDrop {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    80% {
        transform: translateY(10px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.rain-binary {
    animation: rainDrop 2s ease-in infinite;
}

/* 9. Bhavya */
@keyframes mindPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.mind-profile {
    animation: mindPulse 4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes signalExpand {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.signal-pulse {
    animation: signalExpand 2.5s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    transform-origin: center;
}

@keyframes coreGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.mind-core {
    animation: coreGlow 2.5s ease-in-out infinite;
    transform-origin: center;
}

/* 10. HRIDYA */
.ecg-line {
    stroke-dasharray: 60;
    animation: drawECG 2.5s linear infinite;
}

@keyframes drawECG {
    0% {
        stroke-dashoffset: 60;
    }

    100% {
        stroke-dashoffset: -60;
    }
}

/* 11. EdgeSight */
@keyframes scanBoxFocus {

    0%,
    100% {
        stroke-opacity: 0.4;
    }

    50% {
        stroke-opacity: 1;
        stroke-width: 2px;
    }
}

.scan-box {
    animation: scanBoxFocus 2s infinite;
}

@keyframes scanLineMove {
    0% {
        transform: translateY(-2px);
        opacity: 0.3;
    }

    50% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        transform: translateY(2px);
        opacity: 0.3;
    }
}

.scan-line {
    animation: scanLineMove 1.5s infinite;
}

/* 12. Hackathon Team Management */
@keyframes teamBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.team-bounce-1 {
    animation: teamBounce 2s ease-in-out infinite;
}

.team-bounce-2 {
    animation: teamBounce 2s ease-in-out infinite 0.5s;
}

/* ============================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ============================================ */

/* Small screens (max-width: 640px) */
@media (max-width: 640px) {

    /* -- Hero Section -- */
    .hero-bg {
        padding-top: 5rem;
        padding-bottom: 3rem;
        min-height: 100dvh;
    }

    /* -- Section Spacing -- */
    .section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* -- Section Headings -- */
    .section-heading h2 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    /* -- Project Cards -- */
    .card-content {
        padding: 1.25rem !important;
    }

    .card-content h3 {
        font-size: 1.05rem;
    }

    .card-content .mb-6 {
        margin-bottom: 1rem;
    }

    .card-content .mb-6 p {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    .card-content .flex.justify-between.items-start.mb-6 {
        margin-bottom: 0.75rem;
    }

    .card-content .mt-auto.border-t.pt-6 {
        padding-top: 0.75rem;
    }

    /* -- Filter Buttons (Projects) -- */
    #filter-container {
        gap: 0.4rem;
    }

    #filter-container .filter-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.6rem !important;
        letter-spacing: 0.1em;
    }

    /* -- Tabs (Experience/Education) -- */
    .tab-button {
        padding: 0.6rem 1.25rem !important;
        font-size: 0.8rem !important;
    }

    #liquid-tab-container {
        padding: 0.25rem;
    }

    /* -- Timeline Cards -- */
    .relative.pl-10 {
        padding-left: 1.5rem;
    }

    .relative.pl-10 .glass {
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
    }

    .relative.pl-10 .glass h3 {
        font-size: 1.15rem;
    }

    .relative.pl-10 .glass p.text-lg {
        font-size: 0.9rem;
    }

    .relative.pl-10 .space-y-16 {
        gap: 2rem;
    }

    .relative.pl-10 span[class*="-left-"][class*="top-2"] {
        left: -33px;
    }

    /* -- About Section -- */
    .glass.rounded-3xl.p-6 {
        padding: 1.25rem;
        border-radius: 1.25rem;
    }

    .glass.p-5.rounded-2xl {
        padding: 0.85rem;
    }

    .glass.p-6.rounded-2xl {
        padding: 1rem;
    }

    /* -- Contact Section -- */
    .glass.rounded-3xl.p-8 {
        padding: 1.25rem !important;
    }

    .bg-\[var\(--bg-color\)\]\/30.p-10 {
        padding: 1.25rem !important;
    }

    .space-y-8 > * + * {
        margin-top: 1.25rem;
    }

    .contact a.flex.items-center.gap-5,
    .flex.items-center.gap-5 {
        gap: 0.75rem;
        padding: 0.5rem;
    }

    .w-14.h-14 {
        width: 2.75rem;
        height: 2.75rem;
    }

    /* -- Skills Marquee -- */
    .marquee-track {
        padding: 1.5rem 0;
        gap: 0.75rem;
    }

    .skill-card {
        width: 48px;
        height: 48px;
        margin: 0 0.4rem;
    }

    .skill-img {
        height: 36px;
        width: 36px;
    }

    /* -- Showcase Section -- */
    .showcase-container {
        margin: 1.5rem 0 2rem 0;
    }

    .showcase-item .label-text {
        font-size: 0.8rem;
        letter-spacing: 0.08em;
    }

    .showcase-item:hover .label-text {
        font-size: 1.3rem;
        margin-bottom: 160px;
    }

    .showcase-item:hover {
        height: 320px;
    }

    .showcase-details {
        padding: 1.25rem;
    }

    /* -- Modal -- */
    .modal-container {
        padding: 1.25rem;
        border-radius: 1.5rem 1.5rem 0 0;
        max-height: 95vh;
    }

    #modal-content {
        padding: 0.5rem !important;
    }

    #modal-content h2 {
        font-size: 1.3rem;
    }

    #modal-content p,
    #modal-content li {
        font-size: 0.9rem !important;
        line-height: 1.6;
    }

    #modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    /* -- Footer -- */
    footer .container {
        padding: 0 0.5rem;
    }

    /* -- Glass Buttons -- */
    .glass-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .glass-btn-primary {
        padding: 0.6rem 1.25rem;
    }

    /* -- Back to Top -- */
    #back-to-top {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }

    /* -- Header Logo -- */
    .logo-gradient-text {
        font-size: 1.15rem;
    }

    /* -- Form Submit Button -- */
    .glass-btn.glass-btn-primary.w-full.py-5 {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
        font-size: 0.95rem;
    }

    /* -- Reduce heavy blur on mobile for perf -- */
    .glass,
    .project-card,
    .smart-search-box {
        backdrop-filter: blur(12px) saturate(160%);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
    }

    /* -- Prevent horizontal overflow -- */
    body,
    html {
        overflow-x: hidden;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* -- Reduce animation complexity on mobile -- */
    .glass-orb {
        display: none;
    }

    /* -- CTA Buttons -- */
    .flex.flex-wrap.justify-center.gap-4.mt-10 {
        gap: 0.65rem;
        margin-top: 1.5rem;
    }

    .flex.flex-wrap.justify-center.gap-4.mt-10 .glass-btn {
        padding: 0.6rem 1.15rem;
        font-size: 0.8rem;
    }
}

/* Medium screens (max-width: 768px) – supplement existing media queries */
@media (max-width: 768px) and (min-width: 641px) {

    .card-content {
        padding: 1.5rem !important;
    }

    #filter-container .filter-btn {
        padding: 0.55rem 1.25rem !important;
        font-size: 0.65rem !important;
    }

    .tab-button {
        padding: 0.65rem 1.5rem !important;
        font-size: 0.85rem !important;
    }

    .relative.pl-10 .glass {
        padding: 1.5rem !important;
    }

    .marquee-track {
        padding: 2rem 0;
    }

    .glass.rounded-3xl.p-8 {
        padding: 1.5rem !important;
    }

    .bg-\[var\(--bg-color\)\]\/30.p-10 {
        padding: 1.5rem !important;
    }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
        border-color: inherit;
        box-shadow: inherit;
    }

    .project-card:active {
        transform: scale(0.98);
    }

    #projects-grid:hover > .project-card:not(:hover) {
        filter: none;
        opacity: 1;
    }

    .footer-social-link:hover {
        transform: none;
    }

    .footer-social-link:active {
        transform: scale(0.95);
    }

    .nav-link::after {
        display: none;
    }
}