/* ===== CSS VARIABLES & THEMES ===== */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(255,255,255,0.04);
    --bg-glass: rgba(255,255,255,0.06);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b8;
    --text-muted: #666680;
    --accent-1: #6c5ce7;
    --accent-2: #00cec9;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
    --accent-gradient-r: linear-gradient(135deg, #00cec9, #6c5ce7);
    --border-color: rgba(255,255,255,0.08);
    --shadow-color: rgba(0,0,0,0.3);
    --nav-bg: rgba(10,10,26,0.85);
    --font-body: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-hand: 'Caveat', cursive;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 9999px;
}

[data-theme="light"] {
    --bg-primary: #f5f5ff;
    --bg-secondary: #eeeef8;
    --bg-card: rgba(0,0,0,0.03);
    --bg-glass: rgba(255,255,255,0.7);
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #888898;
    --border-color: rgba(0,0,0,0.08);
    --shadow-color: rgba(0,0,0,0.08);
    --nav-bg: rgba(245,245,255,0.85);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.5s, color 0.5s;
    cursor: none;
}
a { text-decoration: none; color: inherit; cursor: none; }
button { cursor: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-gradient); border-radius: 10px; }

/* ===== CUSTOM CURSOR ===== */
.cursor-glow {
    position: fixed; width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(108,92,231,0.08), transparent 70%);
    border-radius: 50%; pointer-events: none; z-index: 0;
    transform: translate(-50%,-50%); transition: 0.1s linear;
}
.custom-cursor {
    position: fixed; width: 40px; height: 40px; border: 2px solid var(--accent-1);
    border-radius: 50%; pointer-events: none; z-index: 10001;
    transform: translate(-50%,-50%); transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
    mix-blend-mode: difference;
}
.custom-cursor.active { width: 20px; height: 20px; background: rgba(108,92,231,0.3); }
.custom-cursor-dot {
    position: fixed; width: 6px; height: 6px; background: var(--accent-2);
    border-radius: 50%; pointer-events: none; z-index: 10002;
    transform: translate(-50%,-50%); transition: 0.05s linear;
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed; inset: 0; background: var(--bg-primary);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 99999; transition: opacity 0.6s, visibility 0.6s;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.preloader-ring {
    position: absolute; inset: 0; border: 3px solid transparent;
    border-top-color: var(--accent-1); border-radius: 50%;
    animation: preloaderSpin 1s linear infinite;
}
.preloader-ring-2 {
    border-top-color: var(--accent-2); animation-direction: reverse; animation-duration: 1.5s;
    inset: 6px;
}
.preloader-inner span { font-family: var(--font-display); font-weight: 700; font-size: 1rem; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.preloader-text { margin-top: 20px; color: var(--text-muted); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; animation: fadeInOut 2s ease-in-out infinite; }
@keyframes preloaderSpin { to { transform: rotate(360deg); } }
@keyframes fadeInOut { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: absolute; bottom: 0; left: 0; height: 3px; width: 0%;
    background: var(--accent-gradient); transition: width 0.05s; z-index: 100;
}

/* ===== NAVBAR ===== */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    transition: background 0.4s, box-shadow 0.4s, transform 0.4s;
}
header.scrolled { background: var(--nav-bg); backdrop-filter: blur(20px); box-shadow: 0 4px 30px var(--shadow-color); }
.navbar {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1200px; margin: 0 auto; padding: 18px 24px;
}
.nav-logo {
    font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
    color: var(--text-primary); transition: var(--transition);
}
.logo-bracket { color: var(--accent-1); }
.nav-logo:hover { color: var(--accent-1); }

.theme-toggle {
    position: relative; background: var(--bg-glass); border: 1px solid var(--border-color);
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: var(--text-primary); font-size: 1.1rem;
    transition: var(--transition); margin-left: auto; margin-right: 20px;
}
.theme-toggle:hover { background: var(--accent-1); color: #fff; transform: rotate(30deg); }

.nav-menu { display: flex; align-items: center; }
.nav-links { display: flex; list-style: none; gap: 8px; }
.nav-link {
    padding: 8px 16px; border-radius: var(--radius-full); font-size: 0.88rem; font-weight: 500;
    color: var(--text-secondary); transition: var(--transition); position: relative;
}
.nav-link-num { color: var(--accent-1); font-size: 0.75rem; margin-right: 4px; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-glass); }
.nav-link.active { border: 1px solid var(--border-color); }

.hamburger {
    display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px;
    cursor: none; z-index: 1001;
}
.hamburger .bar {
    width: 28px; height: 2.5px; background: var(--text-primary); border-radius: 4px;
    transition: var(--transition); transform-origin: center;
}
.hamburger.active .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 120px 24px 80px;
}
#particleCanvas { position: absolute; inset: 0; z-index: 0; }

