:root {
    --color-bg-light: #f0f4f8;
    --color-bg-sky: #e3f2fd;
    --color-card: #ffffff;
    --color-text-dark: #263238;
    --color-text-light: #546e7a;
    --color-primary: #1976d2;
    --color-shadow: rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
}

/* --- Contenedor --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--color-shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-sky) 0%, var(--color-bg-light) 100%);
    overflow: hidden;
}

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

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Nubes --- */
.cloud {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(2px);
    z-index: 1;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud.c1 {
    width: 100px;
    height: 100px;
    top: 10%;
}

.cloud.c1::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 20px;
}

.cloud.c1::after {
    width: 80px;
    height: 80px;
    top: -10px;
    right: -20px;
}

/* (Omití las otras nubes por brevedad, funcionan igual que en tu código original) */

/* --- Secciones --- */
section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Botón Gemini --- */
.gemini-btn {
    background: linear-gradient(45deg, #4285f4, #9b59b6);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: "Inter", sans-serif;
}

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

/* --- Cards & Grid --- */
.card {
    background-color: var(--color-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--color-shadow);
    margin-bottom: 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

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

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

/* --- About Placeholder --- */
.placeholder-image-box {
    background-color: #e0e0e0;
    min-height: 300px;
    /* Altura mínima para que no desaparezca */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Habilidades (AQUÍ ESTÁ EL ARREGLO DE LOS LOGOS) --- */
.skill-box {
    background-color: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px var(--color-shadow);
}

/* ESTA CLASE FALTABA */
.skill-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
}

/* --- Certificaciones --- */
.cert-item.card {
    text-align: center;
    padding: 20px;
}

.cert-img {
    width: 100%;
    height: auto;
    max-height: 120px;
    /* Reducido un poco para que no se vean gigantes */
    object-fit: contain;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.title-link:hover {
    color: var(--color-primary);
}

/* --- Modal & Footer --- */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    background-color: var(--color-card);
    border-top: 1px solid var(--color-bg-light);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--color-card);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

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

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.modal-content textarea {
    width: 100%;
    height: 100px;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #cfd8dc;
    margin-bottom: 1rem;
    resize: vertical;
}

.loader {
    border: 4px solid var(--color-bg-light);
    border-radius: 50%;
    border-top: 4px solid var(--color-primary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1rem auto 0;
}

.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsividad */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.me-img {
    width: 100%;
    height: auto;
    max-height: 620px;
    /* Reducido un poco para que no se vean gigantes */
    object-fit: contain;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}