
/* --- NAVEGACIÓN ESTILO CRISTAL CON BORDE ANIMADO - MOBILE FIRST --- */
header {
    /* Posición relativa para el borde animado */
    position: sticky;
    top: 10px;
    z-index: 100;

    /* Centrado y tamaño - MOBILE */
    width: calc(100% - 30px);
    max-width: 900px;
    margin: 10px auto;
    padding: 15px;
    box-sizing: border-box;

    /* REPLICANDO TU EFECTO ORIGINAL */
    border-radius: 12px;
    backdrop-filter: blur(8px);
    /* Un poco más de blur para legibilidad */
    -webkit-backdrop-filter: blur(8px);

    background-image: linear-gradient(180deg,
            rgba(10, 43, 18, 0.42) 0,
            rgba(12, 12, 12, 0.9) 100%
            /* Un poco más opaco para el menú */
        );

    box-shadow:
        0 -1px 0 0 rgba(82, 255, 125, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.12);

    /* Layout - MOBILE FIRST */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;

    /* Para el borde animado */
    position: relative;
    overflow: hidden;
}

/* Desktop: h1 y nav lado a lado */
@media (min-width: 780px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        
    }
}

/* Borde animado que gira */
header::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: conic-gradient(from var(--border-angle), #ff0055, #00f2fe, #ff0055);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 10;
    animation: spin 3s linear infinite;
    pointer-events: none;
}

header h1 {
    font-size: 1.1rem;
    margin: 0;
    color: #52ff7d;
    font-weight: 600;
    position: relative;
    z-index: 11;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 15px;
    position: relative;
    z-index: 11;
    align-items: center;
}

/* Desktop: nav en fila */
@media (min-width: 780px) {
    nav ul {
        flex-direction: row;
        gap: 25px;
        align-items: center;
    }
}

/* Los li siempre en fila */
nav li {
    display: inline-block;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Efecto al pasar el ratón por los enlaces */
nav a:hover {
    color: #52ff7d;
    text-shadow: 0 0 8px rgba(82, 255, 125, 0.6);
}

/* Variables para facilitar cambios de color */
:root {
    --bg-dark: #0c0c0c;
    --accent-green: #52ff7d;
    /* El verde de tu código original */
    --border-angle: 0deg;
}

@property --border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

body {
    background-color: #050505;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

hero {
    display: grid;
    grid-template-columns: 100%; /* Asegura que la columna no exceda el viewport */
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
}

.bottom__hero {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    align-items: center;
    box-sizing: border-box;
    padding: 20px;
}

#projects {
    font-size: 1.5rem;
    margin: 0;
    color: var(--accent-green);
    text-align: center;
    word-wrap: break-word;
    padding: 20px;
    margin-top: 20px;
}

.bottom__hero__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    padding: 20px 0;
}

.bottom__hero__list article h3 {
    margin: 10px 0;
    font-size: 1.2rem;
    text-align: center;
    color: var(--accent-green);
}

.bottom__hero__list article img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px -10px rgba(82, 255, 125, 0.3);
    transition: box-shadow 0.3s ease;
}

.bottom__hero__list article img:hover {
    /* Al pasar el mouse, el brillo aumenta */
    box-shadow: 0 20px 40px -15px rgba(82, 255, 125, 0.7);
}

/* Estado inicial de la imagen (oculta y pequeña) */
.bottom__hero__list article img {
    opacity: 0;
    transform: scale(0.5); /* Empieza al 50% de su tamaño */
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); /* Transición suave */
    will-change: transform, opacity; /* Optimización para la GPU */
}

/* Clase que añadiremos con JavaScript cuando sea visible */
.bottom__hero__list article img.is-visible {
    opacity: 1;
    transform: scale(1); /* Crece hasta rellenar su box */
}

.bottom__hero__list article p {
    margin: 20px 0;
    font-size: 0.9rem;
    text-align: center;
    color: #cccccc;
}

@keyframes spin {
    to {
        --border-angle: 360deg;
    }
}

.bottom__hero__list article a:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

footer {
    width: 900px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 30px;
    color: var(--accent-green);
    gap: 20px;
    margin-right: auto;
    margin-left: auto;

    @media (max-width: 1200px) {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        width: 100%;
        box-sizing: border-box;
    }
}

.footer-nav ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;

    @media (max-width: 780px) {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
}

.footer-info a {
    color: var(--accent-green);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-info a:hover {
    color: #52ff7d;
    text-shadow: 0 0 8px rgba(82, 255, 125, 0.6);
}

