/* ============================================
   TK Portfolio - Scroll-Synced Design
   Sticky centered SVG with side content
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Colors */
    --color-primary: #0ea5e9;
    --color-secondary: #06b6d4;
    --color-accent: #22d3ee;
    --color-gold: #f59e0b;
    
    --bg-primary: #030712;
    --bg-secondary: #0a0f1a;
    --bg-card: rgba(15, 23, 42, 0.8);
    --bg-glass: rgba(14, 165, 233, 0.05);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Typography */
    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Prevent image dragging */
    -webkit-user-drag: none;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

/* Base gradient layer */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Animated gradient orbs */
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 60% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 70% 40% at 10% 90%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
        /* Base gradient */
        linear-gradient(180deg, 
            var(--bg-primary) 0%, 
            rgba(10, 30, 50, 1) 30%,
            rgba(5, 20, 40, 1) 60%,
            var(--bg-primary) 100%);
    z-index: -3;
    animation: gradientShiftBg 20s ease-in-out infinite alternate;
}

@keyframes gradientShiftBg {
    0% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 0% 100%, 0% 0%;
    }
    100% {
        background-position: 100% 100%, 0% 100%, 100% 0%, 100% 0%, 0% 0%;
    }
}

/* Grid overlay - tech feel */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Horizontal lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 100px,
            rgba(14, 165, 233, 0.03) 100px,
            rgba(14, 165, 233, 0.03) 101px
        ),
        /* Vertical lines */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 100px,
            rgba(14, 165, 233, 0.03) 100px,
            rgba(14, 165, 233, 0.03) 101px
        );
    z-index: -2;
    pointer-events: none;
}

/* Floating particles container */
.scroll-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* Stars / particles */
        radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 30% 65%, rgba(14, 165, 233, 0.5), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 70% 40%, rgba(34, 211, 238, 0.4), transparent),
        radial-gradient(1px 1px at 90% 80%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 15% 85%, rgba(6, 182, 212, 0.4), transparent),
        radial-gradient(1px 1px at 45% 45%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 85% 15%, rgba(14, 165, 233, 0.3), transparent),
        radial-gradient(1px 1px at 25% 35%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 65% 75%, rgba(34, 211, 238, 0.3), transparent),
        radial-gradient(1px 1px at 5% 55%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 95% 45%, rgba(14, 165, 233, 0.4), transparent),
        radial-gradient(1px 1px at 35% 95%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 55% 25%, rgba(6, 182, 212, 0.3), transparent),
        radial-gradient(1px 1px at 75% 5%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(14, 165, 233, 0.35), transparent);
    z-index: -1;
    pointer-events: none;
    animation: floatParticles 30s linear infinite;
}

@keyframes floatParticles {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-20px) rotate(1deg);
    }
}

/* Subtle vignette effect */
.scroll-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(3, 7, 18, 0.4) 100%);
    z-index: -1;
    pointer-events: none;
}

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

/* ============================================
   MOUSE-REACTIVE FLOATING PARTICLES
   ============================================ */
.reactive-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.reactive-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Different particle types */
.reactive-particle.orb {
    background: radial-gradient(circle at 30% 30%, 
        rgba(14, 165, 233, 0.4) 0%, 
        rgba(14, 165, 233, 0.1) 50%,
        transparent 70%
    );
    filter: blur(1px);
}

.reactive-particle.ring {
    background: transparent;
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 
        0 0 10px rgba(6, 182, 212, 0.1),
        inset 0 0 10px rgba(6, 182, 212, 0.05);
}

.reactive-particle.dot {
    background: rgba(14, 165, 233, 0.6);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.reactive-particle.diamond {
    border-radius: 0;
    transform: rotate(45deg);
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.3) 0%, 
        rgba(14, 165, 233, 0.1) 100%
    );
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.reactive-particle.cross {
    border-radius: 0;
    background: transparent;
    width: 2px !important;
    height: 20px !important;
    background: rgba(14, 165, 233, 0.3);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

.reactive-particle.cross::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 2px;
    height: 20px;
    background: rgba(14, 165, 233, 0.3);
}

