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

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-card: #252d4a;
    --text-primary: #e8eaf6;
    --text-secondary: #9fa8da;
    --accent: #00d9ff;
    --accent-glow: rgba(0, 217, 255, 0.4);
    --accent-secondary: #7c4dff;
    --border: #3d4a7a;
    --shadow: rgba(0, 217, 255, 0.1);
}

[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1f3a;
    --text-secondary: #5f6c8f;
    --accent: #0077ff;
    --accent-glow: rgba(0, 119, 255, 0.15);
    --accent-secondary: #6b3dff;
    --border: #e0e5ec;
    --shadow: rgba(0, 119, 255, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, var(--accent-glow) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(124, 77, 255, 0.15) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5%, -5%) rotate(120deg); }
    66% { transform: translate(-5%, 5%) rotate(240deg); }
}

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

header {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
    animation: fadeInDown 0.8s ease;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 2px;
    box-shadow: 0 0 20px var(--accent-glow);
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin: 1.5rem 0 1rem;
    font-weight: 500;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.contact-info a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-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.3s ease;
}

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

.contact-info a:hover {
    transform: translateY(-2px);
    color: var(--accent);
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 20px var(--shadow), 0 0 40px var(--accent-glow);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(180deg);
    box-shadow: 0 6px 30px var(--shadow), 0 0 60px var(--accent-glow);
    border-color: var(--accent);
}

section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease;
    animation-fill-mode: both;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 2px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.statement {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.statement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.statement:hover::before {
    opacity: 1;
}

.statement p {
    position: relative;
    z-index: 1;
}

.job {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.job::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.job:hover {
    transform: translateX(12px) translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 40px var(--accent-glow);
    border-color: var(--accent);
}

.job:hover::before {
    opacity: 1;
}

.job-header {
    margin-bottom: 1rem;
}

.job-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.job-date {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-glow);
    border-radius: 6px;
}

.job ul {
    list-style: none;
    color: var(--text-secondary);
}

.job li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.job li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

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

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.skill-category::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 0 40px var(--accent-glow);
    border-color: var(--accent);
}

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

.skill-category h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.skill-category ul {
    list-style: none;
    position: relative;
    z-index: 1;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.3s ease;
}

.skill-category li::before {
    content: "◆";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.skill-category li:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.skill-category li:hover::before {
    color: var(--accent-secondary);
}

.education-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.education-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 2px solid var(--accent);
    padding: 1.5rem;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2), 0 0 60px var(--accent-glow);
    z-index: 1000;
    animation: slideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: none;
    backdrop-filter: blur(20px);
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 250px;
}

.cookie-text p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cookie-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-text a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.cookie-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

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

.cookie-button:hover::before {
    width: 300px;
    height: 300px;
}

.cookie-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.pacman-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

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

.pacman-button:hover::before {
    width: 300px;
    height: 300px;
}

.pacman-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

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

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner {
        padding: 1rem;
    }

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

/* Glow effect on scroll */
.glow {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
    50% { box-shadow: 0 8px 40px var(--accent-glow); }
}