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

:root {
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --bg-section: #f0f2f8;
    --text: #2d3748;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.1);
    --border: #e2e8f0;
    --radius: 14px;
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* === LANGUAGE SWITCHER === */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

.lang-btn:hover:not(.active) {
    color: var(--text);
    background: var(--accent-glow);
}

/* === NAVIGATION === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 249, 252, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a2e;
}

.nav-logo .accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-burger span {
    width: 24px;
    height: 2px;
    background: #1a1a2e;
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text);
    font-size: 1rem;
    padding: 8px 0;
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 40px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.4;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: #c7d2fe;
    top: -150px;
    right: -150px;
    opacity: 0.5;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: #ddd6fe;
    bottom: -100px;
    left: -100px;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 700px;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #1a1a2e;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 36px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease 0.4s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
}

.btn-outline {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 60px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease 0.5s forwards;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a2e;
}

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

/* === SECTIONS === */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--bg-section);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: #1a1a2e;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* === ABOUT === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

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

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.highlight-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
}

.highlight-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.highlight-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.highlight-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* === SKILLS === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.skill-category h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
}

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

.skill-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-glow);
    color: var(--accent-light);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.skill-tag.learning {
    background: rgba(234, 179, 8, 0.08);
    color: #b45309;
    border-color: rgba(234, 179, 8, 0.25);
}

.skill-tag.learning:hover {
    background: rgba(234, 179, 8, 0.2);
}

/* === PROJECTS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

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

.project-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ffffff, #eef2ff);
    border-color: rgba(99, 102, 241, 0.25);
}

.project-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.project-icon {
    font-size: 2rem;
}

.project-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-features span {
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.project-stack span {
    padding: 4px 10px;
    background: var(--accent-glow);
    color: var(--accent-light);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* === CONTACT === */
.contact-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: -40px;
    margin-bottom: 48px;
}

.contact-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 32px;
    transition: var(--transition);
    min-width: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 10px;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-light);
}

.contact-card span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === ANIMATIONS === */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .nav { padding: 16px 20px; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .project-card.featured {
        grid-column: auto;
    }

    .hero { padding: 100px 20px 60px; }
    .hero-stats { gap: 32px; }
    .container { padding: 0 20px; }
    .section { padding: 70px 0; }

    .lang-switcher {
        top: 14px;
        right: 60px;
    }
}

@media (max-width: 600px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .contact-cards {
        flex-direction: column;
        align-items: center;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }
}