/* Aurora */
.aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; opacity: 0.5; pointer-events: none; }
.aurora-beam {
    position: absolute; width: 300%; height: 300px; top: -150px;
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.15), rgba(0,206,201,0.1), transparent);
    filter: blur(60px); animation: auroraMove 12s ease-in-out infinite alternate;
}
.aurora-beam:nth-child(2) { top: 20%; animation-delay: -4s; animation-duration: 15s; opacity: 0.6; }
.aurora-beam:nth-child(3) { top: 50%; animation-delay: -8s; animation-duration: 18s; opacity: 0.4; }
@keyframes auroraMove { 0% { transform: translateX(-30%) rotate(-5deg); } 100% { transform: translateX(10%) rotate(5deg); } }

/* Floating Shapes */
.floating-shapes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.shape {
    position: absolute; border-radius: 50%; opacity: 0.08;
    animation: floatShape 20s ease-in-out infinite;
}
.shape-1 { width: 300px; height: 300px; top: 10%; left: 5%; background: var(--accent-1); animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; top: 60%; right: 10%; background: var(--accent-2); animation-delay: -5s; animation-duration: 25s; }
.shape-3 { width: 150px; height: 150px; bottom: 20%; left: 30%; background: var(--accent-1); animation-delay: -10s; animation-duration: 18s; }
.shape-4 { width: 250px; height: 250px; top: 30%; right: 25%; background: var(--accent-2); animation-delay: -7s; animation-duration: 22s; }
@keyframes floatShape { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -40px) scale(1.1); } 66% { transform: translate(-20px, 20px) scale(0.9); } }

