/* ═══════════════════════════════════════════════════════════════════════════
   AHMED KHALED ALI — PORTFOLIO 2025
   A modern, distinctive portfolio for ML Engineers
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   CSS VARIABLES
   ───────────────────────────────────────────────────────────────────────────── */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-card-hover: #1e1e2a;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606075;
    
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #f472b6;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #f472b6 100%);
    --accent-gradient-subtle: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
    
    /* Typography */
    --font-display: 'Sora', sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f8fa;
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #8a8a9a;
    
    --accent-primary: #0095cc;
    --accent-secondary: #6d28d9;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.12);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(0, 149, 204, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    transition: background 0.5s ease;
}

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

body {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme transition overlay for smooth morphing effect */
.theme-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    background: radial-gradient(circle at var(--theme-x, 50%) var(--theme-y, 50%),
                                var(--transition-color, transparent) 0%,
                                transparent 70%);
    transition: opacity 0.5s ease;
}

.theme-transition-overlay.active {
    opacity: 1;
    animation: themeRipple 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes themeRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Universal theme transition properties */
html[data-theme],
html[data-theme] * {
    transition-property: background-color, border-color, box-shadow, color, fill, stroke;
    transition-duration: 0.5s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Exclude elements that shouldn't transition (animations, transforms) */
html[data-theme] .ghost-icon,
html[data-theme] .ghost-sparkles,
html[data-theme] .btn-primary,
html[data-theme] .floating-icons,
html[data-theme] .avatar-ring,
html[data-theme] .scroll-dot,
html[data-theme] .logo-dot,
html[data-theme] [class*="animate"],
html[data-theme] canvas {
    transition-property: background-color, border-color, box-shadow, color, fill, stroke, filter;
    transition-duration: 0.5s;
}

::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CURSOR GLOW EFFECT
   ───────────────────────────────────────────────────────────────────────────── */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(0, 149, 204, 0.06) 0%, transparent 70%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   NEURAL NETWORK BACKGROUND
   ───────────────────────────────────────────────────────────────────────────── */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

[data-theme="light"] #neural-bg {
    opacity: 0.3;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────────────────────────── */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

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

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

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.05);
}

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

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

.btn-full {
    width: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    position: relative;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Ghost Theme Toggle */
.theme-toggle {
    position: relative;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    background: transparent;
}

.theme-toggle:hover {
    background: var(--accent-gradient-subtle);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.ghost-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ghost-icon {
    display: block;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.3));
}

.theme-toggle:hover .ghost-icon {
    transform: translateY(-3px) scale(1.05);
    animation: ghostFloat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 15px rgba(0, 212, 255, 0.5));
}

@keyframes ghostFloat {
    0%, 100% {
        transform: translateY(-3px) scale(1.05);
    }
    50% {
        transform: translateY(-8px) scale(1.08);
    }
}

.ghost-body {
    transition: all var(--transition-normal);
}

.ghost-shadow {
    transition: all var(--transition-normal);
    opacity: 0.3;
}

.theme-toggle:hover .ghost-shadow {
    opacity: 0.15;
    transform: scale(0.8);
}

.ghost-highlight {
    opacity: 0.6;
    transition: opacity var(--transition-normal);
}

.theme-toggle:hover .ghost-highlight {
    opacity: 0.9;
}

.ghost-eye {
    fill: #fff;
    transition: all var(--transition-normal);
}

.ghost-eye-shine {
    transition: all var(--transition-fast);
}

.ghost-pupil {
    fill: #1a1a2e;
    transition: all var(--transition-fast);
    transform-origin: center;
}

.theme-toggle:hover .ghost-pupil.left-pupil {
    transform: translate(2px, -1px);
}

.theme-toggle:hover .ghost-pupil.right-pupil {
    transform: translate(2px, -1px);
}

.ghost-smile {
    transition: all var(--transition-normal);
    opacity: 0.8;
}

.theme-toggle:hover .ghost-smile {
    opacity: 1;
    stroke-width: 3;
}

.ghost-blush {
    fill: rgba(244, 114, 182, 0.5);
    transition: all var(--transition-normal);
}

.theme-toggle:hover .ghost-blush {
    fill: rgba(244, 114, 182, 0.8);
}

.theme-toggle:hover .ghost-blush.left-blush {
    transform: translateX(-2px);
}

.theme-toggle:hover .ghost-blush.right-blush {
    transform: translateX(2px);
}

/* Sparkle animations */
.ghost-sparkles .sparkle {
    opacity: 0;
    transition: all var(--transition-normal);
}

.theme-toggle:hover .ghost-sparkles .sparkle {
    opacity: 1;
    animation: sparkleFloat 1.5s ease-in-out infinite;
}

.theme-toggle:hover .ghost-sparkles .sparkle:nth-child(1) {
    animation-delay: 0s;
}

