/* ================================
   work.css
   mc.labucca portfolio — Optimized
   ================================
   OPTIMIZATIONS APPLIED:
   [PERF] will-change already present on cursor elements (good)
   [INFO] Duplicate :root block — see NOTE below

   NOTE: :root variables (lines below) are duplicated across
   main.css, work.css, and project-page.css. To eliminate the
   ~144 lines of duplication, extract them to base.css and load
   it first in every HTML page. See AUDIT_REPORT.md §10.
   ================================ */
:root {
    --primary: #6840B8;
    --secondary: #B39DDB;
    --dark: #111111;
    --white: #FFFFFF;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    --gradient: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* [PERF] was `all` — now specific to avoid transitioning expensive properties */
    --transition-slow: color 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* [PERF] was `all` */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* ================================
   Custom Cursor - Minimal Stable Pencil
   ================================ */
/* Main cursor pointer - visible dot at the tip */
.cursor-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid white;
    position: fixed;
    top: -5px;
    left: -5px; /* [PERF] Offset so transform:translate(x,y) centers dot on cursor point */
    pointer-events: none;
    z-index: 10000;
    transition: opacity 0.15s ease;
    opacity: 0;
    will-change: transform;
    box-shadow: 0 0 0 2px rgba(104, 64, 184, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.cursor-dot.active {
    opacity: 1;
}

.cursor-dot.hover {
    /* transform: scale(1.3) — now applied in JS animateCursor() to avoid CSS/JS transform conflicts */
    background: #8B5CF6;
}

/* Minimal pencil design - stable and clean */
.cursor-outline {
    width: 24px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0; /* [PERF] Positioning via transform:translate() in JS — no layout reflow */
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
    opacity: 0;
    will-change: transform;
    --pencil-rotation: -230deg;
    /* transform handled entirely in JS animateCursor() as translate(x,y)+rotate(-230deg) */
    transform-origin: 86% 53%; /* pivot near pencil tip — JS relies on this */
}

.cursor-outline.active {
    opacity: 1;
}

/* Pencil body */
.cursor-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 50px;
    background: linear-gradient(to bottom,
            #FF6B9D 0%,
            #FF6B9D 12%,
            var(--primary) 12%,
            var(--primary) 88%,
            #333 88%,
            #1a1a1a 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: inset -1px 0 2px rgba(0, 0, 0, 0.2),
        2px 2px 4px rgba(0, 0, 0, 0.15);
}

/* Pencil tip */
.cursor-outline::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #1a1a1a;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

/* Continuous curved line trail using SVG */
.cursor-trail-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(3px);
}

.cursor-trail-svg.active {
    opacity: 1;
}

.cursor-trail-path {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
    filter: drop-shadow(0 0 3px rgba(104, 64, 184, 0.4));
    animation: trailFade 1.5s ease-out forwards;
}

@keyframes trailFade {
    0% {
        opacity: 0.8;
        stroke-width: 2.5;
    }

    100% {
        opacity: 0;
        stroke-width: 1.5;
    }
}

/* Sketch marks on click */
.cursor-sketch {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 12px;
    background: rgba(104, 64, 184, 0.6);
    pointer-events: none;
    z-index: 9997;
    animation: sketchFade 0.5s ease-out forwards;
    will-change: transform, opacity;
    transform-origin: center;
    border-radius: 1px;
    filter: blur(3px);
}

@keyframes sketchFade {
    0% {
        opacity: 0.8;
        transform: scale(1) rotate(var(--rotation));
    }

    100% {
        opacity: 0;
        transform: scale(0.7) rotate(var(--rotation)) translateY(5px);
    }
}

/* Cursor hover effects */
a:hover~.cursor-outline,
button:hover~.cursor-outline,
.filter-chip:hover~.cursor-outline,
.project-card:hover~.cursor-outline {
    opacity: 0.8;
}

/* Hide custom cursor on mobile */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline,
    .cursor-trail-svg,
    .cursor-sketch {
        display: none;
    }

    /* Reduce animation complexity on mobile for better performance */
    .bg-shape,
    .dots-pattern,
    .grid-background,
    .particle {
        animation-duration: 40s;
        /* Slower animations */
    }

    .tech-stack::before {
        animation: none;
        /* Disable glow pulse on mobile */
        opacity: 0.8;
    }
}

/* ================================
   Images & Links
   ================================ */
