/* --- ULTRA-MODERN DESIGN 2025 --- */
:root {
    /* Modern color system with trendy palette */
    --background-light: #fafafa;
    --text-light: #1a1a1a;
    --card-bg-light: rgba(255, 255, 255, 0.7);
    --glass-bg-light: rgba(255, 255, 255, 0.75);
    --glass-border-light: rgba(0, 0, 0, 0.08);
    --border-light: #e5e5e5;
    --surface-light: #f5f5f5;

    --background-dark: #0a0a0a;
    --text-dark: #ededed;
    --card-bg-dark: rgba(20, 20, 20, 0.85);
    --glass-bg-dark: rgba(20, 20, 20, 0.75);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --border-dark: #2a2a2a;
    --surface-dark: #141414;

    /* Trendy 2025 accent system */
    --accent-violet: #7c3aed;
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --accent-pink: #ec4899;
    --accent-emerald: #10b981;

    /* Modern gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-modern: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #4f46e5 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));

    /* Contemporary shadows with colored tints */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.08);

    /* Theme defaults - Dark mode as default */
    --background: var(--background-dark);
    --foreground: var(--text-dark);
    --card-bg: var(--card-bg-dark);
    --glass-bg: var(--glass-bg-dark);
    --glass-border: var(--glass-border-dark);
    --border-color: var(--border-dark);
    --surface: var(--surface-dark);
}

/* Light theme */
[data-theme="light"] {
    --background: var(--background-light);
    --foreground: var(--text-light);
    --card-bg: var(--card-bg-light);
    --glass-bg: var(--glass-bg-light);
    --glass-border: var(--glass-border-light);
    --border-color: var(--border-light);
    --surface: var(--surface-light);
}

/* Dark theme (explicit, same as default) */
[data-theme="dark"] {
    --background: var(--background-dark);
    --foreground: var(--text-dark);
    --card-bg: var(--card-bg-dark);
    --glass-bg: var(--glass-bg-dark);
    --glass-border: var(--glass-border-dark);
    --border-color: var(--border-dark);
    --surface: var(--surface-dark);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: var(--background-dark);
        --foreground: var(--text-dark);
        --card-bg: var(--card-bg-dark);
        --glass-bg: var(--glass-bg-dark);
        --glass-border: var(--glass-border-dark);
        --border-color: var(--border-dark);
        --surface: var(--surface-dark);
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --background: var(--background-dark);
        --foreground: var(--text-dark);
        --card-bg: var(--card-bg-dark);
        --glass-bg: var(--glass-bg-dark);
        --glass-border: var(--glass-border-dark);
        --border-color: var(--border-dark);
        --surface: var(--surface-dark);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Modern animated background */
    background:
        radial-gradient(ellipse 100% 60% at 10% -20%, rgba(124, 58, 237, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 90% 120%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(79, 70, 229, 0.04) 0%, transparent 50%),
        var(--background);
    background-attachment: fixed;
}

/* Modern mouse-following gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle 600px at var(--x, 50%) var(--y, 50%), rgba(139, 92, 246, 0.08) 0%, transparent 70%),
        radial-gradient(circle 400px at var(--x2, 50%) var(--y2, 50%), rgba(59, 130, 246, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: screen;
    will-change: background;
}

/* Subtle noise texture for depth */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><filter id="noise"><feTurbulence baseFrequency="0.8" seed="1" numOctaves="4"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"/></filter><rect width="100%" height="100%" filter="url(%23noise)"/></svg>') repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

/* --- MODERN HEADER --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    background: rgba(10, 10, 10, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 2.5rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] header {
    background: rgba(250, 250, 250, 0.7);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

header.scrolled {
    height: 56px;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 1001;
    position: relative;
    margin-left: 0;
}

.logo-image {
    width: 38px;
    height: 38px;
    border-radius: 0;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.3));
    background: transparent;
    padding: 0;
    mix-blend-mode: screen;
}

.logo:hover .logo-image {
    transform: scale(1.06);
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.5));
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

.desktop-nav ul {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.desktop-nav a {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    color: var(--foreground);
    text-decoration: none;
    font-weight: 450;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    position: relative;
    transition: all 0.25s ease;
    opacity: 0.55;
}

.desktop-nav a::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1.5px;
    background: var(--accent-violet);
    border-radius: 1px;
    transition: width 0.25s ease;
}

.desktop-nav a:hover {
    opacity: 1;
    color: var(--foreground);
    transform: none;
}

.desktop-nav a:hover::before {
    width: 16px;
}

.desktop-nav a.active {
    background: transparent;
    color: var(--foreground);
    box-shadow: none;
    opacity: 1;
    font-weight: 550;
}

.desktop-nav a.active::before {
    width: 16px;
    opacity: 1;
}

/* Mobile Navigation Dropdown */
.mobile-nav {
    display: block;
    position: relative;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    gap: 5px;
    position: relative;
    z-index: 1001;
}

.nav-toggle:hover {
    background: var(--gradient-modern);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.nav-toggle:hover .hamburger-line {
    background: white;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--foreground);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    min-width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-dropdown li {
    margin: 0;
}

.nav-dropdown a {
    display: block;
    padding: 1rem 1.75rem;
    color: var(--foreground);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 0;
}

.nav-dropdown a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--gradient-modern);
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
}