/* Floating animation for particles */
@keyframes particleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Pulse animation */
@keyframes particlePulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Disable on touch devices */
@media (pointer: coarse) {
    .reactive-particles {
        display: none;
    }
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(20px);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.2s ease;
}

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

/* ============================================
   Smooth Scroll System
   ============================================ */
html {
    overflow: hidden;
}

html.smooth-scroll-enabled {
    overflow: hidden;
    height: 100%;
}

html.smooth-scroll-enabled body {
    overflow: hidden;
    height: 100%;
}

.smooth-scroll-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 15;
    pointer-events: none;
}

.smooth-scroll-wrapper .scroll-container {
    pointer-events: auto;
}

/* Virtual scrollbar spacer - creates scrollable area */
.scroll-spacer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    pointer-events: none;
    visibility: hidden;
}

/* ============================================
   Main Scroll Container
   ============================================ */
.scroll-container {
    position: relative;
    width: 100%;
    will-change: transform;
}

/* ============================================
   Fixed Center Visual (The Star!)
   ============================================ */
.fixed-visual {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.main-svg {
    width: min(70vmin, 500px);
    height: min(70vmin, 500px);
    will-change: transform;
    filter: drop-shadow(0 0 30px rgba(14, 165, 233, 0.2));
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scaleY(0.5);
    }
    50% { 
        opacity: 1;
        transform: scaleY(1);
    }
}

/* ============================================
   Scrollable Sections
   ============================================ */
.scroll-sections {
    position: relative;
    z-index: 20;
    pointer-events: none;
}

.scroll-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
}

/* Section content positioning */
.section-content {
    pointer-events: auto;
    max-width: 400px;
    will-change: transform;
    perspective: 1000px;
}

.section-content.content-left {
    position: absolute;
    left: 5%;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.section-content.content-right {
    position: absolute;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.section-content.content-center {
    text-align: center;
    max-width: 600px;
}

/* ============================================
   Content Cards
   ============================================ */
.content-card {
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 16px;
    padding: var(--space-md);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo), border-color 0.3s ease;
}

.content-card:hover {
    border-color: var(--color-primary);
}

.content-card.glass {
    background: var(--bg-glass);
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.content-card.wide {
    max-width: 700px;
}

.content-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Typography
   ============================================ */
.label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

h1, h2 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }

h2 { 
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.content-card.visible h2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

h3 { 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin-bottom: var(--space-xs);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.content-card.visible h3 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

h4 { font-size: 1rem; font-weight: 600; }

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Paragraph reveal inside cards */
.content-card p {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.content-card.visible p {
    opacity: 1;
    transform: translateY(0);
}

.content-card.visible p:nth-of-type(1) { transition-delay: 0.35s; }
.content-card.visible p:nth-of-type(2) { transition-delay: 0.45s; }
.content-card.visible p:nth-of-type(3) { transition-delay: 0.55s; }

/* AI philosophy note */
.ai-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(14, 165, 233, 0.2);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.title-large {
    opacity: 0;
    transform: translateY(40px);
}

.title-large.visible {
    opacity: 1;
    transform: translateY(0);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
}

.subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

/* ============================================
   Hero Section - DRAMATIC ENTRANCE
   ============================================ */
.section-hero .section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 25;
}

/* Subtle backdrop for text readability */
.section-hero .section-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(ellipse at center, 
        rgba(3, 7, 18, 0.85) 0%, 
        rgba(3, 7, 18, 0.6) 30%, 
        rgba(3, 7, 18, 0.3) 50%,
        transparent 70%);
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
}

.section-hero .label {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    filter: blur(10px);
    animation: heroLabelIn 1s var(--ease-out-expo) 0.5s forwards;
    text-shadow: 
        0 0 20px rgba(34, 211, 238, 0.6),
        0 0 40px rgba(34, 211, 238, 0.3),
        0 2px 10px rgba(0, 0, 0, 1);
}

@keyframes heroLabelIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.section-hero .title-large {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    filter: blur(15px);
    animation: heroTitleIn 1.2s var(--ease-out-expo) 0.8s forwards;
    text-shadow: 
        0 4px 30px rgba(0, 0, 0, 1),
        0 2px 15px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(3, 7, 18, 1);
}

.section-hero .title-large .gradient-text {
    text-shadow: none;
}

@keyframes heroTitleIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.section-hero .subtitle {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
    animation: heroSubtitleIn 1s var(--ease-out-expo) 1.3s forwards;
    text-shadow: 
        0 2px 20px rgba(0, 0, 0, 1),
        0 0 40px rgba(3, 7, 18, 0.9);
    color: var(--text-primary);
}

@keyframes heroSubtitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Split line animation for hero title */
.section-hero .title-large .gradient-text {
    display: inline-block;
}

@keyframes gradientShift {
    0%, 100% { 
        filter: hue-rotate(0deg) brightness(1);
    }
    50% { 
        filter: hue-rotate(15deg) brightness(1.1);
    }
}

/* ============================================
   Icon Grid
   ============================================ */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.icon-item {
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    padding: var(--space-md);
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s var(--ease-out-expo);
}

.icon-item.visible {
    opacity: 1;
    transform: scale(1);
}

.icon-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

.icon-item .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.icon-item .icon-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   Skills
   ============================================ */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    min-width: 280px;
}

.skill-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 3px;
    transition: width 1.2s var(--ease-out-expo);
    box-shadow: 0 0 10px var(--color-primary);
}