.theme-toggle:hover .ghost-sparkles .sparkle:nth-child(2) {
    animation-delay: 0.3s;
}

.theme-toggle:hover .ghost-sparkles .sparkle:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes sparkleFloat {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.ghost-tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) scale(0) translateY(10px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: none;
}

.theme-toggle:hover .ghost-tooltip {
    transform: translateX(-50%) scale(1) translateY(0);
    opacity: 1;
}

/* Ghost click animation */
.theme-toggle:active .ghost-icon {
    transform: scale(0.9) rotate(5deg);
}

/* Light mode ghost changes */
[data-theme="light"] .ghost-body {
    fill: url(#ghost-gradient-light);
}

[data-theme="light"] .ghost-icon {
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.2));
}

[data-theme="light"] .theme-toggle:hover .ghost-icon {
    filter: drop-shadow(0 4px 15px rgba(124, 58, 237, 0.4));
}

[data-theme="light"] .ghost-eye {
    fill: #fff;
}

[data-theme="light"] .ghost-pupil {
    fill: #6b7280;
}

[data-theme="light"] .ghost-blush {
    fill: rgba(244, 114, 182, 0.4);
}

[data-theme="light"] .theme-toggle:hover .ghost-blush {
    fill: rgba(244, 114, 182, 0.7);
}

[data-theme="light"] .ghost-smile {
    stroke: #374151;
}

[data-theme="light"] .ghost-shadow {
    fill: rgba(0,0,0,0.1);
}

[data-theme="light"] .ghost-highlight {
    stroke: rgba(255,255,255,0.6);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-cta:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.nav-cta i {
    font-size: 12px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--accent-gradient-subtle);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    width: fit-content;
    animation: fadeInUp 0.6s ease forwards;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.title-line {
    display: block;
}

.word {
    display: inline-block;
    opacity: 0;
    animation: wordReveal 0.5s ease forwards;
    animation-delay: calc(var(--delay) * 0.1s + 0.3s);
}

@keyframes wordReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.word.accent {
    color: var(--accent-primary);
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 500px;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.hero-description em {
    color: var(--accent-primary);
    font-style: normal;
}

.hero-description strong {
    color: var(--text-primary);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

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

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-primary);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

.hero-cta {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.6s ease 0.5s forwards;
    opacity: 0;
}

.hero-socials {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.6s ease 0.6s forwards;
    opacity: 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

.avatar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(40px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.05); }
}

.avatar-ring {
    position: absolute;
    inset: -10px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: var(--accent-gradient) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotate 8s linear infinite;
}

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

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.avatar-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Floating Icons */
.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-primary);
    animation: float 4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.5s);
}

.float-icon:nth-child(1) { top: 0; left: 10%; }
.float-icon:nth-child(2) { top: 20%; right: 0; }
.float-icon:nth-child(3) { bottom: 30%; right: 10%; }
.float-icon:nth-child(4) { bottom: 10%; left: 20%; }
.float-icon:nth-child(5) { top: 40%; left: 0; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeIn 1s ease 1s forwards;
    opacity: 0;
}

.scroll-text {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: 0;
    width: 100%;
    height: 20px;
    background: var(--accent-gradient);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(300%); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION HEADERS
   ───────────────────────────────────────────────────────────────────────────── */
.section-header {
    margin-bottom: 60px;
}

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

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
}