.nav-dropdown a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-violet);
    padding-left: 2.25rem;
}

.nav-dropdown a:hover::before {
    height: 70%;
}

/* Show desktop nav on larger screens */
@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }
    
    .mobile-nav {
        display: none;
    }
}

.github-icon,
.linkedin-icon,
.x-icon {
    padding: 0.45rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    transition: all 0.25s ease;
}

.github-icon:hover,
.linkedin-icon:hover,
.x-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: none;
    box-shadow: none;
}

[data-theme="light"] .github-icon:hover,
[data-theme="light"] .linkedin-icon:hover,
[data-theme="light"] .x-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

.github-icon svg,
.linkedin-icon svg,
.x-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--foreground);
    opacity: 0.45;
    transition: opacity 0.25s ease;
}

.github-icon:hover svg,
.linkedin-icon:hover svg,
.x-icon:hover svg {
    fill: var(--foreground);
    opacity: 0.85;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.theme-toggle {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: none;
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

#theme-toggle {
    outline: none;
    box-shadow: none;
}

#theme-toggle:focus {
    outline: none;
    box-shadow: none;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: var(--foreground);
    opacity: 0.5;
    transition: all 0.25s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .moon-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* --- MODERN HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    animation: heroAppear 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    max-width: 900px;
}

@keyframes heroAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-content h1 {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 900;
    background: linear-gradient(
        to right,
        #8b5cf6, #ec4899, #f43f5e, #eab308, #10b981, #06b6d4, #3b82f6, #8b5cf6
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.05;
    letter-spacing: -0.05em;
    animation: rgbFade 10s linear infinite;
    filter: drop-shadow(0 4px 20px rgba(139, 92, 246, 0.15));
}

@keyframes rgbFade {
    0% { background-position: 0% center; }
    100% { background-position: -200% center; }
}

.hero-subtitle-marquee {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: subtitleReveal 1s ease 1.2s forwards;
    -webkit-mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.8rem, 1.6vw, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--foreground);
    white-space: nowrap;
    margin: 0;
}

.marquee-inner {
    display: inline-block;
    animation: marqueeSlide 20s linear infinite;
    will-change: transform;
}

@keyframes marqueeSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes subtitleReveal {
    0% {
        opacity: 0;
        filter: blur(4px);
    }
    100% {
        opacity: 0.45;
        filter: blur(0);
    }
}

.python-logo {
    width: 80px;
    height: 80px;
    margin: 1.5rem 0;
    animation: pythonFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(124, 58, 237, 0.2));
}

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

