/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f5f5f5;
    --secondary-color: #a1a1a1;
    --accent-color: #2a2a2a;
    --background-dark: #0a0a0a;
    --background-secondary: #1a1a1a;
    --border-color: #333;
    --white: #fff;
    --accent-blue: #4a90e2;
    --accent-green: #7ed321;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --shadow-small: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 20px 60px rgba(0, 0, 0, 0.3);
    --hero-scroll-progress: 0;
    --hero-scroll-progress-eased: 0;
}

html {
    font-size: 16px;
}

/* ScrollSmoother wrapper structure */
#smooth-wrapper {
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#smooth-content {
    overflow: visible;
    width: 100%;
    will-change: transform;
    position: relative;
    z-index: 1; /* Ensure main content sits above the Three.js background */
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

.version-badge {
    position: fixed;
    right: 14px;
    bottom: 12px;
    z-index: 1100; /* Above nav (1000) and Three.js container (2) */
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    user-select: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    font-weight: var(--font-weight-bold);
    font-size: 1.25rem;
    color: var(--white);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--white), var(--accent-blue));
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    background: transparent;
    overflow: hidden;
}

#threejs-container {
    position: fixed;      /* Cover the entire viewport */
    top: 0;
    left: 0;
    width: 100vw;         /* Full viewport width */
    height: 100vh;        /* Full viewport height */
    z-index: 2;           /* Above main content (needed for WebGL UI elements like tools) */
    pointer-events: none; /* Allow clicks to pass through */
}

#threejs-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Grid and plus signs are now handled by Three.js */

.hero::before,
.hero::after {
    content: none;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-gradient {
    position: absolute;
    inset: -18% -12%;
    background:
        radial-gradient(circle at 42% 18%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 58%),
        radial-gradient(circle at 68% 74%, rgba(74, 144, 226, 0.25) 0%, rgba(74, 144, 226, 0) 64%),
        radial-gradient(circle at 14% 76%, rgba(126, 211, 33, 0.18) 0%, rgba(126, 211, 33, 0) 62%);
    filter: blur(24px);
    opacity: calc(0.25 + 0.5 * var(--hero-progress-eased));
    transform: translate3d(0, calc(var(--hero-progress) * -16vh), 0) scale(calc(1 + var(--hero-progress) * 0.15));
}

.hero-aurora {
    position: absolute;
    inset: -32% -26%;
    background:
        conic-gradient(from 110deg at 34% 42%, rgba(120, 184, 255, 0.4), transparent 60%),
        conic-gradient(from -20deg at 70% 58%, rgba(255, 180, 230, 0.35), transparent 65%);
    filter: blur(80px);
    mix-blend-mode: screen;
    opacity: calc(0.2 + 0.6 * var(--hero-progress));
    transform: translate3d(0, calc(var(--hero-progress-eased) * -14vh), 0) rotate(calc(-8deg + 16deg * var(--hero-progress)));
}

.hero-lines {
    position: absolute;
    inset: -12% -18%;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.06) 20%, transparent 65%),
        repeating-linear-gradient(125deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 1px,
            transparent 90px),
        repeating-linear-gradient(-135deg,
            rgba(255, 255, 255, 0.025) 0px,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 120px);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 20%, rgba(0, 0, 0, 0.85) 65%, transparent 100%);
    opacity: calc(0.08 + 0.22 * var(--hero-progress));
    transform: translate3d(0, calc(var(--hero-progress) * -10vh), 0) skewY(calc(-3deg + 6deg * var(--hero-progress-layer)));
    mix-blend-mode: screen;
}

.hero-fragments {
    position: absolute;
    inset: -24% -30%;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
        linear-gradient(-150deg, rgba(74, 144, 226, 0.18) 0%, transparent 60%),
        linear-gradient(150deg, rgba(255, 214, 140, 0.12) 0%, transparent 55%);
    mask-image: radial-gradient(circle at 52% 54%, rgba(0, 0, 0, 0.9) 0%, transparent 68%);
    opacity: calc(0.12 + 0.28 * var(--hero-progress));
    transform: translate3d(0, calc(var(--hero-progress-eased) * -12vh), 0) scale(calc(1.02 + var(--hero-progress) * 0.12));
    mix-blend-mode: screen;
}

