/* Base typography & rendering */
/* "clip" stops decorative elements (e.g. the large ambient orbs) from widening
   the page on phones, without creating a scroll container (keeps sticky header working) */
html {
    overflow-x: clip;
}
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-x: clip;
    background-color: #ffffff;
    color: #0f172a;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
.dark ::-webkit-scrollbar-track {
    background: #060b18;
}
::-webkit-scrollbar-thumb {
    background: #0284c7;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0369a1;
}

/* Pristine White Glassmorphism Card Style */
.glass-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 30px -5px rgba(2, 132, 199, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark .glass-card {
    background: rgba(10, 17, 40, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.15);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.glass-card:hover {
    border-color: rgba(2, 132, 199, 0.45);
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.15), 0 4px 12px -2px rgba(2, 132, 199, 0.08);
}
.dark .glass-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 25px 50px -12px rgba(2, 132, 199, 0.25);
}

/* Ambient Glow Pods for White Background */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.28;
    transition: opacity 0.5s ease;
}
.dark .ambient-orb {
    opacity: 0.4;
    filter: blur(90px);
}

/* Interactive Custom Cursor Follower */
#cursor-glow {
    position: fixed;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.12) 0%, rgba(14, 165, 233, 0.03) 50%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: transform 0.08s ease-out, opacity 0.3s ease;
}
.dark #cursor-glow {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(2, 132, 199, 0.04) 45%, rgba(0, 0, 0, 0) 70%);
}

/* Magnetic button shine */
.btn-shine {
    position: relative;
    overflow: hidden;
}
/* Shine sweeps left → right on hover; fully outside the button at rest */
.btn-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.35) 50%, transparent 75%);
    transform: translateX(-110%);
    transition: transform 0.75s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}
.btn-shine:hover::after {
    transform: translateX(110%);
}

/* 3D Perspective Card Tilt */
.perspective-container {
    perspective: 1200px;
}
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.18s ease-out;
}

/* Text Shimmer for White Theme */
.shimmer-text {
    background: linear-gradient(90deg, #0284c7 0%, #0369a1 40%, #0ea5e9 70%, #2563eb 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}
.dark .shimmer-text {
    background: linear-gradient(90deg, #38bdf8 0%, #ffffff 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #2563eb, #6366f1);
    z-index: 100;
    width: 0%;
    transition: width 0.1s ease;
}

/* Clean Technical Grid Background Overlay for White Theme */
.tech-grid-pattern {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(2, 132, 199, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(2, 132, 199, 0.05) 1px, transparent 1px);
}
.dark .tech-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}
