/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 3.5rem;

    /*========== Colors ==========*/
    /* HSL Color Mode */
    --hue: 250;
    --sat: 69%;
    --lig: 61%;

    --first-color: hsl(var(--hue), var(--sat), var(--lig));
    --first-color-alt: hsl(var(--hue), var(--sat), 53%);
    /* Darker for hover */
    --title-color: hsl(var(--hue), 8%, 15%);
    --text-color: hsl(var(--hue), 8%, 45%);
    --text-color-light: hsl(var(--hue), 8%, 65%);
    --input-color: hsl(var(--hue), 70%, 96%);
    --body-color: hsl(var(--hue), 60%, 99%);
    --container-color: #fff;
    --scroll-bar-color: hsl(var(--hue), 12%, 90%);
    --scroll-thumb-color: hsl(var(--hue), 12%, 80%);

    /*========== Font and Typography ==========*/
    --body-font: 'Inter', sans-serif;

    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;

    /*========== Font Weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /*========== Margenes Bottom ==========*/
    --mb-0-25: 0.25rem;
    --mb-0-5: 0.5rem;
    --mb-0-75: 0.75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* Responsive Typography */
@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 3.5rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.1rem;
        --small-font-size: 0.95rem;
        --smaller-font-size: 0.875rem;
    }
}

/*========== Dark Theme ==========*/
body.dark-theme {
    --title-color: hsl(var(--hue), 8%, 95%);
    --text-color: hsl(var(--hue), 8%, 75%);
    --input-color: hsl(var(--hue), 29%, 16%);
    --body-color: hsl(var(--hue), 28%, 12%);
    --container-color: hsl(var(--hue), 29%, 16%);
    --scroll-bar-color: hsl(var(--hue), 12%, 48%);
    --scroll-thumb-color: hsl(var(--hue), 12%, 36%);
}

/*========== Button Dark/Light ==========*/
.nav__btns {
    display: flex;
    align-items: center;
}

.change-theme {
    font-size: 1.25rem;
    color: var(--title-color);
    margin-right: var(--mb-1);
    cursor: pointer;
    transition: 0.3s;
}

.change-theme:hover {
    color: var(--first-color);
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0 0 var(--header-height) 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: .5s;
    /* Smooth Dark/Light transition */
}

h1,
h2,
h3,
h4 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.section {
    padding: 2rem 0 4rem;
}

.section__title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    text-align: center;
    margin-bottom: var(--mb-3);
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-3);
    text-align: center;
}

/*=============== SCROLL HEADER ===============*/
.scroll-header {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    background-color: var(--body-color);
}

.dark-theme .scroll-header {
    box-shadow: 0 1px 4px rgba(255, 255, 255, 0.05);
}

/*=============== CURSOR GLOW ===============*/
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(100, 100, 255, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease, top 0.1s ease;
    filter: blur(20px);
}

/*=============== LAYOUT ===============*/
.container {
    max-width: 968px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

/*=============== HEADER ===============*/
.header {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--body-color);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
    transition: .5s;
}

/* Header Glassmorphism (Desktop usually, but applied here as opaque for mobile) */

/*=============== NAV ===============*/
.nav {
    max-width: 968px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo,
.nav__toggle {
    color: var(--title-color);
    font-weight: var(--font-medium);
}

.nav__logo:hover {
    color: var(--first-color);
}

.nav__toggle {
    font-size: 1.1rem;
    cursor: pointer;
}

.nav__toggle:hover {
    color: var(--first-color);
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        bottom: -100%;
        /* Hidden */
        left: 0;
        width: 100%;
        background-color: var(--body-color);
        padding: 2rem 1.5rem 4rem;
        box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
        border-radius: 1.5rem 1.5rem 0 0;
        transition: .3s;
    }
}

.nav__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: var(--small-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
}

.nav__link:hover {
    color: var(--first-color);
}

.active-link {
    color: var(--first-color);
}

.nav__close {
    position: absolute;
    right: 1.3rem;
    bottom: .5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--first-color);
}

.nav__close:hover {
    color: var(--first-color-alt);
}

/* Show Menu */
.show-menu {
    bottom: 0;
}


/*=============== HERO ===============*/
.hero__container {
    gap: 1rem;
}

.hero__content {
    grid-column: 1 / -1;
}

.hero__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-0-5);
}

.hero__subtitle {
    display: block;
    font-size: var(--h3-font-size);
    color: var(--first-color);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-0-75);
}