.hero-curves {
    position: absolute;
    inset: -18% -28% -34% -28%;
    pointer-events: none;
}

.hero-curves .curve {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, calc(0.06 + 0.12 * var(--hero-progress)));
    border-radius: 50%;
    opacity: calc(0.3 + 0.35 * var(--hero-progress));
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 24px rgba(140, 190, 255, calc(0.08 + 0.12 * var(--hero-progress))));
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.9) 35%, transparent 100%);
    transform: scale(calc(1 + var(--hero-progress-layer) * 0.2)) translate3d(0, calc(var(--hero-progress) * -6vh), 0);
}

.hero-curves .curve::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 0.25;
    filter: blur(6px);
}

.hero-curves .curve-one {
    width: 140%;
    height: 140%;
    top: -20%;
    left: -18%;
}

.hero-curves .curve-two {
    width: 110%;
    height: 110%;
    top: -6%;
    left: -6%;
    border-color: rgba(74, 144, 226, calc(0.14 + 0.22 * var(--hero-progress)));
}

.hero-curves .curve-three {
    width: 165%;
    height: 165%;
    top: -28%;
    right: -24%;
    border-color: rgba(255, 180, 230, calc(0.12 + 0.2 * var(--hero-progress)));
}

.hero-dots {
    position: absolute;
    inset: -10%;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1.5px),
        radial-gradient(rgba(74, 144, 226, 0.2) 1px, transparent 2px);
    background-size: 120px 120px, 200px 200px;
    background-position:
        calc(var(--hero-progress) * 80px) calc(var(--hero-progress) * -60px),
        calc(60px + var(--hero-progress) * 60px) calc(80px - var(--hero-progress) * 70px);
    mix-blend-mode: screen;
    opacity: calc(0.18 + 0.22 * var(--hero-progress));
    transform: translate3d(0, calc(var(--hero-progress) * -6vh), 0);
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    inset: 0;
    transform: translate3d(0, calc(var(--hero-progress-eased) * -10vh), 0) scale(calc(1 + var(--hero-progress) * 0.1));
    transform-origin: center;
    pointer-events: none;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 65%, rgba(74, 144, 226, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 82% 32%, rgba(255, 255, 255, 0.14) 0%, transparent 38%),
        radial-gradient(circle at 48% 82%, rgba(126, 211, 33, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 65% 58%, rgba(255, 180, 230, 0.1) 0%, transparent 35%);
    opacity: calc(0.25 + 0.35 * var(--hero-progress));
}

.hero-particles::after {
    background:
        radial-gradient(circle at 24% 32%, rgba(255, 255, 255, 0.12) 0%, transparent 30%),
        radial-gradient(circle at 70% 78%, rgba(74, 144, 226, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 38% 52%, rgba(255, 214, 140, 0.12) 0%, transparent 40%);
    mix-blend-mode: screen;
    opacity: calc(0.18 + 0.3 * var(--hero-progress));
}

.hero-particles::before {
    mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 32%, transparent 70%);
}

.hero-particles::after {
    mask-image: radial-gradient(circle at 55% 60%, rgba(0, 0, 0, 0.95) 40%, transparent 82%);
}

@keyframes lineShift {
    0% { transform: translate3d(-3%, 0, 0) skewX(-1deg); }
    50% { transform: translate3d(3%, -2%, 0) skewX(1deg); }
    100% { transform: translate3d(-3%, 0, 0) skewX(-1deg); }
}

@keyframes orbitDrift {
    0% { transform: rotate(0deg) scale(1); opacity: 0.45; }
    50% { transform: rotate(8deg) scale(1.03); opacity: 0.65; }
    100% { transform: rotate(0deg) scale(1); opacity: 0.45; }
}

