/* --- GENERAL STYLES --- */
:root {
    --primary-color: #FF6F61; /* Un tono de naranja moderno */
    --text-color: #333;
    --background-color: #FFFFFF;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

main {
    padding-top: var(--header-height); /* Evita que el header tape el contenido */
}

.content-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    font-weight: bold;
    font-size: 2.5rem;
    margin-bottom: 40px;
/*    display: inline-block; */
    display: table; /* <-- CAMBIO: de inline-block a table */
    margin-left: auto; /* <-- AÑADIDO: para centrar */
    margin-right: auto; /* <-- AÑADIDO: para centrar */
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 5px; /* Simula una línea no del todo recta */
    transform: skewX(-15deg); /* Aporta el efecto no uniforme */
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--background-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    height: 50px;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 0.9rem;
    padding-bottom: 5px;
    transition: color 0.3s, border-bottom-color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* --- ROKO SECTION --- */
#roko p {
    margin-bottom: 1.5em;
    font-size: 1.1rem;
    max-width: 800px; /* Mejora la legibilidad */
}

/* --- STATS SECTION --- */
#stats ul {
    list-style: none;
    font-size: 1.2rem;
}

#stats li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

#stats li::before {
    content: attr(data-icon); /* Usa el emoji del data-attribute */
    font-size: 2rem;
    margin-right: 20px;
}


/* --- PROJECTS & KEY LEARNINGS SECTIONS --- */
.grid-container {
    display: grid;
    gap: 20px;
}

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

.grid-row-3 {
    grid-template-columns: repeat(3, 1fr);
    width: 74.5%; /* Ajuste para que 3 columnas ocupen espacio similar a 4*/
    margin: 0 auto; /* Centra la fila de 3 */
}

.grid-item a {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item a:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.grid-item img {
    width: 50%; /* <-- CAMBIO: Reducido de 100% a 50% */
    height: auto;
    aspect-ratio: 1 / 1; /* Mantiene la forma cuadrada */
    object-fit: cover; /* Evita deformación de la imagen */
    display: block;
    border: 1px solid #eee;
    margin: 0 auto; /* <-- AÑADIDO: Centra la imagen en su contenedor */
}

#key-learnings .grid-item img {
    border-radius: 50%; /* Imágenes redondas */
}

/* --- R4ND0M SECTION --- */
#random-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
}

.random-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.random-item span {
    font-size: 1.8rem;
    margin-right: 15px;
}

.random-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.random-item a:hover {
    color: var(--primary-color);
}

/* --- SOCIAL LINKS IN HEADER --- */
.social-links {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre los iconos */
}

.social-links a {
    display: inline-block;
    height: 30px; /* Altura del icono */
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1); /* Efecto sutil al pasar el ratón */
}

.social-links img {
    height: 100%;
    width: auto;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .header-container {
        justify-content: space-between;
    }

    .nav-menu {
        display: none; /* Simplificación para el ejemplo, se podría implementar un menú hamburguesa */
    }

    .grid-row-4, .grid-row-3 {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
    
    #random-grid {
        grid-template-columns: 1fr;
    }
}