.hero__education {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-75);
    font-weight: var(--font-medium);
}

.hero__description {
    margin-bottom: var(--mb-2);
}

.hero__social {
    display: flex;
    column-gap: 1rem;
}

.hero__social-link {
    font-size: 1.5rem;
    color: var(--first-color);
    transition: .3s;
}

.hero__social-link:hover {
    transform: translateY(-0.25rem);
    color: var(--first-color-alt);
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: var(--mb-2);
}

.hero__image-wrapper {
    display: flex;
    justify-content: center;
}

.hero__blob {
    width: 320px;
    height: 320px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__blob img {
    width: 100%;
    height: auto;
    transform: none;
    /* Reset any previous transform */
}


/* Scroll Down */
.hero__scroll {
    display: none;
}

.hero__scroll-button {
    color: var(--first-color);
    transition: .3s;
}

.hero__scroll-button:hover {
    transform: translateY(0.25rem);
}

.hero__scroll-mouse {
    font-size: 2rem;
}

.hero__scroll-text {
    font-size: var(--small-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
    margin-right: var(--mb-0-25);
}

.hero__scroll-arrow {
    font-size: 1.25rem;
}

/*=============== BUTTONS ===============*/
.button {
    display: inline-flex;
    align-items: center;
    background-color: var(--first-color);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    transition: .3s;
}

.button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.button--ghost {
    background-color: transparent;
    color: var(--first-color);
    border: 2px solid var(--first-color);
}

.button--ghost:hover {
    background-color: var(--first-color);
    color: #fff;
    box-shadow: none;
}

.button i {
    font-size: 1.25rem;
    margin-left: var(--mb-0-5);
    transition: .3s;
}

.button:hover i {
    transform: translateX(0.25rem);
}

/*=============== ABOUT ===============*/
.about__img {
    width: 200px;
    border-radius: .5rem;
    justify-self: center;
    align-self: center;
}

.about__description {
    text-align: center;
    margin-bottom: var(--mb-2-5);
}

.about__info {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: var(--mb-2-5);
}

.about__box {
    background-color: var(--container-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Subtle light mode border */
    padding: .75rem;
    border-radius: .75rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark-theme .about__box {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.about__icon {
    font-size: 1.5rem;
    color: var(--first-color);
    margin-bottom: var(--mb-0-5);
}

.about__title {
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
}

.about__subtitle {
    font-size: var(--smaller-font-size);
}

/*=============== SKILLS ===============*/
.skills__container {
    row-gap: 0;
}

.skills__content {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    margin-bottom: var(--mb-2);
}

.skills__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1-5);
    text-align: center;
}

.skills__box {
    display: flex;
    justify-content: center;
    column-gap: 2.5rem;
}

.skills__group {
    display: grid;
    align-content: flex-start;
    row-gap: 1rem;
}

.skills__data {
    display: flex;
    column-gap: 0.5rem;
}

.skills__data i {
    font-size: 1rem;
    color: var(--first-color);
}

.skills__name {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    line-height: 18px;
}

.skills__level {
    font-size: var(--smaller-font-size);
}

/*=============== PROJECTS ===============*/
.projects__card {
    background-color: var(--container-color);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: .3s;
}

.projects__image {
    height: 180px;
    overflow: hidden;
    border-radius: 1rem;
    margin-bottom: var(--mb-1);
}

.projects__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.projects__card:hover .projects__img {
    transform: scale(1.1);
}

.projects__content {
    padding: 0.5rem 0.5rem 1rem;
}

.projects__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.projects__description {
    margin-bottom: var(--mb-1);
    font-size: var(--small-font-size);
}

.projects__tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--mb-1-5);
}

.projects__tag {
    font-size: var(--smaller-font-size);
    background-color: var(--body-color);
    /* Contrast with container */
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--first-color);
}

.projects__button {
    font-size: var(--small-font-size);
    color: var(--first-color);
    display: flex;
    align-items: center;
    column-gap: 0.25rem;
    transition: .3s;
}

.projects__button:hover {
    transform: translateX(0.25rem);
}


/*=============== CONTACT ===============*/
.contact__container {
    row-gap: 3rem;
}

.contact__title {
    text-align: center;
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1-5);
}

.contact__info {
    display: grid;
    gap: 1rem;
}

