﻿/* =========================
   BASE STYLES
========================= */

/* Compensar altura del navbar fijo */
:target {
    scroll-margin-top: 90px; /* ajustá según alto real de la barra */
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s ease, transform .8s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* =========================
   NAVBAR
========================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1c2530;
    padding: 15px 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #37404a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.contact-title {
    font-size: 1.6rem;
}

.logo a {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.accent {
    color: #cfe8ff !important;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

    .nav-links li a {
        color: #f5f5f5;
        text-decoration: none;
        font-size: 1rem;
        position: relative;
        transition: color 0.3s ease, text-shadow 0.3s ease;
    }

        .nav-links li a::after {
            content: "";
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background-color: #cfe8ff;
            transition: width 0.3s ease;
        }

        .nav-links li a:hover {
            color: #cfe8ff;
            text-shadow: 0 0 8px rgba(207, 232, 255, 0.6);
        }

            .nav-links li a:hover::after {
                width: 100%;
            }

/* Responsive navbar */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        background: #1f2a35;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        display: none;
        border-left: 2px solid #cfe8ff;
    }

        .nav-links.active {
            display: flex;
        }

    .menu-toggle {
        display: block;
        cursor: pointer;
        color: white;
        font-size: 1.5rem;
    }
}

/* =========================
   HERO SECTION
========================= */
.hero {
    margin: 0;
    padding: 110px 0 80px;
    width: 100vw;
    background: linear-gradient(180deg, #25313f 0%, #1c2530 100%) !important;
    overflow-x: hidden;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-flex {
    display: flex;
    align-items: flex-start; /* ahora se alinea arriba */
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    max-width: 600px;
    flex: 1;
}

.hero .eyebrow {
    color: #c9c9c9;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 0.9rem; /* más chico */
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 8px;
}

.hero h1 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero .sub {
    color: #d2d2d2;
    max-width: 700px;
    margin: 8px 0 22px;
    font-size: 0.95rem;
}

.hero .cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   HERO IMAGE + SOCIALS
========================= */
.hero-photo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.home-photo {
    width: 200px;
    height: 200px;
    border-radius: 0 !important;
    object-fit: cover;
    border: 3px solid #cfe8ff;
    box-shadow: 0 0 15px rgba(207,232,255,0.4);
    transition: transform 0.3s ease;
}

    .home-photo:hover {
        transform: scale(1.03);
    }

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 10px;
}

    .social-links a {
        font-size: 1.6rem;
        color: #cfe8ff;
        transition: color 0.2s, transform 0.2s;
    }

        .social-links a:hover {
            color: #b2dbff;
            transform: scale(1.1);
        }

/* HERO responsive */
@media (max-width: 768px) {
    .hero-flex {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-photo-block {
        order: -1;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .eyebrow {
        font-size: 0.7rem;
    }

    .hero .sub {
        font-size: 0.9rem;
    }
}

/* =========================
   BUTTONS
========================= */
.btn-alt {
    background: transparent;
    border: 2px solid #cfe8ff;
    color: #cfe8ff;
}

    .btn-alt:hover {
        background: #cfe8ff;
        color: #1a1a1a;
    }

/* =========================
   SECTIONS GENERALES
========================= */
.section {
    padding: 70px 0;
    background: #2a3440;
    border-top: 1px solid #37404a;
}

    .section:nth-of-type(even) {
        background: #1c2530;
    }

/* =========================
   PROJECTS
========================= */
.projects .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.card-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.card h3 {
    font-size: 1.2rem;
}

.stack {
    color: #bbb;
    font-size: .9rem;
}

.card-text {
    color: #ddd;
    margin: 8px 0 14px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

/* Botón de cierre */
.btn-close {
    filter: brightness(0) saturate(100%) invert(160%) sepia(10%) saturate(800%) hue-rotate(200deg) brightness(140%) contrast(100%);
}

/* =========================
   CONTACTO
========================= */
.contact-section {
    padding: 80px 20px;
    padding-top: 20px;
    background: #1c2530;
    text-align: center;
    color: #fff;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #2a3440;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

    .contact-form .form-group {
        margin-bottom: 20px;
        text-align: left;
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        padding: 10px;
        border: none;
        border-radius: 5px;
        background: #262626;
        color: #fff;
        font-size: 1rem;
    }

    .contact-form button {
        background: #cfe8ff;
        color: #1a1a1a;
        border: none;
        padding: 10px 20px;
        border-radius: 5px;
        cursor: pointer;
        font-weight: bold;
        transition: 0.2s;
    }

        .contact-form button:hover {
            background: #b2dbff;
        }

.feedback {
    margin-top: 15px;
    color: #80ff80;
    font-weight: bold;
}

/* =========================
   CV DOWNLOAD
========================= */
.cv-download {
    margin-top: 15px;
    text-align: center;
    color: #ccc;
    font-size: 0.95rem;
}

    .cv-download span {
        display: block;
        margin-bottom: 8px;
        color: #bfc8d4;
        font-size: 0.9rem;
    }

    .cv-download .btn.small {
        padding: 8px 14px;
        font-size: 0.9rem;
        border-radius: 6px;
        background: #cfe8ff;
        color: #1a1a1a;
        transition: background 0.2s, transform 0.1s;
    }

        .cv-download .btn.small:hover {
            background: #b2dbff;
            transform: translateY(-1px);
        }

/* =========================
   WRITING SECTION
========================= */
.writing {
    background: #2a3440;
    border-top: 1px solid #37404a;
}

    .writing h2 {
        color: #cfe8ff;
        margin-bottom: 25px;
    }

.posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .posts li {
        margin: 15px 0;
    }

    .posts a {
        color: #cfe8ff;
        text-decoration: underline;
        font-weight: 600;
        transition: color 0.25s ease, text-shadow 0.25s ease;
    }

        .posts a:hover {
            color: #ffffff;
            text-shadow: 0 0 8px rgba(207,232,255,0.6);
            text-decoration: none;
        }

.meta {
    display: inline-block;
    margin-left: 10px;
    color: #9c9c9c;
    font-size: 0.9rem;
}

/* =========================
   SITE LOGO
========================= */
.site-logo {
    height: 50px;
    width: auto;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

    .site-logo:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }

/* =========================
   ALERTS
========================= */
.alert {
    background-color: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    color: #f5f5f5 !important;
    margin-top: 20px !important;
    padding: 15px 20px !important;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   FOOTER FIJO AL FINAL DE LA PÁGINA
========================================= */
main {
    flex-grow: 1; /* ocupa el espacio entre header y footer */
    padding-top: 100px; /* deja espacio por la navbar fija */
    padding-bottom: 60px; /* deja aire antes del footer */
    box-sizing: border-box;
}

footer {
    margin-top: auto;
    background-color: #0a0a0a;
    color: #ccc;
    text-align: center;
    padding: 20px 10px;
    border-top: 1px solid #222;
    font-size: 0.9rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Evita que el footer se superponga al contenido en pantallas pequeñas */
@media (max-height: 600px) {
    main {
        padding-bottom: 100px; /* más margen si la pantalla es baja */
    }
}

/* Para evitar saltos cuando hay poco contenido */
.container-fluid {
    flex-grow: 1;
    padding: 0;
}

.alert-success {
    background-color: #cfe8ff1a !important;
    border: 1px solid #b2dbff !important;
    color: #cfe8ff !important;
}

.alert-danger {
    background-color: #a10f2b33 !important;
    border: 1px solid #a10f2b !important;
    color: #ffb3b3 !important;
}

/* ===== 1. Variables de tema + escala tipográfica fluida ===== */
:root {
    --bg: #1c2530;
    --bg-soft: #2a3440;
    --txt: #f5f5f5;
    --muted: #bfc8d4;
    --brand: #cfe8ff;
    --brand-strong: #b2dbff;
    --border: #37404a;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0,0,0,.25);
    --font-base: clamp(15px, 1rem + 0.2vw, 18px);
    --h1: clamp(2rem, 1.6rem + 2vw, 3rem);
    --h2: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
    --h3: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
    --space-1: .5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
}

html {
    font-size: var(--font-base);
}

h1 {
    font-size: var(--h1);
}

h2 {
    font-size: var(--h2);
}

h3 {
    font-size: var(--h3);
}

/* Aplicar tema a piezas comunes */
body {
    background: var(--bg);
    color: var(--txt);
}

.card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .3s ease, box-shadow .3s ease;
}

    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 25px rgba(0,0,0,.12);
    }

.btn {
    background: var(--brand);
    color: #111;
}

    .btn:hover {
        background: var(--brand-strong);
    }

/* ===== 2. Contenedor elástico + espaciado escalable ===== */
.container {
    width: min(1100px, 92vw);
    margin-inline: auto;
    padding-inline: clamp(12px, 2vw, 24px);
}

.section {
    padding-block: clamp(32px, 5vw, 72px);
}

/* ===== 3. Grid fluida sin media queries ===== */
.grid {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ===== 4. Accesibilidad: foco visible ===== */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ===== 5. Overlay para menú móvil ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: none;
    z-index: 900; /* debajo de la navbar si tiene z-index alto */
}

    .nav-overlay.show {
        display: block;
    }

/* ===== 7. Imágenes: ajustes por defecto seguros ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== 8. Footer pro en columnas (opcional) ===== */
.footer-grid {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
}

    .footer-grid h4 {
        font-size: var(--h3);
        margin: 0; /* corregido */
    }

/* =====================================================
   EFECTOS MODERNOS Y DISCRETOS 
===================================================== */

/* Fondo dinámico sutil */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, #263240, #1c2530 70%);
    background-size: 200% 200%;
    animation: bgSoftMove 15s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes bgSoftMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* Botones: modernos, con borde sutil animado */
.btn {
    position: relative;
    overflow: hidden;
    border: 2px solid #cfe8ff;
    background: transparent;
    color: #cfe8ff;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
}

    .btn:hover {
        background: #cfe8ff;
        color: #1c2530;
    }

    .btn::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent, rgba(207,232,255,0.3), transparent);
        transform: translateX(-100%);
        transition: transform .6s ease;
    }

    .btn:hover::before {
        transform: translateX(100%);
    }

    /* --- VARIANTE SMALL PARA DOWNLOAD CV --- */
    .btn.small {
        padding: 8px 16px;
        font-size: 0.8rem;
        border-width: 2px;
    }

/* TAMAÑOS ABOUT */
#about p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

#about li {
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Título de la sección About */
#about h2 {
    font-size: 1.7rem !important; /* si querés más chico, bajá este valor */
    margin-bottom: 16px;
}

/* TAMAÑOS FINALES PROJECTS */
#projects h2 {
    font-size: 1.6rem;
}

#projects .card h3 {
    font-size: 1.1rem !important; /* título de cada proyecto */
    margin-bottom: 4px;
}

