:root {
    --glass-grey: rgba(15, 15, 15, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.1) 100%);
    --text-dark: #000000;
    --text-muted: #333333;
    --font-family: 'Outfit', sans-serif;
    --transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Performance Layer */
section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    /* Faster, more stable touch */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
}

html {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offset for floating nav bar */
}
    overflow-x: hidden;
    background-color: #f8f9fa;
    /* Prevents white flashes */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
}

body {
    font-family: var(--font-family);
    background-color: transparent;
    /* Allows blobs at z-index: -1 to show through */
    color: #000;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.loader-content {
    text-align: center;
}

.loader-logo-box {
    margin-bottom: 25px;
}

.loader-logo {
    height: 100px;
    width: auto;
    border-radius: 50%;
    animation: pulseLogo 2s infinite ease-in-out;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.2));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(0, 242, 255, 0.5));
    }
}

.loader-text {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 5px;
    margin-bottom: 20px;
    color: #000;
    opacity: 0.8;
}

.loader-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #00f2ff, #7000ff);
    position: absolute;
    left: -100%;
    animation: slideBar 2s infinite ease-in-out;
}

@keyframes slideBar {
    0% {
        left: -100%;
    }

    50% {
        left: 0;
    }

    100% {
        left: 100%;
    }
}

/* Fade out class */
.loader-fade-out {
    opacity: 0 !important;
    pointer-events: none;
}


/* Background Layers */
.blob-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Above HTML background */
    pointer-events: none;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    /* Ultra-lightweight static noise replacing heavy SVG feTurbulence */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.12;
    /* Slightly adjusted to match previous SVG visual intensity */
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 1200px;
    height: 64px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(45, 45, 45, 0.55) 50%, rgba(20, 20, 20, 0.7) 100%);
    backdrop-filter: url(#nav-liquidy-glass) blur(2px) saturate(450%) brightness(1.4);
    -webkit-backdrop-filter: url(#nav-liquidy-glass) blur(2px) saturate(450%) brightness(1.4);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 40px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: translateX(-50%);
    transition: all 0.5s var(--transition);
    will-change: transform, backdrop-filter;
}

.glass-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-reflection);
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
}

/* Removed Hover as requested */

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 32px;
    width: auto;
    margin-right: 12px;
    border-radius: 50%;
    /* Rounded edges */
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover .nav-logo {
    transform: scale(1.1) rotate(-5deg);
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -1px;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

.nav-reflection-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.reflection-blob {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.3);
    filter: blur(30px);
    border-radius: 50%;
    will-change: transform;
}


/* Main Layout */
main {
    padding: 160px 5% 80px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    /* High above blobs */
}

.glass-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.65) 0%, rgba(45, 45, 45, 0.45) 50%, rgba(20, 20, 20, 0.55) 100%);
    backdrop-filter: url(#liquidy-glass) blur(1px) saturate(400%) contrast(1.4) brightness(1.25);
    -webkit-backdrop-filter: blur(1px) saturate(400%) contrast(1.4) brightness(1.25);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    padding: 30px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
    will-change: transform, backdrop-filter;
    position: relative;
    overflow: hidden;
}

.glass-card p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-reflection);
    pointer-events: none;
    opacity: 0.6;
}

.main-hero-card {
    text-align: center;
    padding: 80px 60px;
    max-width: 900px;
    margin: 0 auto;
    /* Styles inherited from .glass-card now match global thickness */
    border-radius: 48px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.05),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-logo-box {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.hero-logo {
    height: 120px;
    width: auto;
    border-radius: 50%;
    /* Rounded edges */
    filter: drop-shadow(0 10px 20px rgba(0, 242, 255, 0.2));
    animation: floatLogo 6s ease-in-out infinite;
    will-change: transform;
    /* Performance boost */
}

@keyframes floatLogo {

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

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

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    /* Reduced max size */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 15px;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #fff;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero-description {
    max-width: 650px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.hero-description p {
    font-size: 16px;
    line-height: 1.7;
    color: #eee;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Section Header Glass */
.section-header-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 60px;
}

.section-header-glass {
    padding: 12px 40px;
    background: linear-gradient(170deg, rgba(20, 20, 20, 0.8) 0%, rgba(45, 45, 45, 0.6) 50%, rgba(20, 20, 20, 0.7) 100%);
    backdrop-filter: url(#liquidy-glass) blur(2px) saturate(450%) contrast(1.4) brightness(1.3);
    -webkit-backdrop-filter: blur(2px) saturate(450%) contrast(1.4) brightness(1.3);
    border: 2px solid rgba(255, 255, 255, 1);
    border-radius: 60px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.04),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.section-header-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-reflection);
    pointer-events: none;
    opacity: 0.4;
    border-radius: inherit;
}

.section-header-glass:hover {
    transform: translateY(-5px);
}

.section-title {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #fff;
    margin-bottom: 0;
    text-transform: uppercase;
}

.services-section {
    padding: 100px 0;
    margin-top: 120px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 120px;
    perspective: 1000px;
}

.service-card {
    text-align: left;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.icon-box {
    width: 32px;
    height: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backface-visibility: hidden;
    transform: translateZ(0);
    pointer-events: none;
    /* Icon won't flicker on separate touch */
}

.icon-svg {
    width: 100%;
    height: 100%;
    color: #fff;
    stroke-width: 1.5;
    transition: all 0.5s ease;
    backface-visibility: hidden;
    pointer-events: none;
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-15px) scale(1.02);
        background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(50, 50, 50, 0.4) 100%);
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
        backdrop-filter: url(#liquidy-glass) blur(10px) saturate(200%);
    }

    .service-card:hover .icon-box {
        transform: translateY(-8px) scale(1.15);
    }

    .service-card:hover .icon-svg {
        stroke-dasharray: 100;
        animation: drawStroke 1.2s ease-out forwards;
    }
}