@keyframes particleFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    40% { transform: translate3d(1.5%, -1.5%, 0) scale(1.03); }
    70% { transform: translate3d(-2%, 1.5%, 0) scale(1.05); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes auroraDrift {
    0% { transform: rotate(0deg) scale(1); opacity: 0.6; }
    40% { transform: rotate(12deg) scale(1.08); opacity: 0.8; }
    70% { transform: rotate(-8deg) scale(1.04); opacity: 0.7; }
    100% { transform: rotate(0deg) scale(1); opacity: 0.6; }
}

@keyframes fragmentDrift {
    0% { transform: translate3d(-4%, 2%, 0) skewX(-2deg); }
    50% { transform: translate3d(4%, -3%, 0) skewX(2deg); }
    100% { transform: translate3d(-4%, 2%, 0) skewX(-2deg); }
}

@keyframes fragmentStreams {
    0% { transform: translate3d(0, 0, 0); opacity: 0.4; }
    50% { transform: translate3d(-8%, -4%, 0); opacity: 0.55; }
    100% { transform: translate3d(0, 0, 0); opacity: 0.4; }
}

@keyframes dotParallax {
    0% { background-position: 0 0, 60px 80px; opacity: 0.35; }
    50% { background-position: 40px -40px, 120px 40px; opacity: 0.5; }
    100% { background-position: 0 0, 60px 80px; opacity: 0.35; }
}

.hero-container {
    position: relative;
    z-index: 2;
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 0 clamp(2rem, 6vw, 5rem);
    display: grid;
    grid-template-rows: auto auto;
    gap: clamp(3rem, 6vw, 5rem);
    transform: translateY(calc(var(--hero-progress-eased) * -32px));
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, clamp(30%, 40vw, 460px));
    gap: clamp(2rem, 5vw, 3.75rem);
    align-items: start;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 3vw, 2.8rem);
    transform: translateY(calc(var(--hero-progress-layer) * -40px));
}

.hero-label-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge-text {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--secondary-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-chip {
    padding: 0.4rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--primary-color);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--transition);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-chip:hover {
    border-color: rgba(74, 144, 226, 0.5);
    color: var(--white);
    background: rgba(74, 144, 226, 0.1);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: var(--font-weight-light);
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}

.title-line {
    display: block;
    animation: titleReveal 1s ease-out forwards;
    opacity: 0;
    transform: translateY(50px);
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.title-emphasis {
    background: linear-gradient(135deg, var(--white), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: var(--font-weight-bold);
    text-shadow: 0 0 30px rgba(120, 190, 255, 0.35), 0 0 10px rgba(255, 120, 180, 0.4);
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    font-weight: var(--font-weight-regular);
    max-width: 620px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-progress {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.hero-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.progress-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

.progress-state {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
}

.hero-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.hero-progress-fill {
    display: block;
    height: 100%;
    width: var(--progress-fill, 60%);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.9), rgba(126, 211, 33, 0.9));
    border-radius: 999px;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
    animation: progressPulse 6s ease-in-out infinite;
}

.hero-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-highlight {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.highlight-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.9), rgba(255, 180, 230, 0.9));
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.5);
    margin-top: 0.55rem;
}

.highlight-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.highlight-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.55);
}

.highlight-text {
    font-size: 0.95rem;
    color: var(--primary-color);
    line-height: 1.5;
}

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

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.hero-contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.1s forwards;
}

.hero-contact-link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    min-width: 180px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-contact-link:hover {
    border-color: rgba(74, 144, 226, 0.4);
    color: var(--white);
    background: rgba(74, 144, 226, 0.1);
}

.contact-link-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
}

.contact-link-value {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.hero-stream {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stream-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.45);
}

.stream-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stream-badge {
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.04);
    letter-spacing: 0.04em;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--white), #e0e0e0);
    color: var(--background-dark);
    text-decoration: none;
    border-radius: 0;
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    transition: var(--transition);
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-arrow {
    font-size: 1.25rem;
    transition: var(--transition);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-block;
    padding: 1.25rem 2.5rem;
    text-decoration: none;
    color: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    z-index: -1;
}

.btn-secondary:hover::before {
    left: 0;
}

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

.hero-scroll {
    display: flex;
    justify-content: flex-end;
    opacity: calc(0.2 + 0.8 * (1 - var(--hero-progress)));
    transform: translateY(calc(var(--hero-progress) * 18px));
}

.hero-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.75rem, 3vw, 2.5rem);
    transform: translateY(calc(var(--hero-progress-layer) * -26px));
}

.hero-card {
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 14, 22, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    animation: cardFloat 10s ease-in-out infinite;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: -40% -20% 50% -20%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.4), rgba(255, 255, 255, 0));
    opacity: 0.35;
    mix-blend-mode: screen;
    animation: cardLightSweep 12s linear infinite;
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    color: var(--white);
}

.card-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-card {
    animation-delay: 0s;
}

