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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0a0a1a;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    padding: 16px 0;
}

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

.nav-logo {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
}

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

.nav-link {
    color: #a0a0b0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.95);
    padding: 16px 0;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(100, 90, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(60, 200, 150, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #a0a0b0;
    margin-bottom: 24px;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #645aff 0%, #4a4ae0 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(100, 90, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.hero-image {
    justify-self: end;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 320px;
}

.profile-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: linear-gradient(135deg, #645aff 0%, #3cc8b0 100%);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(100, 90, 255, 0.3);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-title {
    font-size: 14px;
    color: #a0a0b0;
    font-weight: 400;
}

.skills-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #645aff 0%, #3cc8b0 100%);
    margin: 16px auto 0;
}

.section-subtitle {
    text-align: center;
    color: #a0a0b0;
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: rgba(100, 90, 255, 0.3);
    box-shadow: 0 12px 40px rgba(100, 90, 255, 0.1);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(100, 90, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.skill-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.skill-description {
    font-size: 0.9rem;
    color: #a0a0b0;
    font-weight: 400;
}

.projects-section {
    padding: 100px 0;
}

.category-section {
    margin-bottom: 80px;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-title::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1));
}

.category-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #645aff 0%, #4a4ae0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
    flex-shrink: 0;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(100, 90, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-description {
    font-size: 0.9rem;
    color: #a0a0b0;
    font-weight: 400;
}

.contact-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.contact-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
}

.contact-icon-email .contact-icon-emoji,
.contact-icon-location img,
.contact-icon-whatsapp img,
.contact-icon-github img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 22px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: rgba(100, 90, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(100, 90, 255, 0.1);
    flex-shrink: 0;
}

.contact-icon-emoji {
    font-size: 20px;
}

.contact-info h4 {
    font-size: 0.85rem;
    color: #a0a0b0;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #645aff;
}

.contact-text {
    color: #e0e0e0;
    font-weight: 500;
}

.footer {
    padding: 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-text {
    color: #a0a0b0;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-image {
        justify-self: center;
    }

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

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

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

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 32px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

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

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

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

    .hero-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

@media (min-width: 1401px) {
    .hero-title {
        font-size: 4rem;
    }
}

.skip-link { position: absolute; left: -999px; top: 8px; background: #645aff; color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 2000; text-decoration: none; }
.skip-link:focus { left: 8px; }
.nav-logo { text-decoration: none; }
.nav-link.is-active { color: #ffffff; }
a:focus-visible, button:focus-visible { outline: 2px solid #3cc8b0; outline-offset: 3px; border-radius: 6px; }
.project-card:focus-within .project-overlay { opacity: 1; }
section[id] { scroll-margin-top: 70px; }

/* Touch devices: no hover, so show links permanently and drop the cursor glow */
@media (hover: none) {
        .project-overlay { opacity: 1; background: linear-gradient(transparent 55%, rgba(0,0,0,0.8)); align-items: flex-end; padding-bottom: 14px; }
    .project-link { background: rgba(10,10,26,0.7); padding: 8px 20px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
    }

/* Avatar / profile photo */
.avatar { position: relative; display: flex; align-items: center; justify-content: center; width: 150px; height: 150px; margin: 0 auto 24px; border-radius: 28px; background: linear-gradient(135deg, #645aff 0%, #3cc8b0 100%); overflow: hidden; box-shadow: 0 8px 32px rgba(100, 90, 255, 0.3); }
.profile-initials { font-size: 38px; font-weight: 800; color: #fff; }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* About */
.about-section { padding: 100px 0; }
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.about-title { text-align: left; }
.about-title::after { margin-left: 0; }
.about-text { color: #c0c0c0; margin: 20px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip { padding: 6px 14px; border-radius: 999px; font-size: 13px; background: rgba(100,90,255,0.12); border: 1px solid rgba(100,90,255,0.25); color: #d6d3ff; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 28px 16px; text-align: center; }
.stat strong { display: block; font-size: 2.2rem; font-weight: 800; background: linear-gradient(135deg, #645aff, #3cc8b0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 0.85rem; color: #a0a0b0; }


/* Contact form */
.contact-form { max-width: 720px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #fff; font: inherit; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #8a8a9a; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #645aff; }
.contact-form .btn { align-self: flex-start; }
.form-note { min-height: 1.4em; color: #3cc8b0; font-size: 0.9rem; }

@media (max-width: 1024px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } .hero-buttons .btn { justify-content: center; } }

/* About stats: 3 cards now */
.stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }

/* Navbar scrolled state (class-based so themes can restyle it) */
.navbar.scrolled { background: rgba(10, 10, 26, 0.95); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* Theme toggle */
.theme-toggle { margin-left: auto; margin-right: 12px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: inherit; font-size: 18px; cursor: pointer; transition: background 0.3s; }
.theme-toggle:hover { background: rgba(255,255,255,0.08); }
@media (min-width: 769px) { .nav-menu { margin: 0 auto; } .theme-toggle { margin-left: 0; } }

/* Typing line */

/* Project filters */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -30px 0 56px; }
.filter-btn { padding: 8px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.filter-btn:hover { border-color: rgba(100,90,255,0.6); }
.filter-btn.is-active { background: linear-gradient(135deg, #645aff, #4a4ae0); border-color: transparent; color: #fff; }
.category-section[hidden] { display: none; }

/* Light theme */
:root[data-theme="light"] body { background: #f6f7fb; color: #1c1c30; }
:root[data-theme="light"] .navbar { background: rgba(246,247,251,0.85); border-bottom-color: rgba(0,0,0,0.08); }
:root[data-theme="light"] .navbar.scrolled { background: rgba(246,247,251,0.97); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
:root[data-theme="light"] .nav-logo, :root[data-theme="light"] .nav-toggle, :root[data-theme="light"] .nav-link:hover, :root[data-theme="light"] .nav-link.is-active { color: #1c1c30; }
:root[data-theme="light"] .nav-link, :root[data-theme="light"] .hero-subtitle, :root[data-theme="light"] .skill-description, :root[data-theme="light"] .project-description, :root[data-theme="light"] .section-subtitle, :root[data-theme="light"] .footer-text, :root[data-theme="light"] .contact-info h4, :root[data-theme="light"] .profile-title, :root[data-theme="light"] .stat span { color: #555a6e; }
:root[data-theme="light"] .hero-description, :root[data-theme="light"] .about-text { color: #3a3d52; }
:root[data-theme="light"] .btn-secondary, :root[data-theme="light"] .theme-toggle, :root[data-theme="light"] .filter-btn { color: #1c1c30; border-color: rgba(0,0,0,0.2); }
:root[data-theme="light"] .filter-btn.is-active { color: #fff; border-color: transparent; }
:root[data-theme="light"] .skill-card, :root[data-theme="light"] .project-card, :root[data-theme="light"] .profile-card, :root[data-theme="light"] .contact-item, :root[data-theme="light"] .stat { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 4px 14px rgba(20,20,60,0.05); }
:root[data-theme="light"] .skills-section, :root[data-theme="light"] .contact-section { background: rgba(0,0,0,0.03); }
:root[data-theme="light"] .contact-form input, :root[data-theme="light"] .contact-form textarea { background: #fff; color: #111; border-color: rgba(0,0,0,0.15); }
:root[data-theme="light"] .chip { color: #3b33c9; }
:root[data-theme="light"] .nav-menu.active, :root[data-theme="light"] .nav-menu { background-color: transparent; }
@media (max-width: 768px) { :root[data-theme="light"] .nav-menu { background: rgba(246,247,251,0.98); } }

/* Professional refresh */
:root { --accent: #2f6df6; --accent-text: #7aa7ff; }
body { background: #0b0f19; color: #e6e9ef; }
.navbar { background: rgba(11,15,25,0.92); backdrop-filter: none; }
.navbar.scrolled { background: rgba(11,15,25,0.98); box-shadow: none; border-bottom-color: #232b3b; }
.nav-logo { font-size: 18px; font-weight: 700; letter-spacing: 0; color: #fff; }
.nav-link { letter-spacing: 0; }
.hero::before { display: none; }
.hero-title { font-size: 3.25rem; font-weight: 700; letter-spacing: -0.02em; }
.hero-subtitle { color: var(--accent-text); font-size: 1.1rem; font-weight: 500; }
.hero-description { color: #aab3c5; }
.btn { border-radius: 8px; letter-spacing: 0; }
.btn-primary { background: var(--accent); border: 1px solid var(--accent); }
.btn-primary:hover { background: #2559d6; transform: none; box-shadow: none; }
.btn-secondary { border-color: #334057; }
.section-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; }
.section-title::after { display: none; }
.section-subtitle { max-width: 560px; margin-left: auto; margin-right: auto; }
.skill-card, .project-card, .profile-card, .contact-item, .stat { background: #121826; border: 1px solid #232b3b; border-radius: 10px; box-shadow: none; backdrop-filter: none; }
.skill-card:hover, .project-card:hover, .contact-item:hover { transform: none; border-color: #3a4660; box-shadow: none; }
.project-image { border-radius: 10px 10px 0 0; }
.skills-section, .contact-section { background: #0e1320; }
.avatar { background: #1a2233; border: 1px solid #232b3b; border-radius: 16px; box-shadow: none; }
.skill-icon { width: 52px; height: 52px; border-radius: 10px; font-size: 0; margin-bottom: 18px; background: rgba(47,109,246,0.12); color: var(--accent-text); }
.skill-icon svg, .contact-icon-email svg { width: 24px; height: 24px; }
.stat strong { background: none; -webkit-text-fill-color: currentColor; color: #fff; font-size: 2rem; }
.chip { background: #121826; border-color: #2a3446; color: #c3cbda; border-radius: 6px; }
.category-title { font-size: 1.4rem; }
.category-number { width: auto; height: auto; background: none; border-radius: 0; font-size: 1rem; font-weight: 600; color: var(--accent-text); }
.filter-btn { border-radius: 8px; border-color: #2a3446; }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); }
.contact-icon { background: rgba(47,109,246,0.12); border-radius: 10px; color: var(--accent-text); }
.contact-form input, .contact-form textarea { background: #121826; border-color: #2a3446; border-radius: 8px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.form-note { color: var(--accent-text); }

/* Light theme accents */
:root[data-theme="light"] .stat strong, :root[data-theme="light"] .profile-initials { color: #1c1c30; }
:root[data-theme="light"] .hero-subtitle, :root[data-theme="light"] .category-number, :root[data-theme="light"] .contact-icon, :root[data-theme="light"] .skill-icon, :root[data-theme="light"] .form-note { color: #1d4ed8; }
:root[data-theme="light"] .chip { background: #fff; border-color: rgba(0,0,0,0.12); color: #374056; }
:root[data-theme="light"] .avatar { background: #e8ecf5; border-color: #d5dbe8; }
:root[data-theme="light"] .navbar.scrolled { border-bottom-color: rgba(0,0,0,0.08); }