img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ================================
   Typography
   ================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   Container & Layout
   ================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(104, 64, 184, 0.4);
}

.btn-primary:hover {
    background: #5834a0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(104, 64, 184, 0.5);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ================================
   Page Loader - Universal
   ================================ */

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    animation: loaderFadeIn 0.6s ease-out;
    will-change: transform, opacity;
}

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

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

.loader-logo {
    position: relative;
    margin-bottom: 1.5rem;
}

.loader-square {
    font-size: 4rem;
    color: var(--primary);
    display: inline-block;
    animation: logoScale 1.5s ease-in-out infinite;
    will-change: transform;
}

@keyframes logoScale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.loader-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1.5rem;
    background-color: var(--primary);
    border-radius: 2px;
    animation: squarePulse 1.2s ease-in-out infinite;
}

@keyframes squarePulse {

    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.6;
        transform: rotate(0deg);
    }

    50% {
        transform: scale(1);
        opacity: 1;
        transform: rotate(180deg) scale(1.05);
    }

    100% {
        transform: rotate(360deg);
    }
}


.loader-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--dark);
    letter-spacing: 0.05em;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Prevent body scroll when loader is active */
body.loader-active {
    overflow: hidden;
}

/* ================================
   Navigation
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    font-family: 'JetBrains Mono', monospace;
}

.logo-bracket {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(104, 64, 184, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.nav-cta:hover::before {
    width: 300px;
    height: 300px;
}

.nav-cta:hover {
    background: #5834a0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(104, 64, 184, 0.5);
}

.nav-cta svg {
    transition: var(--transition);
}

.nav-cta:hover svg {
    transform: translateX(4px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}


/* ================================
   Section Headers
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 3rem;
    color: var(--dark);
    margin: 1rem 0;
}

.section-description {
    max-width: 600px;
    margin: 1rem auto 0;
    color: var(--gray-600);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ================================
   Featured Works Section
   ================================ */
.projects {
    position: relative;
    overflow: hidden;
}

.grid-background {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(104, 64, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 64, 184, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridSlide 30s linear infinite;
    z-index: 0;
}

@keyframes gridSlide {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 60px);
    }
}

.projects .container {
    position: relative;
    z-index: 1;
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip svg {
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(104, 64, 184, 0.4);
}

.filter-chip.active:hover {
    background: #5834a0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    content-visibility: auto;
    contain: layout style paint;
}

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

.project-card.fade-out {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.fade-in {
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

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

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    overflow: hidden;
}

.project-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    background: var(--gray-200);
}

/* Fallback for broken/missing images */
.project-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(104, 64, 184, 0.05) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
}

.project-thumbnail:not([src]),
.project-thumbnail[src=""],
.project-thumbnail[src*="placeholder"] {
    opacity: 0;
}

.project-thumbnail:not([src])::before,
.project-thumbnail[src=""]::before,
.project-thumbnail[src*="placeholder"]::before {
    opacity: 1;
}

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

.project-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

.project-date svg {
    color: var(--primary);
    flex-shrink: 0;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.project-description {
    flex-grow: 1;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
    margin-top: auto;
}

.project-link:hover {
    gap: 1rem;
}

.section-footer {
    text-align: center;
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1rem;
    }

    .footer-logo .logo-text {
        font-size: 1.1rem;
    }
}

/* ================================
   Section Divider
   ================================ */
.section-divider {
    padding: 3rem 0;
    background: var(--white);
}

.divider-line {
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            var(--gray-300) 20%,
            var(--gray-300) 80%,
            transparent);
    position: relative;
}

.divider-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--gray-300);
    animation: dividerPulse 2s ease-in-out infinite;
}

@keyframes dividerPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--gray-300);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 0 6px var(--white), 0 0 0 7px var(--primary);
        opacity: 0.8;
    }
}

/* ================================
   Contact Section
   ================================ */
.contact {
    position: relative;
    overflow: hidden;
}

.floating-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: floatParticle 15s ease-in-out infinite;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation: floatParticle 18s ease-in-out infinite 2s;
}

.particle:nth-child(3) {
    top: 40%;
    left: 30%;
    animation: floatParticle 20s ease-in-out infinite 4s;
}