.section-header.center .section-desc {
    margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ABOUT SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-intro .lead {
    font-size: 22px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.about-story p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.highlight-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.highlight-icon {
    font-size: 24px;
}

.highlight-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.highlight-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.info-card:hover {
    border-color: var(--border-color-hover);
    transform: translateX(8px);
}

.info-card.featured {
    background: var(--accent-gradient-subtle);
    border-color: rgba(0, 212, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 500;
}

.card-header i {
    font-size: 14px;
}

.info-card h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.card-cta {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-primary);
    transition: gap var(--transition-fast);
}

.card-cta:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   EXPERIENCE SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-track {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marker-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 0 6px var(--accent-primary);
    position: relative;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-md);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.role-info h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.company {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 15px;
}

.company i {
    font-size: 11px;
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.timeline-meta .date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

.timeline-meta .location {
    font-size: 13px;
    color: var(--text-secondary);
}

.role-summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.achievements {
    list-style: none;
    margin-bottom: 20px;
}

.achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.achievements li strong {
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    padding: 4px 12px;
    background: var(--accent-gradient-subtle);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-primary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PROJECTS SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.project-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-card.featured .project-image {
    height: 100%;
    min-height: 300px;
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-visual {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-bg {
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.1;
    transition: opacity var(--transition-normal);
}

.project-card:hover .visual-bg {
    opacity: 0.15;
}

.project-visual i {
    font-size: 48px;
    color: var(--accent-primary);
    opacity: 0.8;
    transition: all var(--transition-normal);
}

.project-card:hover .project-visual i {
    transform: scale(1.1);
    opacity: 1;
}

.project-links {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

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

.project-link {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.project-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.project-content {
    padding: 24px;
}

.project-category {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.project-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.project-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-metrics {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.projects-cta {
    text-align: center;
    margin-top: 48px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SKILLS SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--border-color-hover);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.category-header i {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.category-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.1;
    width: calc(var(--level, 0) * 1%);
    transition: width 1s ease;
}

.skill-name {
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.skill-level {
    font-size: 12px;
    color: var(--accent-primary);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Certifications */
.certifications {
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.cert-title {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.cert-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.cert-icon {
    font-size: 32px;
}

.cert-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.cert-info span {
    font-size: 13px;
    color: var(--text-secondary);
}

.cert-card.more {
    background: var(--accent-gradient-subtle);
    border-color: rgba(0, 212, 255, 0.2);
}

/* ─────────────────────────────────────────────────────────────────────────────
   TESTIMONIAL SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.testimonial {
    background: var(--bg-secondary);
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    position: relative;
}

.quote-mark {
    position: absolute;
    top: 24px;
    left: 32px;
    font-size: 120px;
    font-family: Georgia, serif;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.2;
    line-height: 1;
}

blockquote {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.author-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.author-info p {
    color: var(--accent-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.author-location {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-companies {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-companies a {
    color: var(--accent-primary);
    font-weight: 500;
}

.author-companies a:hover {
    text-decoration: underline;
}

.author-companies span {
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CONTACT SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.contact-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.contact-card:hover .fa-arrow-right {
    transform: translateX(4px);
    color: var(--accent-primary);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 20px;
}

.contact-details {
    flex: 1;
}

.contact-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 15px;
    font-weight: 500;
}

.contact-card .fa-arrow-right {
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 16px 16px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
    pointer-events: none;
    transition: all var(--transition-fast);
    background: var(--bg-card);
    padding: 0 4px;
}

.form-group textarea ~ label {
    top: 20px;
    transform: 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: 0;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--accent-primary);
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────────── */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo .dot {
    -webkit-text-fill-color: var(--accent-primary);
}

.footer-left p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

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

.footer-center p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-center .copyright {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.footer-socials a:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BACK TO TOP
   ───────────────────────────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

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

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

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-description {
        max-width: 600px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-socials {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .avatar-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .floating-icons {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .project-card.featured {
        grid-column: span 1;
        display: block;
    }
    
    .project-card.featured .project-image {
        min-height: 200px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        transition: right var(--transition-normal);
        border-left: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 18px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .nav-cta {
        display: none;
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .timeline-item {
        grid-template-columns: 30px 1fr;
        gap: 16px;
    }
    
    .timeline-track {
        left: 14px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-meta {
        align-items: flex-start;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 32px 24px;
    }
    
    .quote-mark {
        font-size: 80px;
        left: 16px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 60px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .avatar-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ANIMATIONS & UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Intersection Observer animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────────────────────
   THEME TRANSITION STYLES
   ───────────────────────────────────────────────────────────────────────────── */
/* Smooth transitions for key elements during theme change */
.navbar,
.nav-menu,
.nav-link,
.nav-cta,
.hero-badge,
.social-link,
.info-card,
.timeline-content,
.project-card,
.skill-category,
.cert-card,
.testimonial-card,
.contact-card,
.contact-form input,
.contact-form textarea,
.footer,
.back-to-top {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease;
}

/* Theme switching animation for ghost icon */
.theme-toggle.switching .ghost-icon {
    animation: ghostThemeSwitch 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ghostThemeSwitch {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(0.8) rotate(-15deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    75% {
        transform: scale(0.95) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Staggered transition effect for cards */
.theme-transitioning .project-card:nth-child(1) { transition-delay: 0.02s; }
.theme-transitioning .project-card:nth-child(2) { transition-delay: 0.04s; }
.theme-transitioning .project-card:nth-child(3) { transition-delay: 0.06s; }
.theme-transitioning .project-card:nth-child(4) { transition-delay: 0.08s; }
.theme-transitioning .project-card:nth-child(5) { transition-delay: 0.10s; }
.theme-transitioning .project-card:nth-child(6) { transition-delay: 0.12s; }

.theme-transitioning .skill-category:nth-child(1) { transition-delay: 0.02s; }
.theme-transitioning .skill-category:nth-child(2) { transition-delay: 0.04s; }
.theme-transitioning .skill-category:nth-child(3) { transition-delay: 0.06s; }
.theme-transitioning .skill-category:nth-child(4) { transition-delay: 0.08s; }
.theme-transitioning .skill-category:nth-child(5) { transition-delay: 0.10s; }
.theme-transitioning .skill-category:nth-child(6) { transition-delay: 0.12s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    html[data-theme],
    html[data-theme] * {
        transition-duration: 0.01ms !important;
    }
}