@keyframes drawStroke {
    from {
        stroke-dashoffset: 100;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.service-card h3 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: -0.01em;
}

/* Dashboard-style Animated Icons (On Hover) */
.service-card .dash-rect,
.service-card .dash-line-1,
.service-card .dash-line-2,
.service-card .prod-box,
.service-card .prod-lines,
.service-card .mail-envelope,
.service-card .mail-flap,
.service-card .blog-doc,
.service-card .blog-corner,
.service-card .blog-line-1,
.service-card .blog-line-2,
.service-card .blog-line-3 {
    stroke-dashoffset: 0;
    stroke-dasharray: 200;
}

.service-card:hover .dash-rect {
    animation: dash 1s ease-in-out;
}

.service-card:hover .dash-line-1 {
    animation: dash 1s ease-in-out 0.1s;
}

.service-card:hover .dash-line-2 {
    animation: dash 1s ease-in-out 0.2s;
}

.service-card:hover .prod-box {
    animation: dash 1s ease-in-out;
}

.service-card:hover .prod-lines {
    animation: dash 1s ease-in-out 0.2s;
}

.service-card:hover .mail-envelope {
    animation: dash 1s ease-in-out;
}

.service-card:hover .mail-flap {
    animation: dash 1s ease-in-out 0.2s;
}

.service-card:hover .blog-doc {
    animation: dash 1s ease-in-out;
}

.service-card:hover .blog-corner {
    animation: dash 1s ease-in-out 0.1s;
}

.service-card:hover .blog-line-1 {
    animation: dash 0.6s ease-in-out 0.3s;
}

.service-card:hover .blog-line-2 {
    animation: dash 0.6s ease-in-out 0.4s;
}

.service-card:hover .blog-line-3 {
    animation: dash 0.6s ease-in-out 0.5s;
}

@keyframes dash {
    from {
        stroke-dashoffset: 200;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 120px;
}

.project-card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.project-img-box {
    width: calc(100% - 30px);
    height: 240px;
    margin: 15px 15px 0;
    background: #e0e0e0;
    overflow: hidden;
    border-radius: 35px;
}

.project-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover img {
    transform: scale(1.08);
}

.project-info {
    padding: 25px;
}

.project-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}

.project-info p {
    font-size: 14px;
    color: #ccc;
}

/* More Projects Card Styling */
.more-to-come {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
}

.more-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.more-content p {
    font-size: 16px;
    color: #ccc;
    max-width: 320px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.2;
    animation: pulseDot 1.5s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

/* CTA */

.platform-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.platform-btn {
    position: relative;
    padding: 16px 40px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

/* Light Sweep Animation */
.platform-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: rotate(30deg);
}

.platform-btn:hover::after {
    left: 150%;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.fiverr,
.contra {
    background: linear-gradient(135deg, #050505 0%, #1a1a1a 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.fiverr:hover,
.contra:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #050505 0%, #1a1a1a 100%);
    /* Consistent color */
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px) saturate(250%) contrast(1.2) brightness(1.1);
    -webkit-backdrop-filter: blur(25px) saturate(250%) contrast(1.2) brightness(1.1);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 60px;
    border-radius: 60px;
    background: linear-gradient(170deg, rgba(20, 20, 20, 0.85) 0%, rgba(45, 45, 45, 0.65) 50%, rgba(20, 20, 20, 0.75) 100%);
    backdrop-filter: url(#liquidy-glass) blur(2px) saturate(450%) contrast(1.5) brightness(1.3);
    -webkit-backdrop-filter: blur(2px) saturate(450%) contrast(1.5) brightness(1.3);
    border: 2px solid rgba(255, 255, 255, 1);
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 60px 120px rgba(0, 0, 0, 0.2),
        inset 0 0 50px rgba(255, 255, 255, 0.15);
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-reflection);
    pointer-events: none;
    opacity: 0.5;
    border-radius: inherit;
}

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

.close-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #fff;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.modal-image {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-overlay.active .modal-image img {
    cursor: zoom-in;
    pointer-events: auto;
}

.modal-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #fff;
}

.modal-text p {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.9;
    color: #eee;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.tech-tag {
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Hide content under modal */
.hide-content {
    filter: blur(10px) saturate(250%) contrast(1.15);
    opacity: 0.5 !important;
    pointer-events: none;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* CTA Section */
.cta {
    padding: 100px 0 160px;
    margin-top: 100px;
    /* Added spacing from projects */
}

.cta-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
}

.cta-card h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: #fff;
}

.cta-subtext {
    font-size: 18px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    main {
        padding: 140px 4% 80px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    /* Selective Liquid Effect - Performance Optimized for Mobile Cooling */
    .glass-nav,
    .main-hero-card,
    .section-header-glass,
    .modal-content,
    .more-to-come {
        backdrop-filter: blur(15px) saturate(200%) brightness(1.2) !important;
        -webkit-backdrop-filter: blur(15px) saturate(200%) brightness(1.2) !important;
        background: linear-gradient(135deg, rgba(25, 25, 25, 0.45) 0%, rgba(45, 45, 45, 0.25) 100%) !important;
        filter: none !important; /* Disable heavy SVG filters on mobile */
        border-width: 1.5px !important;
        transform: translateZ(0);
    }

    .noise-overlay {
        display: none;
    }

    /* Compact Horizontal Navigation */
    .glass-nav {
        width: 94%;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 15px;
        height: 56px;
        padding: 0 20px;
        border-radius: 28px;
    }

    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0;
        height: 100%;
        gap: 0;
    }

    .logo {
        transform: scale(0.9);
    }

    .logo-text {
        font-size: 16px;
        color: #fff;
        display: none; /* Ultra-clean logo-only mobile view */
    }

    .nav-logo {
        height: 30px;
        margin-right: 0;
    }

    .nav-links {
        gap: 15px;
        width: auto;
        justify-content: flex-end;
        padding: 0;
        border: none;
        margin: 0;
    }

    .nav-links a {
        font-size: 10px;
        letter-spacing: 1px;
        font-weight: 700;
        color: #fff !important;
    }

    /* Main Layout Stability */
    main {
        padding: 110px 4% 60px;
        width: 100%;
        overflow-x: hidden;
    }

    /* Hero Refinement */
    .main-hero-card {
        padding: 50px 20px;
        border-radius: 40px;
    }

    .hero-logo {
        height: 90px;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-top: 15px;
        letter-spacing: -1.5px;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 10px;
        letter-spacing: 2.5px;
        margin-bottom: 20px;
    }

    .hero-description {
        border-top-color: rgba(255, 255, 255, 0.1);
        padding-top: 20px;
    }

    .hero-description p {
        font-size: 14px;
        line-height: 1.6;
        color: #eee;
    }

    /* Grid Adjustments */
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .glass-card {
        padding: 25px 20px;
        border-radius: 35px;
    }

    .project-img-box {
        height: 200px !important;
        border-radius: 25px !important;
        margin: 10px 10px 0 !important;
    }

    /* Service Card Mobile Specifics */
    .service-card {
        align-items: center;
        text-align: center;
    }

    .icon-box {
        margin-bottom: 15px;
    }

    /* Disable sticky hover/active transforms on mobile */
    .service-card:active,
    .project-card:active {
        transform: scale(0.98) !important;
    }

    /* Modal Mobile Fixes */
    .modal-content {
        padding: 50px 20px 30px;
        width: 94%;
        max-height: 90vh;
        border-radius: 40px;
        background: linear-gradient(170deg, rgba(20, 20, 20, 0.95) 0%, rgba(40, 40, 40, 0.85) 100%) !important;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .modal-image {
        height: 240px;
        border-radius: 20px;
    }

    .modal-text {
        text-align: center;
    }

    .modal-text h2 {
        font-size: 26px;
        margin-bottom: 15px;
        color: #fff !important;
    }

    .modal-text p {
        font-size: 15px;
        color: #ddd !important;
        line-height: 1.5;
    }

    .tech-stack {
        justify-content: center;
        gap: 8px;
        margin-bottom: 30px;
    }

    .tech-tag {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        padding: 5px 12px;
    }

    .platform-btn {
        width: 100%;
        padding: 16px;
        font-size: 15px;
    }

    .platform-links {
        flex-direction: column;
        gap: 12px;
    }

    .close-modal {
        top: 20px;
        right: 20px;
        font-size: 30px;
        background: rgba(255, 255, 255, 0.1);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra Small Device Adjustments (iPhone SE, etc.) */
@media (max-width: 480px) {
    .glass-nav {
        width: 96%;
        top: 10px;
        height: 52px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 9px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 12px;
        letter-spacing: 3px;
    }

    .section-header-glass {
        padding: 10px 25px;
    }

    .main-hero-card {
        padding: 40px 15px;
    }
}


/* Image Viewer Lightbox */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: zoom-out;
}

.image-viewer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.image-viewer-content {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.image-viewer-overlay.active .image-viewer-content {
    transform: scale(1);
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}