.hero-content { text-align: center; position: relative; z-index: 1; max-width: 900px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 24px;
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-full); font-size: 0.9rem; color: var(--text-secondary);
    margin-bottom: 28px; backdrop-filter: blur(10px);
}
.badge-dot {
    width: 8px; height: 8px; background: #00ff88; border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.hero-greeting { display: block; font-size: clamp(1rem,2vw,1.3rem); color: var(--text-secondary); font-weight: 400; margin-bottom: 8px; }
.hero-title { font-family: var(--font-display); font-size: clamp(2.5rem,6vw,4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.animated-gradient {
    background: linear-gradient(90deg, #6c5ce7, #00cec9, #fd79a8, #6c5ce7);
    background-size: 300% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.hero-subtitle { font-size: clamp(1.1rem,2.5vw,1.5rem); color: var(--accent-2); min-height: 40px; margin-bottom: 16px; font-weight: 500; }
.typed-cursor { animation: blink 0.8s step-end infinite; color: var(--accent-1); font-weight: 100; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { font-size: clamp(0.95rem,1.5vw,1.1rem); color: var(--text-secondary); max-width: 650px; margin: 0 auto 36px; line-height: 1.8; }

.hero-cta { display: flex; gap: 16px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px;
    border-radius: var(--radius-full); font-weight: 600; font-size: 0.95rem;
    transition: var(--transition); position: relative; overflow: hidden; border: none;
    font-family: var(--font-body);
}
.btn-primary { background: var(--accent-gradient); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(108,92,231,0.35); }
.btn-outline { border: 2px solid var(--border-color); color: var(--text-primary); background: transparent; }
.btn-outline:hover { border-color: var(--accent-1); background: rgba(108,92,231,0.08); transform: translateY(-3px); }
.btn-full { width: 100%; justify-content: center; }

.hero-stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

/* Glass Card */
.glass-card {
    background: var(--bg-glass); border: 1px solid var(--border-color);
    backdrop-filter: blur(12px); border-radius: var(--radius);
}

.stat {
    padding: 20px 32px; text-align: center;
    transition: var(--transition);
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent-1); }
.stat-number { font-family: var(--font-display); font-size: 2rem; font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-plus { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent-2); }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2;
}
.mouse { width: 26px; height: 40px; border: 2px solid var(--text-muted); border-radius: 14px; display: flex; justify-content: center; padding-top: 8px; }
.wheel { width: 4px; height: 8px; background: var(--accent-1); border-radius: 4px; animation: scrollWheel 1.5s ease-in-out infinite; }
@keyframes scrollWheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
.scroll-indicator span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }

/* ===== MARQUEE RIBBON ===== */
.marquee-ribbon {
    background: var(--accent-gradient); padding: 12px 0; overflow: hidden; white-space: nowrap;
    position: relative; z-index: 1;
}
.marquee-content { display: inline-flex; animation: marqueeScroll 25s linear infinite; }
.marquee-content span { font-weight: 600; font-size: 0.9rem; color: #fff; margin: 0 24px; letter-spacing: 1px; }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== SECTIONS SHARED ===== */
section { padding: 100px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-block; font-size: 0.85rem; color: var(--accent-1); font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px;
}
.section-title { font-family: var(--font-display); font-size: clamp(2rem,4vw,3rem); font-weight: 800; }
.section-line { width: 60px; height: 4px; background: var(--accent-gradient); margin: 16px auto 0; border-radius: 2px; }

/* ===== WAVE DIVIDER ===== */
.wave-divider { position: relative; height: 80px; overflow: hidden; margin-top: -1px; }
.wave-divider svg { position: absolute; bottom: 0; width: 100%; height: 100%; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: 60px; align-items: center; }
.image-frame { position: relative; border-radius: var(--radius); overflow: hidden; }
.image-placeholder {
    aspect-ratio: 3/4; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius);
    font-size: 3rem; color: var(--accent-1); transition: var(--transition);
}
.image-placeholder span { font-size: 0.9rem; color: var(--text-muted); }
.image-decoration {
    position: absolute; inset: -8px; border: 2px solid var(--accent-1); border-radius: var(--radius);
    z-index: -1; opacity: 0.3;
}
.image-glow {
    position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
    width: 80%; height: 60px; background: var(--accent-1);
    filter: blur(40px); opacity: 0.2; border-radius: 50%;
}
.handwritten-note {
    font-family: var(--font-hand); font-size: 1.4rem; color: var(--accent-2);
    text-align: center; margin-top: 16px; transform: rotate(-3deg);
    animation: noteWiggle 4s ease-in-out infinite;
}
@keyframes noteWiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg); } }

.about-text h3 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 20px; }
.about-text p { color: var(--text-secondary); margin-bottom: 16px; }
.about-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.info-item {
    display: flex; align-items: center; gap: 14px; padding: 14px;
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); transition: var(--transition);
}
.info-item:hover { border-color: var(--accent-1); transform: translateX(4px); }
.info-item i { font-size: 1.3rem; color: var(--accent-1); width: 24px; }
.info-item strong { display: block; font-size: 0.85rem; color: var(--text-primary); }
.info-item span { font-size: 0.8rem; color: var(--text-muted); }

/* ===== ACHIEVEMENTS ===== */
.achievements { background: var(--bg-secondary); }
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px; }