#projects .card .stack {
    font-size: 0.8rem !important; /* línea de tecnologías */
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
}

#projects .card-text {
    font-size: 0.80rem !important; /* descripción corta dentro de la card */
    line-height: 1.5;
}

/* TAMAÑOS DE TEXTO DENTRO DE LOS MODALS (PROJECTS + WRITING) */
.modal .modal-body {
    font-size: 0.8rem !important;
    line-height: 1.6;
}

/* Título del modal */
.modal .modal-title {
    font-size: 1.2rem !important;
}

/* My Books: tamaño de tapa */
.books .book-cover {
    display: block;
    margin: 0.25rem auto 0;
    width: 160px; /* mismo ancho para las tres */
    height: 270px; /* ajustá si querés más alto/bajo */
    border-radius: 0.3rem;
    object-fit: cover;
}

/* My Books: centrar botón */
.books .card-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* Centrar títulos de la sección My Books */
.books .card-head {
    text-align: center;
    margin-bottom: 0.25rem;
}

    /* Línea "stack" debajo del título en My Books */
    .books .card-head .stack {
        display: block;
        font-size: 0.85rem;
        margin-top: 0.1rem;
    }

/* Writing section ajustes tipográficos */
.writing h2 {
    color: #cfe8ff;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.writing .posts li {
    font-size: 0.95rem;
    line-height: 1.5;
}
.hero .eyebrow {
    color: #c9c9c9;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 1.0rem;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 6px;
}

