/* =========================
   BASE
========================= */

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #1b2838, #0f141a);
    color: #c7d5e0;
    margin: 0;
    padding: 0;
}

/* =========================
   NEW: LAYOUT (COLUMNS)
========================= */

.layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    max-width: 1350px;
    margin: auto;
    padding: 20px;
}

/* Sidebar (header + about + skills live here) */
.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

/* Main content overrides old main behavior */
main {
    max-width: none;   /* override original */
    margin: 0;
    padding: 0;
}

/* =========================
   HEADER
========================= */

.header {
    background-color: #171a21;
    padding: 30px;
    text-align: left; /* better for sidebar */
    border-bottom: 2px solid #2a475e;
    border-radius: 8px;
}

.header h1 {
    margin: 0;
    color: #ffffff;
}

.header h2 {
    margin: 5px 0 15px;
    font-weight: normal;
    color: #66c0f4;
}

/* Links */
.links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #1b2838;
    color: #8f98a0;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    border: 1px solid #2a475e;
}

.links a:hover {
    color: #fff;
    border-color: #66c0f4;
    transform: translateY(-2px);
}

/* =========================
   SUB HEADLINE
========================= */

.sub-headline {
    margin-top: 10px;
    font-size: 14px;
    color: #8f98a0; /* gris suave (consistente con tu footer) */
    line-height: 1.5;
    letter-spacing: 0.3px;
}

/* Opcional: pequeño énfasis en hover (sutil) */
.sub-headline:hover {
    color: #c7d5e0;
    transition: color 0.2s ease;
}

/* =========================
   TYPOGRAPHY
========================= */

h2 {
    font-size: 22px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 18px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

p {
    line-height: 1.6;
}

/* =========================
   SUMMARY
========================= */

.summary {
    font-size: 15px;
    line-height: 1.6;
    margin-top: 15px;
}

/* =========================
   PROJECT CARDS
========================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project {
    background-color: #16202d;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #2a475e;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project:hover {
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(102, 192, 244, 0.3);
}

.project h2,
.project h3 {
    color: #ffffff;
}

.project ul {
    margin-top: 10px;
    padding-left: 18px;
}

.project li {
    margin-bottom: 6px;
    line-height: 1.4;
}

.project p {
    margin-bottom: 10px;
}

/* Featured */
.featured {
    border: 2px solid #66c0f4;
    background: linear-gradient(to right, #1b2838, #16202d);
}

.badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: bold;
}

.featured-badge {
    background-color: #66c0f4;
    color: #000;
}

/* =========================
   ABOUT SECTIONS
========================= */

.about {
    background-color: #16202d;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a475e;
    margin-top: 20px;
}

.about h2 {
    color: #ffffff;
}

.about h3 {
    color: #66c0f4;
    margin-top: 20px;
}

.about p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.about ul {
    padding-left: 20px;
}

.about li {
    margin-bottom: 5px;
}

.about::before {
    content: "";
    display: block;
    height: 1px;
    background: #2a475e;
    margin-bottom: 15px;
    opacity: 0.6;
}

/* =========================
   COURSES / CERTIFICATIONS
========================= */

.section-highlight {
    background-color: #1a2433;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a475e;
    margin-top: 25px;
}

.section-highlight h2 {
    color: #66c0f4;
}

.section-highlight ul {
    padding-left: 20px;
}

.section-highlight li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-block;
    margin-top: 10px;
    margin-right: 10px;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background-color: #66c0f4;
    color: #000;
}

.btn.primary:hover {
    background-color: #417a9b;
    color: #fff;
}

.btn.secondary {
    background-color: #5c7e10;
    color: #fff;
}

.btn.secondary:hover {
    background-color: #6fa720;
}

/* =========================
   FOOTER
========================= */

footer {
    text-align: center;
    padding: 20px;
    color: #8f98a0;
}

/* =========================
   MOBILE RESPONSIVE
========================= */

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
    }
}

/* =========================
   TECH BADGES
========================= */

.tech-badges {
    margin-top: 10px;
}

.badge.tech {
    display: inline-block;
    background-color: #2a475e;
    color: #c7d5e0;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin: 3px 4px 0 0;
    border: 1px solid #66c0f4;
    transition: all 0.2s ease;
}

.badge.lang { border-color: #4caf50; }       /* verde - programming languages */
.badge.web { border-color: #2196f3; }        /* azul - web / frontend */
.badge.data { border-color: #ff9800; }       /* naranja - data / analytics / BI */
.badge.interactive { border-color: #9c27b0; }/* morado - interactive systems / Unity / XR */

.badge.backend { border-color: #00bcd4; }    /* cyan - backend / APIs */
.badge.qa { border-color: #e91e63; }         /* rosa - QA / testing */
.badge.tools { border-color: #ffc107; }      /* amarillo - tools / devops */
.badge.db { border-color: #8bc34a; }         /* verde claro - databases */
.badge.systems { border-color: #607d8b; }    /* gris azulado - systems / architecture */
.badge.bi { border-color: #ff6f00; }         /* naranja fuerte - business intelligence / Power BI */


/* Hover effect (muy importante visualmente) */
.badge.tech:hover {
    background-color: #66c0f4;
    color: #000;
    transform: translateY(-1px);
}

/* =========================
   PROJECT MEDIA
========================= */

.project-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2a475e;
    background: #000; /* 🔥 clave */
}

.project-media iframe,
.project-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-media iframe {
    border: none;
    display: block;
}

.project-media img {
    object-fit: contain;
}

.project-media.vertical {
    padding-top: 80%; /* más alto que 16:9 */
}

.project-media.vertical img {
    object-fit: contain;
}

/* Hover sutil */
.project-media:hover {
    box-shadow: 0 0 10px rgba(102, 192, 244, 0.2);
}

/* =========================
   HERO LAYOUT (IMAGE + TEXT)
========================= */

.hero {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Avatar placeholder */
.avatar img {
    width: 250px;
    height: 250px;
    border-radius: 12px; /* estilo GitHub moderno */
    object-fit: cover;
    border: 2px solid #2a475e;
    background: #1b2838;
}

/* Text container */
.hero-text {
    flex: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .avatar img {
        width: 100px;
        height: 100px;
    }
}

/*Carrousel elements*/

.carousel {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 👈 igual que project-media */
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #2a475e;
    margin-top: 15px;
    background: #0f141a;
}

.carousel-track {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #16202d;
    color: #66c0f4;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 6px;
    z-index: 10;
    opacity: 0.8;
}

.carousel-btn:hover {
    opacity: 1;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}