/* ============================================
   Projects Grid
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.project-card {
    background: var(--bg-glass);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    padding: var(--space-sm);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
}

/* Blue glow outline on hover */
.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

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

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: var(--bg-card);
    z-index: -1;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    border-color: transparent;
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.3);
}

/* Featured project - centered in grid */
.project-card.project-featured {
    grid-column: 1 / -1;
    max-width: 280px;
    justify-self: center;
}

.project-thumb {
    height: 100px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: var(--space-xs);
}

.project-card h4 {
    margin-bottom: 4px;
}

.project-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Project tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.project-tags .tag {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(14, 165, 233, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(14, 165, 233, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Project thumbnail placeholder for video/gif */
.project-thumb.project-ai-runner {
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.2) 0%, 
        rgba(6, 182, 212, 0.1) 100%
    );
    position: relative;
    overflow: hidden;
}

.project-thumb.project-ai-runner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-thumb.project-ai-runner img {
    transform: scale(1.1);
}

.project-thumb.project-toy {
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.2) 0%, 
        rgba(251, 191, 36, 0.1) 100%
    );
    position: relative;
    overflow: hidden;
}

.project-thumb.project-toy img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-thumb.project-local-ai {
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.2) 0%, 
        rgba(14, 165, 233, 0.1) 100%
    );
    position: relative;
    overflow: hidden;
}

.project-thumb.project-local-ai img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-thumb.project-local-ai img {
    transform: scale(1.1);
}

/* ============================================
   Buttons
   ============================================ */
.contact-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

.btn {
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
}

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

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--bg-primary);
}

.contact-text {
    font-size: 1rem;
}

/* ============================================
   Contact Section - Centered at bottom
   ============================================ */