.hero-projects {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-project {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.hero-project:hover {
    transform: translateX(10px);
    border-color: rgba(74, 144, 226, 0.4);
    background: rgba(74, 144, 226, 0.08);
}

.project-name {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    letter-spacing: -0.01em;
}

.project-tag {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.55);
}

.project-meta {
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 0.02em;
}

.hero-card-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.profile-card {
    animation-delay: 2s;
}

.hero-profile-grid {
    position: relative;
    gap: 1.25rem;
    display: flex;
    flex-direction: column;
    margin: 1.5rem 0;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.profile-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.profile-value {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary-color);
}

.profile-status {
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
}

.status-open {
    color: #7ed321;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    position: relative;
    z-index: 1;
}

.hero-pill {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary-color);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.hero-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(1.5rem, 4vw, 3rem);
    transform: translateY(calc(var(--hero-progress-eased) * -24px));
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.hero-metric {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem 1.75rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    min-width: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(calc(var(--hero-progress-layer) * -12px));
}

.metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
}

.metric-value {
    font-size: 2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    letter-spacing: -0.02em;
}

.metric-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-footer .hero-scroll {
    opacity: 1;
    animation: none;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes cardLightSweep {
    0% { transform: translateX(-60%); opacity: 0.2; }
    50% { opacity: 0.45; }
    100% { transform: translateX(60%); opacity: 0.2; }
}

@keyframes progressPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(74, 144, 226, 0.25); }
    50% { box-shadow: 0 0 26px rgba(126, 211, 33, 0.35); }
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.scroll-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--secondary-color), transparent);
}

@keyframes heroGlow {
    0% { transform: translate3d(-4%, -2%, 0) scale(1); opacity: 0.85; }
    40% { transform: translate3d(2%, 3%, 0) scale(1.05); opacity: 0.95; }
    70% { transform: translate3d(3%, -1%, 0) scale(1.02); opacity: 0.9; }
    100% { transform: translate3d(-3%, 2%, 0) scale(1.04); opacity: 0.88; }
}

@keyframes speedLines {
    0% { transform: translate3d(0, 0, 0) skewX(0deg); }
    50% { transform: translate3d(-6%, -4%, 0) skewX(-2deg); }
    100% { transform: translate3d(0, 0, 0) skewX(0deg); }
}

/* Work Section */
.work {
    padding: 30rem 0 0rem 0 !important; /* Reduced bottom padding further (tighten gap to next section) */
    position: relative;
}

.gallery-spacer {
    height: 400px !important;
    min-height: 400px !important;
    display: block !important;
    width: 100% !important;
}

/* Single continuous dark background extending from work section to bottom */
.work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* Extend far down to cover all sections below (work, about, skills, contact) */
    height: 400vh;
    background: transparent;
    z-index: -1;
    pointer-events: none;
}

.work-header {
    margin-bottom: 3rem;
}

.work .work-showcase {
    min-height: 700px !important; /* Enough for Three.js gallery spacer + info panel without huge empty area */
    padding-bottom: 4rem !important; /* Reduced spacing below gallery */
    margin-bottom: 4rem !important; /* Reduced spacing before next section */
    position: relative;
}

.section-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 3.5rem;
    font-weight: var(--font-weight-light);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.title-number {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: var(--font-weight-medium);
}

.title-text {
    color: var(--white);
}

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

/* Featured Project */
.project-featured {
    margin-bottom: 8rem;
    background: var(--background-secondary);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.featured-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    min-height: 600px;
}

.featured-media {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.media-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.featured-media:hover .media-overlay {
    opacity: 1;
}

.featured-media:hover img {
    transform: scale(1.05);
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background-dark);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.play-button:hover {
    background: var(--white);
    transform: scale(1.1);
}

.featured-info {
    padding: 4rem;
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-year,
.project-type {
    font-size: 0.875rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: var(--font-weight-medium);
}

.featured-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-light);
    margin-bottom: 1.5rem;
    color: var(--white);
    letter-spacing: -0.02em;
}

.featured-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.tag-premium {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.project-link:hover {
    border-bottom-color: var(--white);
}

.project-link svg {
    transition: var(--transition);
}

.project-link:hover svg {
    transform: translateX(4px);
}

/* Project Grid */
.project-grid {
    margin-top: 6rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 300px);
    gap: 2rem;
}

