/* Variables y estilos globales */
:root {
    --primary-color: #5D99C2;
    --secondary-color: #0a0b1d;
    --accent-color: #f5f5f5;
    --transition-speed: 0.3s;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inconsolata', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: #333;
    background-color: #fff;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navegación (Sidebar/Responsive) */
nav {
    height: 100vh;
    width: 250px;
    background-color: var(--secondary-color);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 120px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.nav-links {
    list-style: none;
    padding: 0;
    width: 100%;
}

.nav-links li {
    margin: 20px 0;
    text-align: center;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: color var(--transition-speed);
}

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

/* Botón hamburguesa (solo en móviles) */
.menu-toggle {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
}

/* Íconos sociales */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.social-icons a {
    position: relative;
    display: block;
    width: 55px;
    height: 55px;
}

.social-icons a .layer {
    width: 55px;
    height: 55px;
    transition: transform var(--transition-speed);
}

.social-icons a:hover .layer {
    transform: rotate(-35deg) skew(20deg);
}

.social-icons a .layer span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #fff;
    border-radius: 5px;
    transition: all var(--transition-speed);
}

.social-icons a .layer span.fab {
    font-size: 30px;
    line-height: 55px;
    text-align: center;
    color: #fff;
}

.social-icons a:hover .layer span:nth-child(1) {
    opacity: 0.2;
}

.social-icons a:hover .layer span:nth-child(2) {
    opacity: 0.4;
    transform: translate(5px, -5px);
}

.social-icons a:hover .layer span:nth-child(3) {
    opacity: 0.6;
    transform: translate(10px, -10px);
}

.social-icons a:hover .layer span:nth-child(4) {
    opacity: 0.8;
    transform: translate(15px, -15px);
}

/* Secciones principales */
section {
    margin-left: 270px; /* Espacio para el sidebar */
    padding: 60px 80px;
}

/* Sección Home (Hero) */
.section-home {
    position: relative;
    background: url('imagenes/fondohome2.jpg') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.section-home .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Overlay animado: sutil variación de opacidad/color */
    background: rgba(10, 11, 29, 0.6);
    animation: gradientAnimation 10s ease-in-out infinite;
    z-index: 1;
}

@keyframes gradientAnimation {
    0%   { background: rgba(10, 11, 29, 0.6); }
    50%  { background: rgba(10, 11, 29, 0.8); }
    100% { background: rgba(10, 11, 29, 0.6); }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding: 20px;
}

/* Sección con tu foto de perfil y datos personales */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-pic {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    margin-bottom: 20px;
}

.intro-text h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    margin: 10px 0;
    color: var(--accent-color);
}

.intro-text h2 {
    font-size: 24px;
    margin: 5px 0;
    color: var(--primary-color);
}

.university-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.uba-logo {
    width: 40px;
    height: auto;
}

.university-info p {
    font-size: 16px;
    color: var(--accent-color);
}

/* Columna de frases dinámicas */
.dynamic-phrase {
    max-width: 400px;
    font-size: 22px;
    color: var(--accent-color);
}

/* Indicador de Scroll Down */
.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    font-size: 24px;
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Secciones de contenido */
.section-content {
    padding: 60px 80px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.section-content h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.section-content p,
.section-content ul {
    font-size: 16px;
    line-height: 1.6;
}

.section-content ul {
    list-style: disc inside;
    padding-left: 20px;
}

/* Carrusel en la sección Knowledge */
.carousel-container {
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
}

.carousel {
    display: flex;
    align-items: center;
    animation: scroll 10s linear infinite;  /* Duración reducida para mayor velocidad */
}

.carousel img {
    width: 100px;
    height: auto;
    margin: 0 20px;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Tarjetas de proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: auto;
}

.project-card h3 {
    margin: 15px;
    font-family: var(--font-heading);
    color: var(--secondary-color);
}

.project-card p {
    margin: 0 15px 15px;
    font-size: 14px;
    color: #666;
}

.project-card .btn {
    display: block;
    margin: 0 15px 15px;
    padding: 10px;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background var(--transition-speed);
}

.project-card .btn:hover {
    background-color: #4a80b2;
}

/* Formulario de Contacto */
#contact form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
}

#contact label {
    font-weight: bold;
    margin-bottom: 5px;
}

#contact input,
#contact textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
}

#contact button {
    padding: 10px;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

#contact button:hover {
    background-color: #4a80b2;
}

/* Botón Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: background var(--transition-speed);
}

#backToTop:hover {
    background-color: #4a80b2;
}

/* Animación de fade-in para secciones */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos responsivos */
@media screen and (max-width: 768px) {
    nav {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--secondary-color);
    }

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

    .menu-toggle {
        display: block;
    }

    section {
        margin-left: 0;
        padding: 20px;
    }

    .section-home {
        padding: 40px;
    }

    .hero-content {
        flex-direction: column;
        gap: 40px;
    }
}

/* ----- Estilos para Profile Section Mejorada ----- */
.profile-card {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: auto;
}

.profile-details p {
    font-size: 16px;
    margin: 10px 0;
}

.language-proficiency {
    margin-top: 20px;
}

.language {
    margin-bottom: 15px;
}

.language p {
    margin: 0 0 5px;
    font-size: 14px;
}

.progress-bar {
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    height: 10px;
}

.progress {
    height: 10px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}