/* NUEVO: tagline debajo del H1 */
.hero .hero-tagline {
    color: #bfc8d4;
    font-size: 0.9rem;
    margin: 4px 0 27px;
}
.download-msg {
    margin-left: 8px;
    font-size: 0.85rem;
    color: #bfc8d4;
}

@media (max-width: 768px) {
    .download-msg {
        display: block; /* en mobile que quede debajo */
        margin-top: 6px;
        margin-left: 0;
        text-align: center;
    }
}
/* BLOQUE FOTO + ICONOS + BOTÓN */
.hero-photo-block {
    display: flex;
    flex-direction: column;
    align-items: center; /* centra horizontalmente a todos los hijos */
    justify-content: center;
    text-align: center;
}

    /* Asegura que los hijos no tengan corrimientos laterales raros */
    .hero-photo-block > * {
        margin-left: 0;
        margin-right: 0;
    }

/* Iconos sociales centrados */
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 10px;
}

/* Texto y botón de descarga centrados */
.cv-download {
    text-align: center;
    margin-top: 15px;
}

/* Por si en mobile algo se desalineaba */
@media (max-width: 768px) {
    .hero-photo-block {
        align-items: center;
        text-align: center;
        margin-inline: auto; /* fuerza centrado dentro del contenedor */
    }
}
.analytics-consent {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    max-width: 720px;
    margin: 0 auto;
    padding: 18px;
    background: #2a3440;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}

    .analytics-consent p {
        margin-bottom: 12px;
    }

    .analytics-consent a {
        color: inherit;
        text-decoration: underline;
    }

    .analytics-consent .btn {
        margin-right: 8px;
    }
/* Page breadcrumbs */
.page-breadcrumb {
    padding-top: 24px;
    padding-bottom: 0;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

    .page-breadcrumb a {
        color: inherit;
        text-decoration: none;
    }

        .page-breadcrumb a:hover {
            text-decoration: underline;
        }

    .page-breadcrumb span[aria-current="page"] {
        opacity: 0.75;
    }
.related-content {
    margin-top: 8px;
    margin-bottom: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

    .related-content h2 {
        font-size: 1.35rem;
        margin-bottom: 14px;
    }

    .related-content ul {
        margin-bottom: 0;
    }
/* =====================================================
   FINAL CONTENT + ANALYTICS SIZE OVERRIDES
===================================================== */

/* Páginas de artículos y proyectos */
main > article.container.section {
    font-size: 0.92rem;
    line-height: 1.55;
    padding-top: 42px;
    padding-bottom: 42px;
}

    main > article.container.section h1 {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    main > article.container.section h2 {
        font-size: 1.3rem !important;
        line-height: 1.25;
        margin-top: 28px;
        margin-bottom: 12px;
    }

    main > article.container.section h3 {
        font-size: 1.1rem !important;
    }

    main > article.container.section p,
    main > article.container.section li {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    main > article.container.section pre {
        max-width: 100%;
        overflow-x: auto;
        padding: 12px;
        font-size: 0.80rem;
        line-height: 1.45;
    }


/* Breadcrumb */
.page-breadcrumb {
    font-size: 0.80rem !important;
    padding-top: 14px !important;
}


/* Contenido relacionado */
.related-content {
    font-size: 0.88rem;
}

    .related-content h2 {
        font-size: 1.15rem !important;
    }


/* Banner Analytics */
.analytics-consent {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    max-width: 480px !important;
    padding: 10px 12px !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    border: 1px solid #475462;
    border-radius: 6px !important;
}

    .analytics-consent p {
        margin: 0 0 8px !important;
        font-size: 0.78rem !important;
    }

    .analytics-consent .btn {
        padding: 5px 10px !important;
        margin-right: 5px !important;
        font-size: 0.74rem !important;
        border-width: 1px !important;
        border-radius: 5px !important;
    }


/* Ajuste adicional móvil */
@media (max-width: 768px) {

    main > article.container.section {
        font-size: 0.86rem;
        padding-top: 28px;
        padding-bottom: 32px;
    }

        main > article.container.section h1 {
            font-size: 1.5rem !important;
        }

        main > article.container.section h2 {
            font-size: 1.15rem !important;
        }

        main > article.container.section p,
        main > article.container.section li {
            font-size: 0.86rem;
        }

        main > article.container.section pre {
            font-size: 0.72rem;
        }

    .analytics-consent {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        max-width: none !important;
        padding: 9px 10px !important;
    }

        .analytics-consent p {
            font-size: 0.72rem !important;
        }

        .analytics-consent .btn {
            padding: 5px 8px !important;
            font-size: 0.70rem !important;
        }
}
/* =====================================================
   FINAL MOBILE MENU + COMPACT ACTION BUTTONS
===================================================== */

/* Menú móvil más cerrado visualmente */
@media (max-width: 768px) {

    .nav-links {
        top: 60px;
        right: 12px;
        width: 230px;
        padding: 10px 0 22px;
        border: 1px solid #51606f;
        border-radius: 8px;
        background: #1f2a35;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
        overflow: hidden;
    }

        .nav-links li {
            width: 100%;
        }

            .nav-links li a {
                display: block;
                width: 100%;
                padding: 12px 20px;
                font-size: 0.95rem;
            }

            /* Más espacio debajo de Contact */
            .nav-links li:last-child a {
                padding-bottom: 18px;
            }
}


/* Botones View Project */
#projects .card-actions .btn {
    padding: 6px 13px;
    font-size: 0.78rem;
    border-width: 1px;
    border-radius: 6px;
}


/* Botones View details de Books */
.books .card-actions .btn {
    padding: 6px 13px;
    font-size: 0.78rem;
    border-width: 1px;
    border-radius: 6px;
}
/* Botones principales del Home */
.hero .cta .btn {
    padding: 7px 14px;
    font-size: 0.82rem;
    border-width: 1px;
    border-radius: 6px;
}
/* Botón Download Resume */
.cv-download .btn.small {
    padding: 6px 12px;
    font-size: 0.76rem;
    border-width: 1px;
    border-radius: 6px;
}
/* Título My Books */
.books h2 {
    font-size: 1.5rem !important;
}