.project-large {
    grid-column: span 2;
    grid-row: span 2;
}

.project-medium {
    grid-column: span 1;
    grid-row: span 1;
}

.project-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.project-card {
    background: var(--background-secondary);
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .card-overlay {
    opacity: 1;
}

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

.overlay-content {
    width: 100%;
}

.card-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card-description {
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    border-radius: 2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* About Section */
.about {
    padding: 12rem 0 8rem 0;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(74, 144, 226, 0.03) 50%, transparent 100%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 8rem;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 4rem;
}

.about-story {
    max-width: 800px;
}

.about-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.about-description.highlight {
    font-size: 1.375rem;
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
    margin-bottom: 2.5rem;
}

.about-description:last-child {
    margin-bottom: 0;
}

/* Skills Section */
.skills-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.skills-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.category-title {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.skill-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-list li {
    color: var(--secondary-color);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    position: relative;
    padding-left: 1rem;
    transition: var(--transition);
}

.skill-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: var(--font-weight-bold);
}

.skill-list li:hover {
    color: var(--primary-color);
    padding-left: 1.25rem;
}

/* Profile Visual */
.about-visual {
    display: flex;
    justify-content: center;
    position: sticky;
    top: 120px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(126, 211, 33, 0.1));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.profile-card:hover::before {
    opacity: 1;
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-image {
    position: relative;
    margin-bottom: 2rem;
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    object-fit: cover;
    transition: var(--transition);
}

.image-decoration {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--font-weight-medium);
}

/* Skills Section */
.skills {
    padding: 8rem 0 12rem 0;
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
    z-index: 2;
}

.skill-category-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

.skill-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(126, 211, 33, 0.05));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.skill-category-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.skill-category-card:hover::before {
    opacity: 1;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.category-name {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    letter-spacing: -0.01em;
}

.category-count {
    font-size: 0.875rem;
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    color: var(--secondary-color);
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(20px) translate(var(--magnetic-x, 0), var(--magnetic-y, 0));
    will-change: transform;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-item.animate {
    opacity: 1;
    transform: translateY(0) translate(var(--magnetic-x, 0), var(--magnetic-y, 0));
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.2), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.skill-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(126, 211, 33, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-item:hover::before {
    width: 300px;
    height: 300px;
}

.skill-item:hover::after {
    opacity: 1;
}

.skill-item:hover {
    color: var(--white);
    border-color: rgba(74, 144, 226, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.2);
}

.skill-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-icon svg {
    width: 100%;
    height: 100%;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.skill-name-text {
    position: relative;
    z-index: 1;
    flex: 1;
}

.skill-item:hover .skill-icon {
    transform: scale(1.15) rotate(5deg);
}

.skill-item:hover .skill-icon svg {
    color: var(--white);
}

/* Contact Section */
.contact {
    padding: 12rem 0 8rem 0;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(126, 211, 33, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.contact-content {
    position: relative;
    z-index: 2;
}

.contact .section-intro {
    text-align: center;
    margin-bottom: 6rem;
}

.contact .section-title {
    margin-bottom: 2rem;
}

.contact-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 920px;
    margin: 0 auto;
    align-items: start;
}

/* Main Contact Card */
.contact-main-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.contact-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    opacity: 0;
    transition: var(--transition);
}

.contact-main-card:hover::before {
    opacity: 1;
}

.contact-main-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.contact-card-header {
    margin-bottom: 3rem;
}

.contact-card-title {
    font-size: 2rem;
    font-weight: var(--font-weight-light);
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.contact-card-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    line-height: 1.6;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Email Reveal Button */
.email-reveal-container {
    position: relative;
    overflow: hidden;
    /* Add clip headroom so hover lift doesn't get cut off */
    height: 80px;
    padding: 8px 0;
    box-sizing: border-box;
}

.email-reveal-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.75rem;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transform: translateY(0);
    z-index: 2;
    will-change: transform, opacity;
}

/* Keep the button within the clip window (with padding headroom) */
.email-reveal-container .email-reveal-btn {
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
}

.email-reveal-btn[style*="display: none"] {
    display: none !important;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.email-reveal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(126, 211, 33, 0.2));
    transition: var(--transition);
    z-index: 0;
}

.email-reveal-btn:hover::before {
    left: 0;
}

.email-reveal-btn:hover {
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.2);
}

.email-reveal-btn:active {
    transform: translateY(0);
}

.email-reveal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 1;
}

.email-reveal-label {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    letter-spacing: -0.01em;
}

.email-reveal-hint {
    font-size: 0.875rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.email-reveal-btn:hover .email-reveal-hint {
    color: var(--primary-color);
}

/* Email Revealed */
.email-revealed {
    margin-top: 0;
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.1s;
    z-index: 1;
    will-change: transform, opacity;
}

.email-revealed.show {
    transform: translateY(0);
    opacity: 1;
}

.email-revealed-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.email-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.75rem;
    height: 64px;
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 16px;
    color: var(--white);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.email-link:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.email-text {
    letter-spacing: 0.02em;
}

/* Copy Button */
.email-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    /* Ensure width transitions are visible/deterministic */
    flex: 0 0 auto;
    /* Avoid `all` transitions fighting with width; make width animation reliable both ways */
    transition:
        width 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    /* Fixed width to prevent any layout shift between Copy/Copied! */
    width: 132px;
    justify-content: center;
}

.email-copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(126, 211, 33, 0.2);
    transition: var(--transition);
    z-index: 0;
}

.email-copy-btn:hover::before {
    left: 0;
}

.email-copy-btn:hover {
    border-color: rgba(126, 211, 33, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(126, 211, 33, 0.2);
}

.email-copy-btn:active {
    transform: translateY(0);
}

.email-copy-btn.copied {
    border-color: rgba(126, 211, 33, 0.5);
    background: rgba(126, 211, 33, 0.1);
}

.email-copy-btn .copy-btn-text {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.email-copy-btn.copied .copy-btn-text {
    color: rgba(126, 211, 33, 1);
}

/* Social Links */
.contact-social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    z-index: 0;
}

.social-link:hover::before {
    left: 0;
}

.social-link:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
}

.social-link span {
    position: relative;
    z-index: 1;
}

/* Contact Info Grid */
.contact-info-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.contact-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
    opacity: 0;
    transition: var(--transition);
}