/* --- ACCORDION SECTIONS --- */
.accordion-section {
    border: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.accordion-section + .accordion-section {
    margin-top: 0;
}

.accordion-trigger {
    cursor: pointer;
    user-select: none;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 0.6rem !important;
    padding: 0.75rem 0;
    margin-bottom: 0;
    transition: all 0.3s ease;
    border-radius: 0;
    background: transparent;
    border: none;
}

h2.accordion-trigger::after {
    display: none !important;
    content: none !important;
}

.accordion-trigger:hover {
    opacity: 0.7;
}

.accordion-trigger.open {
    opacity: 1;
}

.accordion-title-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-title-left span {
    font-family: 'Orbitron', monospace;
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Unique colors per section */
[data-accordion="about"] .accordion-title-left span,
[data-accordion="about"] .section-icon {
    color: #a78bfa;
}

[data-accordion="projects"] .accordion-title-left span,
[data-accordion="projects"] .section-icon {
    color: #22d3ee;
}

[data-accordion="skills"] .accordion-title-left span,
[data-accordion="skills"] .section-icon {
    color: #34d399;
}

.accordion-trigger .section-icon {
    animation: none;
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.accordion-trigger:hover .section-icon {
    opacity: 1;
    color: var(--accent-violet);
}

.accordion-trigger.open .section-icon {
    opacity: 1;
    color: var(--accent-violet);
}

.accordion-chevron {
    width: 16px;
    height: 16px;
    color: var(--foreground);
    opacity: 0.3;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
    margin-left: 0.25rem;
}

.accordion-trigger:hover .accordion-chevron {
    opacity: 0.6;
}

.accordion-trigger.open .accordion-chevron {
    transform: rotate(180deg);
    opacity: 0.8;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s ease;
    opacity: 0;
    padding: 0;
    margin-top: 0;
}

.accordion-content.open {
    max-height: 2000px;
    opacity: 1;
    padding: 1rem 0 1.5rem;
    margin-top: 0.5rem;
}

.accordion-section.content-section {
    padding: 0 2rem;
}

/* --- CONTENT SECTIONS --- */
.content-section {
    padding: 4.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    letter-spacing: -0.02em;
    position: relative;
    flex-direction: column;
}

.section-title span {
    background: linear-gradient(135deg, var(--foreground) 0%, var(--foreground) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.5s ease;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
    border-radius: 3px;
    margin-top: 0.8rem;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title:hover::after {
    width: 80px;
}

.section-icon {
    color: var(--primary-500);
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 6px 20px rgba(99, 102, 241, 0.5)); }
}

/* --- ABOUT LAYOUT --- */
.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-bio {
    min-height: 120px;
}

.typing-text {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 800px;
    margin: 0;
    text-align: left;
    line-height: 1.9;
    color: var(--foreground);
    opacity: 0.8;
}

.typing-cursor {
    display: inline-block;
    background: var(--accent-violet);
    width: 2px;
    height: 1.2em;
    animation: blink 1s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

.highlight-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(12px);
}

.highlight-card:hover {
    transform: translateX(6px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
}

.highlight-number {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-modern);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 48px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.highlight-card:hover .highlight-number {
    transform: scale(1.3) rotate(-5deg);
}

.highlight-label {
    font-size: 0.875rem;
    color: var(--foreground);
    opacity: 0.65;
    font-weight: 500;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.highlight-card:hover .highlight-label {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .typing-text {
        text-align: center;
    }
}

/* --- PREMIUM PROJECT GRID --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    border-radius: 20px;
    padding: 2px;
    background: var(--glass-border);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 0.0) 0%,
        rgba(124, 58, 237, 0.3) 50%,
        rgba(99, 102, 241, 0.0) 100%
    );
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.6s ease, background-position 0.6s ease;
    z-index: 1;
}

.project-card:hover::before {
    opacity: 1;
    animation: borderShimmer 3s ease-in-out infinite;
}

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

.project-card-glow {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(124, 58, 237, 0.12) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

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

.project-card-inner {
    background: var(--card-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-radius: 18px;
    padding: 2rem 2.25rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 60px rgba(124, 58, 237, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.project-icon {
    background: var(--gradient-modern);
    padding: 0.75rem;
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow:
        0 4px 12px rgba(124, 58, 237, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-icon--cyan {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    box-shadow:
        0 4px 12px rgba(8, 145, 178, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.project-icon--emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.project-card:hover .project-icon {
    transform: scale(1.08) rotate(-3deg);
    box-shadow:
        0 8px 24px rgba(124, 58, 237, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.project-card:hover .project-icon--cyan {
    box-shadow:
        0 8px 24px rgba(8, 145, 178, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.project-card:hover .project-icon--emerald {
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.project-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--foreground);
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.project-card:hover h3 {
    background: var(--gradient-modern);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Project status badge */
.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-emerald);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-status--blue {
    color: var(--accent-blue);
}

.project-status--emerald {
    color: var(--accent-emerald);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald);
    animation: statusPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.project-status--blue .status-dot {
    background: var(--accent-blue);
}

.project-status--emerald .status-dot {
    background: var(--accent-emerald);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.project-card p {
    color: var(--foreground);
    opacity: 0.55;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    flex-grow: 1;
}

/* Project tech tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--accent-violet);
    border: 1px solid rgba(124, 58, 237, 0.15);
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.project-card:hover .project-tag {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.25);
}

/* Project link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
    text-decoration: none;
    font-weight: 550;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.5;
    margin-top: auto;
}

.project-link svg {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-link:hover {
    color: var(--accent-violet);
    opacity: 1;
    gap: 0.35rem;
}

.project-link:hover svg {
    transform: translate(3px, -3px);
}

/* --- PREMIUM SKILLS SECTION --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skills-category {
    position: relative;
    border-radius: 20px;
    padding: 2px;
    background: var(--glass-border);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.skills-card-border {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: conic-gradient(
        from 180deg at 50% 50%,
        rgba(124, 58, 237, 0) 0deg,
        rgba(124, 58, 237, 0.4) 120deg,
        rgba(99, 102, 241, 0.3) 240deg,
        rgba(124, 58, 237, 0) 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.skills-category:hover .skills-card-border {
    opacity: 1;
    animation: rotateBorder 4s linear infinite;
}

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

.skills-card-inner {
    background: var(--card-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-radius: 18px;
    padding: 2rem;
    position: relative;
    z-index: 2;
    height: 100%;
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow:
        0 20px 60px rgba(124, 58, 237, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.12);
}

.skills-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.skills-icon {
    background: var(--gradient-modern);
    padding: 0.7rem;
    border-radius: 14px;
    box-shadow:
        0 4px 12px rgba(124, 58, 237, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
}

.skills-icon--cyan {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    box-shadow:
        0 4px 12px rgba(8, 145, 178, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skills-icon--emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skills-category:hover .skills-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow:
        0 8px 24px rgba(124, 58, 237, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.skills-category:hover .skills-icon--cyan {
    box-shadow:
        0 8px 24px rgba(8, 145, 178, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.skills-category:hover .skills-icon--emerald {
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.skills-icon--pink {
    background: linear-gradient(135deg, #db2777 0%, #ec4899 100%);
    box-shadow:
        0 4px 12px rgba(236, 72, 153, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skills-category:hover .skills-icon--pink {
    box-shadow:
        0 8px 24px rgba(236, 72, 153, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.skills-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.skills-category h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.01em;
    margin-bottom: 0.15rem;
}

.skills-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--foreground);
    opacity: 0.4;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0;
}

.skills-category ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skills-category li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--foreground);
    border: 1px solid var(--border-color);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    opacity: 0.7;
    letter-spacing: 0.01em;
    cursor: default;
}

.skills-category li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skills-category li:hover {
    opacity: 1;
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.1);
}

.skills-category li:hover::before {
    opacity: 1;
}

/* Skill color dots */
.skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.skill-dot--violet { background: var(--accent-violet); box-shadow: 0 0 6px rgba(124, 58, 237, 0.4); }
.skill-dot--blue { background: var(--accent-blue); box-shadow: 0 0 6px rgba(37, 99, 235, 0.4); }
.skill-dot--cyan { background: var(--accent-cyan); box-shadow: 0 0 6px rgba(8, 145, 178, 0.4); }
.skill-dot--emerald { background: var(--accent-emerald); box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.skill-dot--pink { background: var(--accent-pink); box-shadow: 0 0 6px rgba(236, 72, 153, 0.4); }
.skill-dot--yellow { background: #eab308; box-shadow: 0 0 6px rgba(234, 179, 8, 0.4); }

/* --- MODERN CONTACT SECTION --- */
#contact {
    text-align: center;
}

#contact p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0.85;
    line-height: 1.8;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--gradient-modern);
    color: white;
    padding: 1.1rem 2.75rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.contact-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.contact-button:hover::before {
    opacity: 1;
}

.contact-button span {
    position: relative;
    z-index: 1;
}

/* --- MODERN FOOTER --- */
footer {
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: var(--surface);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(10px);
}

footer p {
    color: var(--foreground);
    opacity: 0.7;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.footer-year {
    color: var(--accent-violet);
    font-weight: 600;
}

.footer-name {
    color: var(--foreground);
    font-weight: 600;
    margin: 0 0.125rem;
    background: var(--gradient-modern);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- LOADING SCREEN --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading-logo {
    margin-bottom: 2rem;
}

.loading-image {
    width: 80px;
    height: 80px;
    animation: logoPulse 2s ease-in-out infinite;
    background: transparent;
    border-radius: 0;
    padding: 0;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
    mix-blend-mode: screen;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--surface);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-modern);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    color: var(--foreground);
    opacity: 0.7;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* --- READING PROGRESS BAR --- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 10001;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-modern);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-modern);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* --- MODERN STATS SECTION --- */
.stats-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-modern);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(139, 92, 246, 0.3);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--gradient-modern);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    background: var(--gradient-modern);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--foreground);
    opacity: 0.7;
    font-weight: 500;
}