.achievement-card {
    position: relative; padding: 36px 28px; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: var(--radius);
    transition: var(--transition); overflow: hidden;
}
.achievement-card:hover { transform: translateY(-6px); border-color: var(--accent-1); }

/* Spotlight */
.spotlight-card { overflow: hidden; }
.spotlight {
    position: absolute; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(108,92,231,0.15), transparent 70%);
    border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.3s;
    transform: translate(-50%,-50%);
}
.spotlight-card:hover .spotlight { opacity: 1; }

.card-icon {
    width: 56px; height: 56px; border-radius: 14px; background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff; margin-bottom: 20px;
}
.card-content h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 10px; }
.card-content p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; }
.card-tag {
    display: inline-block; margin-top: 16px; padding: 4px 14px; font-size: 0.75rem;
    background: rgba(108,92,231,0.12); color: var(--accent-1); border-radius: var(--radius-full);
    font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}

/* Text Scramble */
.text-scramble { display: inline-block; }

/* ===== TESTIMONIALS ===== */
.testimonials { background: var(--bg-primary); }
.testimonial-slider { position: relative; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.testimonial-card {
    min-width: 100%; padding: 40px; text-align: center;
}
.testimonial-card .quote-icon { font-size: 2.5rem; color: var(--accent-1); opacity: 0.3; margin-bottom: 16px; }
.testimonial-card p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 24px; font-style: italic; line-height: 1.8; }
.testimonial-author { display: flex; align-items: center; gap: 14px; justify-content: center; }
.author-avatar {
    width: 48px; height: 48px; border-radius: 50%; background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem;
}
.testimonial-author strong { display: block; font-size: 0.95rem; }
.testimonial-author span { font-size: 0.8rem; color: var(--text-muted); }
.testimonial-controls {
    display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px;
}
.test-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-color);
    background: var(--bg-glass); color: var(--text-primary); font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.test-btn:hover { background: var(--accent-1); color: #fff; border-color: var(--accent-1); }
.test-dots { display: flex; gap: 8px; }
.test-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--border-color);
    transition: var(--transition); cursor: none;
}
.test-dot.active { background: var(--accent-1); transform: scale(1.3); }

/* ===== SKILLS ===== */
.skills-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.skill-item { margin-bottom: 24px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill-name { font-weight: 500; font-size: 0.9rem; }
.skill-percent { font-weight: 600; font-size: 0.85rem; color: var(--accent-1); }
.skill-bar { width: 100%; height: 8px; background: var(--bg-glass); border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); }
.skill-fill { height: 100%; width: 0%; background: var(--accent-gradient); border-radius: 10px; transition: width 1.5s cubic-bezier(0.4,0,0.2,1); }

.skills-tags h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 20px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    padding: 8px 18px; border: 1px solid var(--border-color); border-radius: var(--radius-full);
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    transition: var(--transition); background: var(--bg-glass);
}
.tag:hover { border-color: var(--accent-1); color: var(--accent-1); transform: translateY(-2px); background: rgba(108,92,231,0.08); }