.contact-info-card:hover::before {
    opacity: 1;
}

.contact-info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
}

.info-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-info-card:hover .info-card-icon {
    background: rgba(74, 144, 226, 0.15);
    transform: scale(1.1);
}

.info-card-content {
    flex: 1;
}

.info-card-title {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.info-card-value {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    color: var(--white);
    letter-spacing: -0.01em;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .grid-layout {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .project-large {
        grid-column: span 2;
    }
    
    .project-wide {
        grid-column: span 3;
    }

    .hero-container {
        padding: 0 clamp(2rem, 5vw, 4rem);
    }

    .hero-shell {
        grid-template-columns: minmax(0, 1fr) minmax(300px, clamp(32%, 44vw, 420px));
        gap: clamp(2rem, 4vw, 3rem);
    }

    .hero-metrics {
        gap: clamp(1rem, 2vw, 1.5rem);
    }
}

@media (max-width: 968px) {
    .featured-content {
        grid-template-columns: 1fr;
    }
    
    .featured-info {
        padding: 3rem 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .about-visual {
        position: static;
        justify-content: center;
        margin-top: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .grid-layout {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(auto, 250px);
    }
    
    .project-large,
    .project-wide {
        grid-column: span 2;
    }

    .hero-container {
        padding: 0 clamp(1.5rem, 6vw, 3rem);
    }

    .hero-shell {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-right {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .hero-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        align-items: stretch;
    }

    .hero-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .hero-metric {
        padding: 1.35rem 1.5rem;
    }

    .hero-scroll {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .hero {
        align-items: center;
        justify-content: center;
        padding: 140px 0 100px;
    }

    .hero-container {
        padding: 0 2rem;
        text-align: center;
        margin: 0 auto;
        gap: 3rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .scroll-indicator {
        align-items: center;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--background-dark);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-large);
        padding: 2rem 0;
        gap: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

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

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-shell,
    .hero-left {
        align-items: center;
    }

    .hero-highlights {
        align-items: center;
        text-align: center;
    }

    .hero-highlight {
        flex-direction: column;
        align-items: center;
    }

    .highlight-dot {
        margin-top: 0;
    }

    .hero-right {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hero-card {
        width: 100%;
    }

    .hero-progress,
    .hero-metric {
        width: 100%;
    }

    .hero-contact-links {
        justify-content: center;
    }

    .hero-stream,
    .stream-badges,
    .hero-pills {
        justify-content: center;
        text-align: center;
    }

    .hero-footer {
        grid-template-columns: 1fr;
        align-items: center;
        gap: 1.75rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        justify-items: center;
    }

    .hero-scroll {
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .section-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .about-content {
        gap: 3rem;
    }

    .skills-section {
        margin-top: 3rem;
        padding-top: 3rem;
    }

    .skills-grid {
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .profile-card {
        padding: 2rem;
        max-width: 300px;
        margin: 0 auto;
    }

    .profile-image img {
        width: 160px;
        height: 160px;
    }

    .profile-stats {
        gap: 1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-main-card {
        padding: 2.5rem;
    }

    .contact-info-grid {
        gap: 1.25rem;
    }

    .contact-info-card {
        padding: 1.75rem;
    }

    .skills-container {
        gap: 1.5rem;
    }

    .skill-category-card {
        padding: 1.5rem;
    }

    .category-name {
        font-size: 1.125rem;
    }

    .contact-main-card {
        padding: 2rem;
    }

    .contact-card-title {
        font-size: 1.75rem;
    }

    .email-reveal-btn {
        padding: 1.5rem;
    }

    .email-reveal-icon {
        width: 48px;
        height: 48px;
    }

    .contact-social-links {
        flex-direction: column;
    }

    .email-revealed-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .email-copy-btn {
        width: 100%;
        justify-content: center;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

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

    .project-large,
    .project-medium,
    .project-wide {
        grid-column: span 1;
    }

    .container {
        padding: 0 1.5rem;
    }

    .work,
    .about {
        padding: 10rem 0 6rem 0;
    }
    
    .contact {
        padding: 10rem 0 6rem 0;
    }
}

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

    .hero {
        padding: 120px 0 80px;
    }

    .hero-container {
        padding: 0 1.25rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-highlights {
        gap: 0.85rem;
    }

    .hero-highlight {
        align-items: flex-start;
    }

    .hero-progress,
    .hero-metric {
        padding: 1.25rem 1.5rem;
    }

    .hero-metric {
        flex: 1 1 100%;
    }

    .metric-value {
        font-size: 1.75rem;
    }

    .hero-project {
        padding: 1rem 1.2rem;
    }

    .hero-pills,
    .stream-badges,
    .hero-contact-links {
        justify-content: flex-start;
    }

    .featured-info {
        padding: 2rem 1.5rem;
    }

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

    .about-description {
        font-size: 1rem;
    }

    .about-description.highlight {
        font-size: 1.125rem;
    }

    .skills-title {
        font-size: 1.25rem;
    }

    .category-title {
        font-size: 1rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .profile-image img {
        width: 140px;
        height: 140px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .contact-item {
        padding: 1.25rem;
    }

    .contact-cta {
        padding: 1.5rem;
    }

    .cta-text {
        font-size: 1.125rem;
    }

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

/* Advanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Focus states for accessibility */
.nav-link:focus,
.btn-primary:focus,
.btn-secondary:focus,
.contact-link:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Performance optimizations */
.project-card,
.nav {
    will-change: transform;
}

img {
    max-width: 100%;
    height: auto;
}

/* Loading states */
.card-media img,
.media-container img,
.about-image img {
    background-color: var(--background-secondary);
}

/* Scrollable Gallery Styles - Moved to ScrollableGallery/gallery.css */

/* OneTimeSlide Animation - Used by multiple components */
@keyframes OneTimeSlide {
    0% {
        transform: translateY(-100%) scaleY(1);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scaleY(1);
        opacity: 1;
    }
}

/* Text Animation Wrapper and Overlay Styles - Used by multiple components */
.text-animation-wrapper {
    position: relative;
    overflow: hidden;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Preserve original text element display and alignment */
.text-animation-wrapper .section-intro,
.text-animation-wrapper .about-description,
.text-animation-wrapper .contact-subtitle,
.text-animation-wrapper .section-description {
    display: block;
    margin: 0;
}

.text-animation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: inherit;
    background: currentColor;
    pointer-events: none;
    transform-origin: top;
    z-index: 1;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Print styles */
@media print {
    .nav,
    .hero-scroll,
    .contact {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}