.particle:nth-child(4) {
    top: 70%;
    left: 60%;
    animation: floatParticle 16s ease-in-out infinite 6s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 90%;
    animation: floatParticle 22s ease-in-out infinite 8s;
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translate(50px, -80px) scale(1.5);
        opacity: 0.5;
    }

    50% {
        transform: translate(100px, -40px) scale(1);
        opacity: 0.4;
    }

    75% {
        transform: translate(50px, -120px) scale(1.2);
        opacity: 0.6;
    }
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-description {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 12px;
    transition: var(--transition);
}

.contact-method:hover {
    background: var(--white);
    box-shadow: var(--shadow);
}

.contact-method svg {
    color: var(--primary);
    flex-shrink: 0;
}

.method-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.method-value {
    font-weight: 600;
    color: var(--dark);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 12px;
    color: var(--gray-600);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-4px);
}

/* ================================
   Contact Form
   ================================ */
.contact-form {
    background: var(--gray-100);
    padding: 2.5rem;
    border-radius: 16px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
}

/* ================================
   Footer Section
   ================================ */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-text {
    color: var(--gray-400);
    margin-top: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--white);
}

/* ================================
   Footer Real-Time Clock
   ================================ */
.footer-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    font-weight: 500;
}

.time-icon {
    color: #FFA500;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.time-icon.night {
    color: #8B9DC3;
}

.time-icon:hover {
    transform: rotate(20deg);
}

#timeText {
    font-family: 'JetBrains Mono', monospace;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(104, 64, 184, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #5834a0;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(104, 64, 184, 0.6);
}