/* ===== CERTIFICATIONS ===== */
.certifications { background: var(--bg-primary); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 28px; }
.cert-card {
    display: flex; gap: 20px; padding: 32px; position: relative; overflow: hidden;
    transition: var(--transition); align-items: flex-start;
}
.cert-card:hover { transform: translateY(-4px); border-color: var(--accent-1); }
.cert-icon {
    width: 56px; height: 56px; min-width: 56px; border-radius: 14px; background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff;
}
.cert-content h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 6px; }
.cert-issuer { font-size: 0.85rem; color: var(--accent-1); font-weight: 600; margin-bottom: 10px; }
.cert-issuer i { margin-right: 6px; }
.cert-content p:last-child { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.cert-badge {
    position: absolute; top: 16px; right: 16px; padding: 4px 12px;
    background: rgba(0,206,201,0.12); color: var(--accent-2); border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600; letter-spacing: 1px;
}

@media (max-width: 540px) { .cert-grid { grid-template-columns: 1fr; } }

/* ===== FUN FACTS ===== */
.funfacts { background: var(--bg-secondary); }
.funfacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.funfact-card {
    position: relative; height: 240px; perspective: 800px; cursor: none;
}
.funfact-front, .funfact-back {
    position: absolute; inset: 0; border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px; backface-visibility: hidden; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid var(--border-color);
}
.funfact-front { background: var(--bg-glass); }
.funfact-back {
    background: var(--accent-gradient); color: #fff;
    transform: rotateY(180deg);
}
.funfact-card:hover .funfact-front { transform: rotateY(-180deg); }
.funfact-card:hover .funfact-back { transform: rotateY(0deg); }
.funfact-emoji { font-size: 3rem; margin-bottom: 12px; }
.funfact-front h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 6px; }
.flip-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }
.funfact-back p { font-size: 0.95rem; text-align: center; line-height: 1.6; }

/* ===== TIMELINE ===== */
.timeline-section { background: var(--bg-primary); }
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding-left: 40px; }
.timeline::before {
    content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
    width: 2px; background: var(--border-color);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot {
    position: absolute; left: -33px; top: 28px; width: 16px; height: 16px;
    background: var(--accent-gradient); border-radius: 50%;
    border: 3px solid var(--bg-primary); z-index: 1;
}
.timeline-content { padding: 24px 28px; }
.timeline-year {
    display: inline-block; padding: 4px 14px; background: rgba(108,92,231,0.12);
    color: var(--accent-1); border-radius: var(--radius-full); font-size: 0.8rem;
    font-weight: 600; margin-bottom: 10px;
}
.timeline-content h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px; }
.timeline-content p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; }

/* ===== GALLERY ===== */
.gallery-section { background: var(--bg-secondary); }
.gallery-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px; gap: 16px;
}
.gallery-item {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border-color); transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.03); border-color: var(--accent-1); z-index: 2; }
.gallery-item-tall { grid-row: span 2; }
.gallery-item-wide { grid-column: span 2; }

.gallery-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: var(--bg-glass); font-size: 2.5rem; color: var(--text-muted);
    transition: var(--transition);
}
.gallery-item:hover .gallery-placeholder { color: var(--accent-1); background: rgba(108,92,231,0.06); }
.gallery-item::after {
    content: attr(data-label); position: absolute; bottom: 0; left: 0; right: 0;
    padding: 12px 16px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff; font-size: 0.85rem; font-weight: 500; opacity: 0;
    transform: translateY(100%); transition: var(--transition);
}
.gallery-item:hover::after { opacity: 1; transform: translateY(0); }

.gallery-note {
    text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.85rem;
    font-family: var(--font-hand); font-size: 1.1rem;
}
.gallery-note i { margin-right: 6px; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h3 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 16px; }
.contact-info > p { color: var(--text-secondary); margin-bottom: 28px; }
.contact-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.contact-card {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); transition: var(--transition);
}
.contact-card:hover { border-color: var(--accent-1); transform: translateX(6px); }
.contact-card i { font-size: 1.3rem; color: var(--accent-1); width: 24px; text-align: center; }
.contact-card strong { display: block; font-size: 0.85rem; }
.contact-card span { font-size: 0.8rem; color: var(--text-muted); }

.social-links { display: flex; gap: 12px; }
.social-link {
    width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    color: var(--text-secondary); transition: var(--transition); background: var(--bg-glass);
}
.social-link:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; transform: translateY(-4px); }

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
    width: 100%; padding: 16px 20px; background: var(--bg-glass);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem;
    transition: var(--transition); outline: none; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-1); background: rgba(108,92,231,0.04); }