.contact__card {
    background-color: var(--container-color);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact__card-icon {
    font-size: 2rem;
    color: var(--title-color);
    margin-bottom: var(--mb-0-25);
}

.contact__card-title,
.contact__card-data {
    display: block;
}

.contact__card-title {
    font-size: var(--small-font-size);
}

.contact__card-data {
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-0-75);
}

.contact__button {
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.25rem;
    transition: .3s;
}

.contact__button:hover {
    transform: translateX(0.25rem);
}

.contact__card:hover .contact__button {
    transform: translateX(0.25rem);
}

/* Contact Form */
.contact__form-div {
    position: relative;
    margin-bottom: var(--mb-2);
    height: 4rem;
}

.contact__form-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--input-color);
    /* Light border */
    background: none;
    color: var(--text-color);
    outline: none;
    padding: 1.5rem;
    border-radius: 0.75rem;
    z-index: 1;
    transition: .3s;
}

.dark-theme .contact__form-input {
    border-color: rgba(255, 255, 255, 0.1);
}

.contact__form-tag {
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    font-size: var(--smaller-font-size);
    padding: 0.25rem;
    background-color: var(--body-color);
    z-index: 10;
}

.contact__form-area {
    height: 11rem;
}

.contact__form-area textarea {
    resize: none;
}

.contact__form-input:focus {
    border-color: var(--first-color);
}


/*=============== FOOTER ===============*/
.footer {
    background-color: var(--first-color);
    padding: 2rem 0;
}

.footer__title,
.footer__link {
    color: #fff;
}

.footer__title {
    text-align: center;
    margin-bottom: var(--mb-2);
}

.footer__list {
    display: flex;
    justify-content: center;
    column-gap: 1.5rem;
    margin-bottom: var(--mb-2);
}

.footer__social {
    display: flex;
    justify-content: center;
    column-gap: 1.25rem;
}

.footer__social-link {
    background-color: #fff;
    color: var(--first-color);
    padding: 0.25rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    display: inline-flex;
}

.footer__copy {
    display: block;
    margin-top: 4.5rem;
    color: #f0f0f0;
    text-align: center;
    font-size: var(--smaller-font-size);
}

/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -20%;
    background-color: var(--first-color);
    opacity: 0.8;
    padding: 0 0.3rem;
    border-radius: .4rem;
    z-index: var(--z-tooltip);
    transition: .4s;
    display: inline-flex;
}

.scrollup:hover {
    background-color: var(--first-color-alt);
}

.scrollup__icon {
    font-size: 1.5rem;
    color: #fff;
}

.show-scroll {
    bottom: 5rem;
}

/*=============== MEDIA QUERIES ===============*/
@media screen and (min-width: 576px) {
    .about__info {
        grid-template-columns: repeat(3, 140px);
        justify-content: center;
        gap: 1rem;
    }

    .skills__container {
        grid-template-columns: 320px;
        justify-content: center;
    }

    .projects__container {
        grid-template-columns: repeat(2, 332px);
        justify-content: center;
    }

    .contact__info {
        grid-template-columns: 300px;
        justify-content: center;
    }

    .contact__form {
        width: 360px;
        margin: 0 auto;
    }
}

@media screen and (min-width: 767px) {
    body {
        margin: 0;
    }

    .nav {
        height: calc(var(--header-height) + 1.5rem);
        column-gap: 1rem;
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }

    .nav__list {
        display: flex;
        column-gap: 2rem;
    }

    .nav__menu {
        margin-left: auto;
    }

    .header {
        top: 0;
        bottom: initial;
    }

    .home__container {
        row-gap: 5rem;
    }

    .home__content {
        padding-top: 5.5rem;
        column-gap: 2rem;
    }

    .about__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        text-align: initial;
    }

    .about__description {
        text-align: initial;
    }

    .about__info {
        justify-content: initial;
    }

    .about__img {
        width: 300px;
    }

    .skills__container {
        grid-template-columns: repeat(2, 350px);
    }
}

@media screen and (min-width: 992px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    .section {
        padding: 6rem 0 2rem;
    }

    .section__subtitle {
        margin-bottom: 4rem;
    }

    .header {
        top: 0;
        bottom: initial;
    }

    .hero__container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        text-align: initial;
        padding-top: 2rem;
    }

    .hero__image-wrapper {
        justify-content: flex-end;
    }

    .hero__subtitle {
        font-size: var(--h2-font-size);
    }

    .hero__scroll {
        display: block;
    }

    .hero__scroll-button {
        margin-left: 3rem;
    }

    .about__container {
        column-gap: 5rem;
    }
}