.back-to-top svg {
    transition: var(--transition);
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

.back-to-top:active {
    transform: translateY(-2px) scale(0.95);
}

/* ================================
   From Home Page Responsive Design
   ================================ */
@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-xl);
        transition: var(--transition);
        align-items: flex-start;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-cta {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding: 1rem 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .section-title {
        font-size: 2rem;
    }

    .project-filters {
        gap: 0.75rem;
    }

    .filter-chip {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .filter-chip svg {
        width: 16px;
        height: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1.5rem 0;
    }

    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-card {
        width: 100%;
        max-width: 100%;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .project-date {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        gap: 0.3rem;
    }

    .project-date svg {
        width: 12px;
        height: 12px;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ================================================================
   VERY SMALL SCREENS (320px - 360px)
   ================================================================ */
@media (max-width: 360px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }
 
    .container {
        padding: 0 0.75rem !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
 
    .projects {
        overflow-x: hidden;
    }
 
    .projects .container {
        padding: 0 0.75rem !important;
    }
 
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }
 
    .project-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto;
    }
 
    .project-content {
        padding: 1.5rem !important;
    }
 
    .project-title {
        font-size: 1.25rem !important;
    }
 
    .project-description {
        font-size: 0.9rem !important;
    }
 
    .project-date {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.5rem !important;
    }
 
    .filter-chip {
        padding: 0.5rem 0.9rem !important;
        font-size: 0.8rem !important;
    }
 
    .section-title {
        font-size: 1.5rem !important;
    }
}
 
/* ================================================================
   ANDROID PHONES (361px - 428px)
   ================================================================ */
@media (min-width: 361px) and (max-width: 428px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
 
    .projects {
        width: 100% !important;
        overflow-x: hidden;
    }
 
    .projects .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
 
    .projects-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 1.5rem !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
 
    .project-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
 
    .project-content {
        padding: 1.75rem;
    }
 
    /* Ensure pagination also fits */
    .pagination {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
 
    .pagination-btn,
    .pagination-number {
        min-width: 36px !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
}

/* Contact Methods */
.contact-methods-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--gray-200);
    animation: slideInLeft 1s ease-out;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 16px;
    margin-bottom: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.contact-method:hover {
    background: var(--white);
    border-color: var(--primary);
    transform: translateX(10px);
    box-shadow: var(--shadow);
}

.contact-method svg {
    color: var(--primary);
    flex-shrink: 0;
}

.method-info {
    flex: 1;
}

.method-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.method-value {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

/* Enhanced Contact Form */
.contact-form-section {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.form-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-description {
    color: var(--gray-600);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(104, 64, 184, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.input-icon {
    position: relative;
}

.input-icon input,
.input-icon textarea {
    padding-left: 3rem;
}

.input-icon svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.input-icon.focused svg {
    color: var(--primary);
}

.char-counter {
    text-align: right;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* .submit-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 14px rgba(104, 64, 184, 0.4);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    background: #5834a0;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(104, 64, 184, 0.5);
}

.submit-btn svg {
    transition: var(--transition);
}

.submit-btn:hover svg {
    transform: rotate(45deg);
}

.submit-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

.submit-btn.loading {
    pointer-events: none;
}

.submit-btn.loading .btn-text {
    opacity: 0;
} */

.btn-loader {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.form-message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.form-message.show {
    display: flex;
}

.form-message.success {
    background: #ECFDF5;
    color: #065F46;
    border: 2px solid #10B981;
}

.form-message.error {
    background: #FEF2F2;
    color: #991B1B;
    border: 2px solid #EF4444;
}

/* Floating Animation for Form Elements */
.form-group {
    animation: fadeIn 0.6s ease-out backwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

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

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

/* Decorative Elements */
/* .decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    animation: blob-float 20s infinite ease-in-out;
    z-index: 0;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #8B5CF6;
    bottom: -150px;
    left: -100px;
    animation-delay: 4s;
}

@keyframes blob-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
} */

/* Ripple Effect Animation */
@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ================================
   Contact Page Responsive Design
   ================================ */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        min-height: 30vh;
        padding-top: 100px;
    }

    .contact-hero-title {
        font-size: 2.5rem;
    }

    .contact-hero-subtitle {
        font-size: 1.25rem;
    }

    .form-card {
        padding: 2rem;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .decorative-blob {
        display: none;
    }
}

@media (max-width: 480px) {
    .contact-hero-title {
        font-size: 2rem;
    }

    .contact-hero-subtitle {
        font-size: 1.125rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .divider-line::before {
        width: 6px;
        height: 6px;
    }
}

#cursor-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
}

#cursorRibbon {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
}



/* Search Bar Styles */
.project-search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--gray-400);
    pointer-events: none;
    transition: var(--transition);
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 3.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--dark);
    transition: var(--transition);
    outline: none;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(104, 64, 184, 0.1);
}

.search-input:focus+.search-icon {
    color: var(--primary);
}

.search-clear {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.search-clear:hover {
    color: var(--primary);
    background: rgba(104, 64, 184, 0.1);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.no-results svg {
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    color: var(--gray-500);
}

/* ================================
   Pagination
   ================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn svg {
    transition: var(--transition);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.pagination-number:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.pagination-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(104, 64, 184, 0.4);
}

.pagination-number.active:hover {
    background: #5834a0;
    border-color: #5834a0;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: var(--gray-400);
    font-weight: 600;
    user-select: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    content-visibility: auto;
    contain: layout style paint;
}

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

.project-card.fade-out {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.fade-in {
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

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

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    overflow: hidden;
}

.project-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    background: var(--gray-200);
}

/* ================================================================
   MOBILE & PERFORMANCE OPTIMIZATIONS
   [PERF] Appended — does not affect desktop styles
   ================================================================ */

/* Eliminate 300ms tap delay on all interactive elements */
a, button, .btn, .filter-chip, .nav-toggle, .project-card,
.back-to-top, .social-link, .social-link-card, .pagination-number,
.pagination-btn, input, textarea, select, label {
    touch-action: manipulation;
}

@media (max-width: 768px) {
    /* Remove GPU layer hints on elements that don't animate on mobile */
    .cursor-dot, .cursor-outline, .cursor-sketch,
    .floating-card, .image-glow {
        will-change: auto;
    }

    /* Replace expensive backdrop-filter with solid fallback on mobile */
    .navbar, .nav-menu {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255) !important;
    }

    /* Simplify box-shadows to reduce paint cost */
    .project-card, .process-step, .skill-category, .stat-item,
    .contact-card, .form-card, .availability-card,
    .contact-methods-card, .social-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    }

    /* CSS containment — prevents card/section reflow from cascading up the tree */
    .projects-grid, .design-process, .about-skills,
    .tech-stack-section, .contact-section {
        contain: layout style;
    }

    /* Avoid painting background shapes that are invisible at mobile sizes */
    .bg-shape, .dots-pattern::before, .grid-background::before {
        display: none;
    }

    /* Lazy-render off-screen images */
    img {
        content-visibility: auto;
    }
}

/* Hide decorative particles & floating cards on small screens */
@media (max-width: 480px) {
    .floating-particles, .floating-card,
    .image-accent-circle, .image-glow, .scroll-indicator {
        display: none;
    }
}

/* Respect system reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .page-loader { display: none !important; }
}