.form-group label {
    position: absolute; left: 20px; top: 16px; font-size: 0.9rem; color: var(--text-muted);
    transition: var(--transition); pointer-events: none;
}
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -10px; left: 14px; font-size: 0.75rem; color: var(--accent-1);
    background: var(--bg-primary); padding: 0 6px;
}
.form-line {
    position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
    background: var(--accent-gradient); transition: var(--transition);
    transform: translateX(-50%);
}
.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line { width: 100%; }

/* Fix WebKit Autofill white background */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover, 
.form-group input:-webkit-autofill:focus, 
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px #1a1a24 inset; /* approximates dark theme background */
    transition: background-color 5000s ease-in-out 0s;
}

/* ===== FOOTER ===== */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border-color); }
.footer-content { text-align: center; }
.footer-logo {
    font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
    margin-bottom: 12px; display: inline-block;
}
.footer-content > p { color: var(--text-secondary); margin-bottom: 16px; }
.heart-beat { display: inline-block; animation: heartBeat 1.2s ease-in-out infinite; }
@keyframes heartBeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.3); } 28% { transform: scale(1); } 42% { transform: scale(1.3); } 70% { transform: scale(1); } }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-1); }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 8px; }
.easter-egg-hint { color: var(--text-muted); font-size: 0.75rem; opacity: 0.5; }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px;
    border-radius: 50%; background: var(--accent-gradient); color: #fff;
    border: none; font-size: 1.1rem; display: flex; align-items: center;
    justify-content: center; opacity: 0; visibility: hidden; z-index: 999;
    transition: var(--transition); box-shadow: 0 4px 20px rgba(108,92,231,0.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(108,92,231,0.5); }

/* ===== EMOJI RAIN ===== */
.emoji-rain {
    position: fixed; inset: 0; pointer-events: none; z-index: 99998; overflow: hidden;
}
.emoji-drop {
    position: absolute; top: -50px; font-size: 2rem;
    animation: emojiDrop 3s linear forwards;
}
@keyframes emojiDrop {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up, .reveal-left, .reveal-right { opacity: 0; transition: opacity 0.8s, transform 0.8s; }
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-up.revealed, .reveal-left.revealed, .reveal-right.revealed { opacity: 1; transform: translate(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 300px 1fr; gap: 40px; }
    .skills-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .achievements-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--bg-primary); flex-direction: column;
        justify-content: center; transition: var(--transition);
        border-left: 1px solid var(--border-color); z-index: 999;
    }
    .nav-menu.active { right: 0; }
    .nav-links { flex-direction: column; gap: 0; }
    .nav-link { padding: 16px 32px; font-size: 1rem; border-radius: 0; }
    .nav-link:hover, .nav-link.active { background: var(--bg-glass); }
    .theme-toggle { margin-right: 12px; }

    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-image { max-width: 300px; margin: 0 auto; }
    .about-info-grid { grid-template-columns: 1fr; }

    .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
    .gallery-item-wide { grid-column: span 2; }
    .gallery-item-tall { grid-row: span 1; }

    section { padding: 70px 0; }
    .section-title { font-size: clamp(1.7rem, 5vw, 2.5rem); }

    .hero-stats { flex-direction: column; align-items: center; }
    .stat { padding: 16px 24px; }

    .timeline { padding-left: 30px; }
    .timeline::before { left: 10px; }
    .timeline-dot { left: -27px; }

    /* Hide custom cursor on touch */
    .custom-cursor, .custom-cursor-dot, .cursor-glow { display: none !important; }
    body { cursor: auto; }
    a, button { cursor: pointer; }
}

@media (max-width: 480px) {
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    .achievements-grid { grid-template-columns: 1fr; }
    .funfacts-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 180px; }
    .gallery-item-wide { grid-column: span 1; }
    .footer-links { flex-wrap: wrap; gap: 16px; }
    .marquee-content span { font-size: 0.8rem; margin: 0 16px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal-up, .reveal-left, .reveal-right { opacity: 1; transform: none; }
}