.section-contact {
    min-height: 100vh;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-contact .section-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-contact .footer-text {
    margin-top: 3rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   ADVANCED ENTRANCE ANIMATIONS
   ============================================ */

/* Base state for all animated items */
.animate-item {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(60px) scale(0.9);
    transition: 
        opacity 0.8s var(--ease-out-expo),
        filter 0.8s var(--ease-out-expo),
        transform 1s var(--ease-out-expo);
}

.animate-item.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

/* ============================================
   CONTENT CARDS - 3D Flip Reveal
   ============================================ */
.content-card {
    opacity: 0;
    transform: perspective(1000px) rotateX(15deg) translateY(80px) scale(0.9);
    transform-origin: center bottom;
    filter: blur(8px);
    transition: 
        opacity 0.8s var(--ease-out-expo),
        transform 1.2s var(--ease-out-expo),
        filter 0.6s var(--ease-out-expo),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.content-card.visible {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
    filter: blur(0);
}

/* Glow effect on entrance */
.content-card.visible {
    animation: cardGlow 1.5s ease-out forwards;
}

@keyframes cardGlow {
    0% {
        box-shadow: 0 0 0 rgba(14, 165, 233, 0);
    }
    50% {
        box-shadow: 0 0 40px rgba(14, 165, 233, 0.4), 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
}

/* LEFT SIDE CARDS - Slide from left with rotation */
.content-left .content-card {
    transform: perspective(1000px) rotateY(25deg) translateX(-100px) scale(0.85);
    transform-origin: left center;
}

.content-left .content-card.visible {
    transform: perspective(1000px) rotateY(0deg) translateX(0) scale(1);
}

/* RIGHT SIDE CARDS - Slide from right with rotation */
.content-right .content-card {
    transform: perspective(1000px) rotateY(-25deg) translateX(100px) scale(0.85);
    transform-origin: right center;
}

.content-right .content-card.visible {
    transform: perspective(1000px) rotateY(0deg) translateX(0) scale(1);
}

/* ============================================
   ICON ITEMS - Pop & Rotate
   ============================================ */
.icon-item {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    filter: blur(10px);
    transition: 
        opacity 0.6s var(--ease-out-expo),
        transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.5s var(--ease-out-expo);
}

.icon-item.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
}

.icon-item.visible .icon {
    animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes iconBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ============================================
   SKILL BARS - Draw Animation
   ============================================ */
.skills-list {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.skills-list.visible {
    opacity: 1;
    transform: translateX(0);
}

.content-right .skills-list {
    transform: translateX(50px);
}

.content-right .skills-list.visible {
    transform: translateX(0);
}

.skill-row {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.skills-list.visible .skill-row {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger skill rows */
.skills-list.visible .skill-row:nth-child(1) { transition-delay: 0.1s; }
.skills-list.visible .skill-row:nth-child(2) { transition-delay: 0.2s; }
.skills-list.visible .skill-row:nth-child(3) { transition-delay: 0.3s; }
.skills-list.visible .skill-row:nth-child(4) { transition-delay: 0.4s; }
.skills-list.visible .skill-row:nth-child(5) { transition-delay: 0.5s; }

.skill-fill {
    position: relative;
    overflow: hidden;
}

.skill-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

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

/* ============================================
   PROJECT CARDS - Staggered 3D Rise
   ============================================ */
.project-card {
    opacity: 0;
    transform: perspective(800px) rotateX(30deg) translateY(100px) scale(0.8);
    filter: blur(5px);
    transition: 
        opacity 0.7s var(--ease-out-expo),
        transform 1s var(--ease-out-expo),
        filter 0.5s var(--ease-out-expo),
        border-color 0.3s ease;
}

.project-card.visible {
    opacity: 1;
    transform: perspective(800px) rotateX(0deg) translateY(0) scale(1);
    filter: blur(0);
}

/* Stagger project cards */
.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.25s; }
.project-card:nth-child(3) { transition-delay: 0.4s; }

/* ============================================
   TITLES - Split Character Animation
   ============================================ */
.title-large {
    opacity: 0;
    transform: translateY(80px);
    filter: blur(15px);
    transition: 
        opacity 1s var(--ease-out-expo),
        transform 1.2s var(--ease-out-expo),
        filter 0.8s var(--ease-out-expo);
}

.title-large.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Gradient text glow on entrance */
.title-large.visible .gradient-text {
    animation: textGlow 2s ease-out forwards;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 0 transparent;
    }
    50% {
        text-shadow: 0 0 30px rgba(14, 165, 233, 0.6), 0 0 60px rgba(14, 165, 233, 0.3);
    }
    100% {
        text-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
    }
}

/* ============================================
   LABELS - Typewriter/Glitch Effect
   ============================================ */
.label {
    opacity: 0;
    transform: translateY(20px) scaleX(0.8);
    transform-origin: left center;
    transition: 
        opacity 0.5s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
}

.label.visible {
    opacity: 1;
    transform: translateY(0) scaleX(1);
    animation: labelFlicker 0.3s ease-out;
}

@keyframes labelFlicker {
    0%, 100% { opacity: 1; }
    25% { opacity: 0.5; }
    50% { opacity: 1; }
    75% { opacity: 0.7; }
}

/* ============================================
   SUBTITLES - Fade Up with Delay
   ============================================ */
.subtitle {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: 
        opacity 0.8s var(--ease-out-expo) 0.3s,
        transform 1s var(--ease-out-expo) 0.3s,
        filter 0.6s var(--ease-out-expo) 0.3s;
}

.subtitle.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ============================================
   BUTTONS - Scale & Glow
   ============================================ */
.contact-buttons {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out-expo) 0.4s, transform 0.8s var(--ease-out-expo) 0.4s;
}

.contact-buttons.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    position: relative;
    overflow: hidden;
}

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

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

/* ============================================
   GLASS CARDS - Special Float Effect
   ============================================ */
.content-card.glass {
    transform: perspective(1000px) rotateX(20deg) rotateY(10deg) translateY(60px) scale(0.85);
}

.content-card.glass.visible {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(0) scale(1);
    animation: glassFloat 3s ease-in-out infinite 1s;
}

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

/* ============================================
   SECTION TRANSITIONS - Parallax Feel
   ============================================ */
.scroll-section {
    will-change: transform;
}

/* Add depth with subtle parallax on content */
.content-left {
    transform: translateZ(0);
    transition: transform 0.1s linear;
}

.content-right {
    transform: translateZ(0);
    transition: transform 0.1s linear;
}

/* ============================================
   FOOTER - Rise from depths
   ============================================ */
.footer-text {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.8s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.footer-text.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ============================================
   MAGNETIC HOVER EFFECT (for cards)
   ============================================ */
.content-card {
    transition: 
        opacity 0.8s var(--ease-out-expo),
        transform 1.2s var(--ease-out-expo),
        filter 0.6s var(--ease-out-expo),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.content-card:hover {
    border-color: var(--color-primary);
    box-shadow: 
        0 0 30px rgba(14, 165, 233, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) translateY(-5px) scale(1.02);
}

/* ============================================
   CONTINUOUS AMBIENT ANIMATIONS
   ============================================ */

/* Subtle floating for visible cards */
.content-card.visible:not(:hover) {
    animation: subtleFloat 6s ease-in-out infinite;
}

@keyframes subtleFloat {
    0%, 100% { transform: perspective(1000px) translateY(0); }
    50% { transform: perspective(1000px) translateY(-5px); }
}

/* Disable float animation on hover for snappy feel */
.content-card:hover {
    animation: none;
}

/* ============================================
   SVG Pulse Animations
   ============================================ */
@keyframes pulse {
    0% {
        r: 35;
        opacity: 0.6;
    }
    100% {
        r: 60;
        opacity: 0;
    }
}

.pulse-ring.pulse-1 {
    animation: pulse 2s ease-out infinite;
}

.pulse-ring.pulse-2 {
    animation: pulse 2s ease-out infinite 1s;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
    .section-content.content-left,
    .section-content.content-right {
        position: relative;
        left: auto;
        right: auto;
        max-width: 100%;
    }
    
    .scroll-section {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .main-svg {
        width: min(50vmin, 350px);
        height: min(50vmin, 350px);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .main-svg {
        width: min(40vmin, 280px);
        height: min(40vmin, 280px);
    }
    
    .section-content {
        padding: 0 var(--space-sm);
    }
    
    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Selection & Scrollbar
   ============================================ */
::selection {
    background: var(--color-primary);
    color: var(--bg-primary);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}
