* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

:root {
    --accent: #007acc; /* VS Code blue */
    --accent-2: #1e40af; /* darker blue */
    --avatar-large-size: 320px; /* ajustar para cambiar tamaño del avatar en modal */
    --nav-bg: rgba(4, 30, 66, 0.9);
    --panel-bg: rgba(6, 25, 48, 0.55);
    --panel-border: rgba(255,255,255,0.08);
    --text-primary: #e6eef8;
    --text-dark: #cfe7ff;
    --footer-bg: #031226;
}

body {
    background: linear-gradient(rgba(4,30,66,0.55), rgba(0,122,204,0.45)), url('../images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
}

/* CONTENEDOR */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* NAVBAR */
.navbar {
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

.nav-logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.logo-img:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
    text-align: left;
}

.nav-user-name {
    color: white;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}

.nav-user-email {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    opacity: 0.95;
    line-height: 1;
}

/* Ocultar nombre/email en pantallas pequeñas */
@media (max-width: 768px) {
    .nav-user-info {
        display: none;
    }
}

/* AVATAR MODAL */
.avatar-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn 0.2s ease;
}

.avatar-content {
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 280px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.12);
}

.avatar-img-large {
    width: var(--avatar-large-size);
    height: var(--avatar-large-size);
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.25);
    margin-bottom: 12px;
}

.avatar-name {
    color: white;
    font-weight: 800;
    margin-bottom: 4px;
}

.avatar-email {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-bottom: 12px;
}

.avatar-close {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    cursor: pointer;
}

@media (max-width: 420px) {
    .avatar-img-large { width: 120px; height: 120px; }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-btn {
    background: white;
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* RESPONSIVE NAVBAR */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

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

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

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

    .nav-link {
        display: block;
        padding: 10px 0;
    }
}

/* HERO */
.hero {
    background: linear-gradient(120deg, rgba(2,24,54,0.7), rgba(0,122,204,0.45)), url('../images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    padding: 120px 20px;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Stardust overlay (animated SVG) */
.stardust-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0; /* behind the .container (which has z-index:1) */
    opacity: 0.9;
    mix-blend-mode: screen;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: slideDown 0.8s ease;
}

.hero-title {
    font-size: 56px;
    margin: 20px 0;
    font-weight: 900;
    line-height: 1.2;
    animation: fadeInUp 1s ease 0.2s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 24px;
    margin: 15px 0;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.4s both;
    opacity: 0.95;
}

.hero-description {
    font-size: 16px;
    margin: 10px 0 30px 0;
    animation: fadeInUp 1s ease 0.6s both;
    opacity: 0.85;
}

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

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

.hero-btn {
    margin-top: 30px;
    padding: 15px 40px;
    border: none;
    background: white;
    color: var(--accent);
    font-size: 17px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease 0.8s both;
    position: relative;
    overflow: hidden;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0,122,204,0.12);
    transition: left 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.hero-btn:hover::before {
    left: 100%;
}

/* SERVICIOS */
.services {
    display: flex;
    gap: 20px;
    margin: 60px auto;
    flex-wrap: wrap;
}

.card {
    background: var(--panel-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    flex: 1;
    transition: transform 0.3s;
    border: 1px solid var(--panel-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 80px;
    margin-bottom: 15px;
}

.card h3 {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

.card p {
    color: white;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* SECCIÓN SOBRE MÍ */
.about {
    background: var(--panel-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 60px 20px;
    text-align: center;
    border-radius: 10px;
    margin: 60px auto;
    border: 1px solid var(--panel-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.about h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.about p {
    font-size: 16px;
    color: white;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    line-height: 1.6;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.feature {
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
}

/* CTA */
.cta {
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.cta h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.cta p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.95;
}

.cta button {
    margin-top: 15px;
    padding: 12px 30px;
    background: white;
    color: var(--accent);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cta button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: var(--footer-bg);
    color: var(--text-primary);
}

/* CONTACT MODAL */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    min-width: 300px;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.modal-content h3 {
    margin-bottom: 25px;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.gmail-btn {
    background: #EA4335;
    color: white;
}

.gmail-btn:hover {
    background: #d33d2b;
    transform: translateX(5px);
}

.outlook-btn {
    background: #0078D4;
    color: white;
}

.outlook-btn:hover {
    background: #005a9e;
    transform: translateX(5px);
}

.mailto-btn {
    background: var(--accent);
    color: white;
}

.mailto-btn:hover {
    background: var(--accent-2);
    transform: translateX(5px);
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* PORTAFOLIO */
.portfolio {
    padding: 80px 20px;
    text-align: center;
}

.portfolio h2 {
    font-size: 36px;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.portfolio > p {
    font-size: 16px;
    color: white;
    margin-bottom: 50px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    font-size: 60px;
    margin-bottom: 20px;
}

.portfolio-item h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.portfolio-item p {
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
}