/* --- MODERN CONTACT FORM --- */
.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: none;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: #ffffff;
    border-color: #e0e0e0;
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
    background: #ffffff;
    border-color: var(--accent-violet);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.form-group label {
    position: absolute;
    left: 1.25rem;
    top: 1rem;
    color: rgba(0, 0, 0, 0.4);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 0.25rem;
}

[data-theme="dark"] .form-group label {
    color: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .form-group label {
    color: rgba(0, 0, 0, 0.45);
}

.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.625rem;
    left: 0.875rem;
    font-size: 0.75rem;
    color: var(--accent-violet);
    background: var(--background);
    font-weight: 600;
}

[data-theme="light"] .form-group input:focus ~ label,
[data-theme="light"] .form-group input:not(:placeholder-shown) ~ label,
[data-theme="light"] .form-group textarea:focus ~ label,
[data-theme="light"] .form-group textarea:not(:placeholder-shown) ~ label {
    background: var(--background-light);
}

.form-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gradient-modern);
    transition: width 0.3s ease;
}

.form-group input:focus ~ .form-highlight,
.form-group textarea:focus ~ .form-highlight {
    width: calc(100% - 2.5rem);
}

.form-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-modern);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.form-submit:hover::before {
    opacity: 1;
}

.form-submit span {
    position: relative;
    z-index: 1;
}

