/* Estilos globales */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body{
    overflow-x: hidden;
}

ul, ol {
    padding-left: 2em; 
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    padding: 20px;
    padding-bottom: 40px;
    display: flex;
    justify-content: center;
}
.topics-buttons{
    display: flex;
}
.header-info{
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.profile-container{
    display: flex;
    margin-bottom: 50px;
}

.profile .img-profile{
    width: 200px;
    height: fit-content;
    border-radius: 45px;
    margin-right: 20px;
    box-shadow: 0 0 24px 8px rgba(0,0,0,.25);
}

.name{
    font-size: 2.5rem;
}
.profile-info{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-links{
    display: flex;
    flex-wrap: wrap; 
    gap: 6px;
}

.open-to-work{
    width: fit-content;
    border: 1.5px solid currentColor;
    padding: 3px 14px;
    border-radius: 500px;
    font-weight: 500;
    transition: all .3s ease;
}

.front-end-technologies-container{
    display: flex;
}
.tool-icon-container{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 15px;
    border-radius: 500px;
    background-color: currentColor;
    color: currentColor;
    font-weight: 500;
    font-size: 1em;
    margin-right: 5px;
    margin-top: 4px;
    vertical-align: bottom;
    box-shadow: 0 1px 4px 0 rgba(0,0,0,0.15);
    transition: background 0.3s, color 0.3s;
}
.no-margin-right{
    margin-right: 0 !important;
}
i{
    font-size: 1.5rem;
}
.tool-icon-container.in-project{
    padding: 2px 10px;
    font-size: .8rem;
}
.tool-icon-container.in-project i{
    font-size: .8rem;
}
.tool-icon-container.in-project img{
    width: .8rem;
}


.project-container {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap; 
    justify-content: center; 
}
.project-description {
    flex: 1 1 60%;
    min-width: 60%;
    max-width: 100%;
}

.projects-img-container {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0px;
    padding: 10px;
    border-radius: 25px;
    scroll-behavior: smooth;
    max-width: 320px;
    transition: all .3s ease;
}

.projects-img-container img {
    width: 300px;
    max-width: 90vw;
    height: auto;
    border-radius: 15px;
    transition: all .3s ease;
}
.project-images-extra {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s, margin-top 0.3s;
    will-change: max-height, opacity, margin-top;
}

.project-images-extra.show {
    margin-top: 5px;
    max-height: 1000px;
    opacity: 1;
}

/* Selector de lenguaje */
.language-tabs, .theme-selector {
    display: inline-flex;
    overflow: hidden;
    margin-left: 10px;
    gap: 0;
}

.tab-left {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
.tab-mid {
    border-radius: 0;
}
.tab-right {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.tab {
    padding: 5px 16px;
    background-color: #f0f0f0;
    border: none;
    outline: none;
    transition: background-color 0.3s, color 0.2s;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.tab.active {
    background-color: #1976d2;
    color: #fff;
}
.tab.active:hover {
    background-color: #63a4ff;
    color: #fff;
}

body{
    display: grid;
    /* Mantenemos el header en la parte superior y el footer en la parte inferior */
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f0f0f0;
    transition: all .3s ease;
}

main {
    padding: 15px;
    padding-top: 0;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    transition: width 0.3s;
}

.location{
    width: fit-content;
    display: flex;
    font-weight: 700;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    border-radius: 500px;
    transition: all .3s ease;
}

img.icon{
    width: 24px;
    cursor: pointer;
}
img.no-pointer{
    cursor: default;
}
.no-padding{
    padding: 0 !important;
}

.img-text{
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    border-radius: 500px;
    transition: all .3s ease;
    position: relative;
}

.img-text .icon {
    border-radius: 16px;
    border: 1px solid currentColor;
    background: transparent;
    padding: 4px;
    width: 40px;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain; 
    transition: border-color 0.3s, background 0.3s;
}

.img-text .hint {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 5px;
    background: #222;
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: .7em;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: opacity 0.2s;
    max-width: min(90vw, 320px);
    overflow-wrap: break-word;
}

.img-text:hover .hint {
    opacity: 0.95;
    pointer-events: auto;
}

.cv-buttons-container{
    display: flex;
}
.CV_link .cv-left {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 1px solid currentColor;
}

.CV_link .cv-right {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

button {
    margin: 10px;
    padding: 8px 16px;
    border-radius: 500px;
    cursor: pointer;
    transition: all .3s ease;
    border: 0;
}
button:active{
    scale: .98;
}

.education > article{
    display: flex;
    flex-direction: column;
}
.school-info{
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}
.school-logo{
    width: 5rem;
    height: fit-content;
}
.school-title-row {
    display: flex;
    align-items: center;
    column-gap: 16px;
    row-gap: 2px;  
    flex-wrap: wrap; 
}
.period-label{
    width: fit-content;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 500px;
    font-weight: 500;
    font-size: .9em;
    transition: background 0.3s, color 0.3s;
}

.icon-see{
    cursor: pointer;
    font-size: .8rem ;
}

.course-actions {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    gap: 6px;
}
.course-actions a {
    text-decoration: none !important;
}

footer{
    margin-top: 75px;
    background-color: gray;
    color: white;
    padding: 15px;
    padding-bottom: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    gap: 6px;
}

hr {
    border: none;
    height: 2px;
    width: 95%;
    margin: 32px auto;
    background: linear-gradient(
        to right,
        var(--hr-gradient-fade, rgba(0,0,0,0)) 0%,
        var(--hr-gradient-start, #bbb) 8%,
        var(--hr-gradient-main, #888) 20%,
        var(--hr-gradient-main, #888) 80%,
        var(--hr-gradient-end, #bbb) 92%,
        var(--hr-gradient-fade, rgba(0,0,0,0)) 100%
    );
    border-radius: 2px;
    opacity: 1;
    transition: background 0.3s;
}
.little-separation{
    width: 5px;
}
a{
    font-weight: 400;
}
.footer-text{
    text-align: center;
}
/* Responsividad para el header y tabs */
@media (max-width: 850px) {
    .topics-buttons{
        display: none;
    }
    .header-info{
        justify-content: right;
    }
}

/* Para pantallas muy pequeñas
@media (max-width: 430px) {
    .tab {
        padding: 4px 6px;
        font-size: 0.85em;
    }
} */

/* Estilos modo claro */
body.light {
    background: #f0f0f0;
    color: #222;
}
body.light button {
    background-color: black;
    color: white;
}
body.light button:hover {
    background-color: #333;
    color: white;
}
body.light header {
    background: linear-gradient(
        to bottom,
        rgba(240,240,240,0.85) 0%,
        rgba(240,240,240,0.60) 70%,
        rgba(240,240,240,0.20) 85%,
        rgba(240,240,240,0.00) 100%
    );
}
body.light footer {
    background: linear-gradient(
        to top,
        #b0b0b0 0%,
        #d3d3d3 90%,
        rgba(240,240,240,0.0) 100%
    );
    color: #222;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
body.light a {
    color: #222;
}
body.light .open-to-work {
    border-color: #219a4b;
    /* background-color: #e6f7ed; */
    color: #219a4b;
}
body.light .tool-icon-container {
    background-color: #e8e8e8;
    color: #1976d2;
}
body.light .projects-img-container{
    border: 1px solid #1976d2;
    background-color: #e8e8e8;
}
body.light .period-label{
    background-color: #e8e8e8;
    color: #1976d2;
}
body.light .tab {
    background-color: #dbdbdb;
    color: #222;
}
body.light .tab:hover {
    background-color: #cccccc;
    color: #222;
}
body.light .tab.active {
    background-color: #1976d2;
    color: #fff;
}
body.light .tab.active:hover {
    background-color: #63a4ff;
    color: #fff;
}
body.light .img-text {
    border: 1px solid #1976d2;
    background-color: #e8e8e8;
    color: #1976d2;
}
body.light .img-text:hover {
    border: 1px solid #63a4ff;
    background-color: #e3f0fd;
    color: #1976d2;
}
body.light .img-text .icon {
    border-color: #1976d2;
    background: #e6e6e6;
}
body.light .img-text:hover .icon {
    border-color: #63a4ff;
    background: #e3f0fd;
}

body.light hr {
    --hr-gradient-fade: rgba(240,240,240,0);
    --hr-gradient-start: #e0e0e0;
    --hr-gradient-main: #a9a9a9;
    --hr-gradient-end: #e0e0e0;
}

/* Estilos modo oscuro */
body.dark {
    background: #222;
    color: #fff;
}
body.dark button {
    background-color: #f0f0f0;
    color: black;
}
body.dark button:hover {
    background-color: rgb(206, 206, 206);
    color: black;
}
body.dark header {
    background: linear-gradient(
        to bottom,
        rgba(34,34,34,0.85) 0%,
        rgba(34,34,34,0.60) 70%,
        rgba(34,34,34,0.20) 85%,
        rgba(34,34,34,0.00) 100%
    );
}
body.dark footer {
    background: linear-gradient(
        to top,
        #23272f 0%,
        #393e46 90%,
        rgba(34,34,34,0.0) 100%
    );
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
body.dark a {
    color: #fff;
}
body.dark .open-to-work {
    border-color: #4caf50;
    /* background-color: #1b2b1d; */
    color: #7fff9f;
}
body.dark .tool-icon-container {
    background-color: #23243a;
    color: #bfc7ff;
}
body.dark .projects-img-container{
    border: 1px solid #3949ab;
    background-color: #23243a;
}
body.dark .period-label{
    background-color: #23243a;
    color: #bfc7ff;
}
body.dark .tab {
    background-color: #353535;
    color: white;
}
body.dark .tab:hover {
    background-color: #444444;
    color: white;
}
body.dark .tab.active {
    background-color: #3949ab;
    color: #fff;
}
body.dark .tab.active:hover {
    background-color: #6f74dd;
    color: #fff;
}

body.dark .img-text {
    border: 1px solid #3949ab;
    background-color: #23243a;
    color: #bfc7ff;
}
body.dark .img-text:hover {
    border: 1px solid #6f74dd;
    background-color: #2c2e4a;
    color: #e0e6ff;
}
body.dark .img-text .icon {
    border-color: #3949ab;
    background: #18192b;
}
body.dark .img-text:hover .icon {
    border-color: #6f74dd;
    background: #23243a;
}

body.dark hr {
    --hr-gradient-fade: rgba(34,34,34,0);
    --hr-gradient-start: #444;
    --hr-gradient-main: #d9d9d9;
    --hr-gradient-end: #444;
}

/* Estilos modo azul */
body.blue {
    background: #122845;
    color: #fff;
}
body.blue button {
    background-color: #546587;
    color: white;
}
body.blue button:hover {
    background-color: #334766;
    color: white;
}
body.blue header {
    background: linear-gradient(
        to bottom,
        rgba(18,40,69,0.85) 0%,
        rgba(18,40,69,0.60) 70%,
        rgba(18,40,69,0.20) 85%,
        rgba(18,40,69,0.00) 100%
    );
}
body.blue footer {
    background: linear-gradient(
        to top,
        #1a335a 0%,
        #334766 90%,
        rgba(18,40,69,0.0) 100%
    );
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
body.blue a {
    color: #fff;
}
body.blue .open-to-work {
    border-color: #43e68b;
    /* background-color: #183c2e; */
    color: #43e68b;
}
body.blue .tool-icon-container {
    background-color: #1a335a;
    color: #7ec3ff;
}
body.blue .projects-img-container{
    border: 1px solid #1e5daa;
    background-color: #1a335a;
}
body.blue .period-label {
    background-color: #1a335a;
    color: #7ec3ff;
}
body.blue .tab {
    background-color: #23395d;
    color: white;
}
body.blue .tab:hover {
    background-color: #2c4875 ;
    color: white;
}
body.blue .tab.active {
    background-color: #1e5daa;
    color: #fff;
}
body.blue .tab.active:hover {
    background-color: #0f4285;
    color: #fff;
}

body.blue .img-text {
    border: 1px solid #1e5daa;
    background-color: #1a335a;
    color: #7ec3ff;
}
body.blue .img-text:hover {
    border: 1px solid #0f4285;
    background-color: #23395d;
    color: #b3d8ff;
}
body.blue .img-text .icon {
    border-color: #1e5daa;
    background: #122845;
}
body.blue .img-text:hover .icon {
    border-color: #0f4285;
    background: #1a335a;
}

body.blue hr {
    --hr-gradient-fade: rgba(18,40,69,0);
    --hr-gradient-start: #23395d;
    --hr-gradient-main: #1e5daa;
    --hr-gradient-end: #23395d;
}