:root {
    font-size: 16px;
    font-family: 'Nunito';
    --blue: #0077BE;
    --white: #fff;
    --black: #000;
    --gray: #86868B;
    --gray-bg: #F2F2F2;
}
* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h2 {
    font-family: 'Permanent marker';
    font-size: 2rem;
}

/* ---------------- */
/* ---- NAVBAR ---- */
/* ---------------- */
nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    position: sticky;
    position: -webkit-sticky;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1;
}
.navbar {
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar h2 {
    font-size: 1.5rem;
}
.nav-header .letter {
    font-size: 2rem;
    color: var(--blue);
}
.push {
    margin-left: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.nav-links span {
    display: none;
}
.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
}
.nav-item i {
    font-size: 1.5rem;
}
.nav-item span {
    font-size: 13px;
}
.nav-item:hover {
    transform: scale(1.2);
}

/* ---------------- */
/* ---- HEADER ---- */
/* ---------------- */
header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background-color: var(--gray-bg);
}
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3rem;
    padding: 3rem 0;
}

.card {
    width: 80%;
    max-width: 515px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2.5rem;
    background-color: var(--white);
    border-radius: 5px;
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}
.card-cover {
    width: 100%;
    height: 160px;
    position: absolute;
    top: -10%;
    left: 0;
    background-image: url("./bg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: blur(1.25rem);
    -webkit-filter: blur(1.25rem);
    transform: scale(1.1);
}
.card-header {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.card-header img {
    width: 6rem;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-64px);
}

.name {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateY(0px) translateX(-50%);
    white-space: nowrap;
    font-size: 2.25rem;
}
.profession {
    opacity: 0.7;
    font-size: 0.85rem;
    font-weight: 400;
    position: absolute;
    bottom: -10%;
    left: 50%;
    transform: translateX(-50%) translateY(-7px);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1.25px;
}

.card-main {
    width: 90%;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.card-main p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.topics {
    flex-wrap: wrap;
    gap: 0.5rem;
}
.topics p {
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    border: 0.5px solid var(--black);
    background-color: var(--white);
}
.topics .problem-solving i {
    color: purple;
}
.topics .programming i {
    color: green;
}
.topics .science i {
    color: var(--blue);
}
.topics .sports i {
    font-size: large;
}

.about {
    width: 90%;
}
.about h2 {
    margin-top: 1rem;
    text-align: center;
}
.about h2, .about p {
    margin-bottom: 1rem;
}

.socials-wrapper {
    padding: 0;
    margin: 2.5rem 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
}
.socials-wrapper a {
    all: unset;
    border-radius: 50%;
    margin: 10px;
}
.socials-wrapper .social-icon {
    position: relative;
    background: #ffffff;
    border-radius: 50%;
    padding: 15px;
    width: 50px;
    height: 50px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.socials-wrapper .tooltip {
    position: absolute;
    top: 0;
    font-size: 14px;
    background: #ffffff;
    color: #ffffff;
    padding: 5px 8px;
    border-radius: 5px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.socials-wrapper .tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    background: #ffffff;
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.socials-wrapper .social-icon:hover .tooltip {
    top: -45px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.socials-wrapper .social-icon:hover span,
.socials-wrapper .social-icon:hover .tooltip {
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}
.socials-wrapper .github {
    border: 2px solid #333333;
}
.socials-wrapper .github:hover .social-icon,
.socials-wrapper .github:hover .social-icon .tooltip,
.socials-wrapper .github:hover .social-icon .tooltip::before {
    background: #333333;
    color: #ffffff;
}
.socials-wrapper .linkedin {
    border: 2px solid #1877F2;
}
.socials-wrapper .linkedin i{
    color: #1877F2;
}
.socials-wrapper .linkedin:hover i {
    color: #ffffff;
}
.socials-wrapper .linkedin:hover .social-icon,
.socials-wrapper .linkedin:hover .social-icon .tooltip,
.socials-wrapper .linkedin:hover .social-icon .tooltip::before {
    background: #1877F2;
    color: #ffffff;
}
.social-icon i {
    font-size: 2rem;
}

/* ---------------------- */
/* ---- WORK SECTION ---- */
/* ---------------------- */
#experience {
    width: 100%;
    margin-bottom: 10px;
    padding: 50px 0 60px;
    position: relative;
    background-color: var(--gray-bg);
}
#experience h2 {
    text-align: center;
}

.experience-wrapper{
    width: 85%;
    margin: 50px auto;
    position: relative;
}
.experience-wrapper .center-line{
    position: absolute;
    height: 100%;
    width: 4px;
    background: var(--gray);
    left: 24px;
    top: 20px;
    transform: translateX(-50%);
}
.experience-wrapper .row{
    display: flex;
    margin: 30px 0 3px 60px;
}
.experience-wrapper .row-1{
    justify-content: flex-start;
}
.experience-wrapper .row-2{
    justify-content: flex-end;
}
.experience-wrapper .row section{
    width: 100%;
    padding: 20px;
    border-radius: 5px;
    border: 4px solid var(--accent-color);
    position: relative;
    background: #fff;
}

.row-1 section::before{
    left: -7px;
}
.row-2 section::before{
    left: -7px;
}
.row section .icon,
.center-line .scroll-icon{
    position: absolute;
    background: var(--white);
    height: 40px;
    width: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    color: var(--black);
    font-size: 17px;
    box-shadow: 0 0 0 4px var(--accent-color), inset 0 2px 0 rgba(0,0,0,0.08), 0 3px 0 4px rgba(0,0,0,0.05);
}
.center-line .scroll-icon{
    bottom: -30px;
    left: 50%;
    font-size: 25px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--gray), inset 0 2px 0 rgba(0,0,0,0.08), 0 3px 0 4px rgba(0,0,0,0.05);
}
.center-line .scroll-icon i {
    vertical-align: middle;
}
.row-1 section .icon{
    top: 15px;
    left: -60px;
}
.row-2 section .icon{
    top: 15px;
    left: -60px;
}
.row section .job-details,
.row section .bottom{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.title {
    font-size: 22px;
    font-weight: 700;
}
.row section .company-name {
    font-size: 0.9rem;
    color: var(--gray);
}
.row section .job-details span {
    text-align: end;
}
.row section .description {
    padding: 0.9rem 0 0 1.25rem;
}

/* -------------------------- */
/* ---- PROJECTS SECTION ---- */
/* -------------------------- */
#projects {
    width: 100%;
    padding: 50px 0 60px;
    margin-bottom: 10px;
    background-color: var(--gray-bg);
}
#projects h2 {
    text-align: center;
}

.projects-wrapper {
    width: 90%;
    margin: 50px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.projects-wrapper .project {
    max-width: 350px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.1);
    background-color: var(--white);
}

.project span {
    font-size: 0.9rem;
    color: var(--blue);
}
.project .img {
    width: 150px;
    height: 150px;
    margin: 2rem 0 1rem;
    border-radius: 50%;
    border: 1px solid var(--blue);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.project .tfg-img {
    background-image: url("./Tfg.png");
}
.project .movie-app-img {
    background-image: url("./MovieApp.png");
    background-size: cover;
}
.project .cube-run-img {
    background-image: url("./CubeRun.png");
}
.project .pca-img {
    background-image: url("./PCA.png");
}
.project p {
    margin-top: 1rem;
}
.project a {
    margin-top: 1.5rem;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--white);
    border-radius: 5px;
    background-color: var(--blue);
}
.project a:hover {
    background-color: var(--black);
    transform: scale(1.1);
}

/* ---------------- */
/* ---- FOOTER ---- */
/* ---------------- */
footer {
    margin: 0 auto;
    padding: 1.13rem 0;
    color: var(--white);
    text-align: center;
    font-size: 13px;
    background-color: var(--black);
}

/* ----------------------- */
/* ---- MEDIA QUERIES ---- */
/* ----------------------- */
@media (min-width: 512px) {
    .nav-links span {
        display: block;
    }
}
@media (min-width: 768px) {
    .nav-links {
        gap: 3rem;
    }

    .header-wrapper {
        max-width: 85%;
        flex-direction: row;
        padding: 4rem 0;
    }
    .about h2 {
        text-align: left;
    }

    .experience-wrapper .center-line {
        left: 50%;
    }
    .experience-wrapper .row {
        margin: 0;
    }
    .experience-wrapper .row section {
        width: calc(50% - 84px);
    }
    .row-1 section::before{
      right: -7px;
      left: auto;
    }
    .row-1 section .icon{
      right: -60px;
      left: auto;
    }

    .projects-wrapper {
        max-width: 85%;
    }
}


@media (min-width: 1024px) {
    .header-wrapper {
        gap: 5rem;
    }
}