.form-submit svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.form-submit:hover svg {
    transform: translateX(4px);
}

.contact-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3rem 0;
    position: relative;
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.contact-divider span {
    padding: 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- PROJECT GRID LAYOUT --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- SKILLS BENTO GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- ENHANCED HERO SECTION --- */
.hero-section {
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

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

/* --- MODERN SECTION TITLES --- */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-modern);
    border-radius: 2px;
}

/* --- MODERN FOOTER --- */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-modern);
}

/* --- MODERN RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

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

    .contact-form {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .loading-image {
        width: 60px;
        height: 60px;
    }

    .loading-bar {
        width: 150px;
    }
}

/* --- MODERN ACCESSIBILITY ENHANCEMENTS --- */
@media (prefers-reduced-motion: reduce) {
    .loading-screen,
    .loading-content,
    .loading-image,
    .back-to-top,
    .stat-card,
    .project-card,
    .skills-category {
        animation: none !important;
        transition: none !important;
    }
}

/* --- MODERN PRINT STYLES --- */
@media print {
    .loading-screen,
    .reading-progress,
    .back-to-top,
    .contact-form,
    .theme-toggle,
    .nav-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .project-card,
    .skills-category,
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* --- EASTER EGG GAME --- */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.game-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.game-container {
    background: #111;
    border: 1px solid var(--accent-violet);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
    overflow: hidden;
    width: 440px;
    max-width: 95vw;
}

.game-header {
    background: #1a1a1a;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.game-header h3 {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-cyan);
}

.game-stats {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--foreground);
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--accent-pink);
}

.game-screen {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
}

#game-canvas {
    background: #000;
    border: 1px solid #222;
    image-rendering: pixelated;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.game-overlay.hidden {
    display: none;
}

.game-overlay p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--accent-emerald);
    margin-bottom: 1rem;
    animation: blink 1.5s infinite;
}

.game-controls-hint {
    font-size: 0.8rem !important;
    color: #888 !important;
    animation: none !important;
}

.game-overlay h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    color: var(--accent-pink);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.game-overlay kbd {
    background: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border-bottom: 2px solid #111;
    color: #fff;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* --- ARCADE MENU STYLES --- */
.game-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.action-btn:hover {
    color: var(--accent-cyan);
}

.action-btn.hidden {
    display: none;
}

.arcade-menu {
    width: 100%;
    max-width: 400px;
    padding: 2rem 0;
    text-align: center;
}

.arcade-menu.hidden {
    display: none;
}

.arcade-menu h2 {
    font-family: 'Orbitron', monospace;
    color: var(--foreground);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.arcade-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.arcade-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.arcade-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-violet);
    transform: translateX(5px);
}

.arcade-btn[data-game="snake"]:hover { border-color: var(--accent-emerald); }
.arcade-btn[data-game="pong"]:hover { border-color: var(--accent-cyan); }
.arcade-btn[data-game="bug"]:hover { border-color: var(--accent-pink); }

.game-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--foreground);
    font-size: 1rem;
}

.game-desc {
    font-size: 0.8rem;
    color: #888;
}

#canvas-container.hidden {
    display: none;
}