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

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

    /* Colors */
    /* Premium Dark Theme */
    --hue: 240;
    --first-color: hsl(var(--hue), 60%, 55%);
    --first-color-alt: hsl(var(--hue), 58%, 50%);
    --title-color: hsl(var(--hue), 8%, 95%);
    --text-color: hsl(var(--hue), 8%, 75%);
    --text-color-light: hsl(var(--hue), 8%, 60%);
    --body-color: hsl(var(--hue), 20%, 8%);
    --container-color: hsl(var(--hue), 20%, 12%);
    --border-color: hsl(var(--hue), 20%, 20%);
    --accent-gradient: linear-gradient(135deg, hsl(var(--hue), 60%, 55%) 0%, hsl(280, 60%, 55%) 100%);

    /* Font */
    --body-font: 'Outfit', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;

    /* Weights */
    --font-medium: 500;
    --font-semibold: 600;

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

@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 3.5rem;
        --h2-font-size: 2.25rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: 0.938rem;
        --smaller-font-size: 0.875rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: .3s;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: .3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Removed extra space below image */
}

/* LAYOUT */
.container {
    max-width: 968px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

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

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

.section__title {
    font-size: var(--h2-font-size);
    color: var(--first-color);
    text-align: center;
    margin-bottom: 0.75rem;
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-align: center;
    margin-bottom: 2.5rem;
}

/* HEADER */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--title-color);
    font-weight: var(--font-semibold);
    font-size: 1.25rem;
}

.accent-dot {
    color: var(--first-color);
}

.nav__toggle {
    color: var(--title-color);
    font-size: 1.25rem;
    cursor: pointer;
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background-color: var(--container-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 {
    display: grid;
    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(--text-color);
    font-weight: var(--font-medium);
}

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

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

.nav__button {
    display: inline-flex;
    align-items: center;
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    transition: .3s;
    font-size: var(--small-font-size);
}

.nav__button:hover {
    box-shadow: 0 4px 12px hsla(var(--hue), 60%, 55%, 0.4);
    transform: translateY(-2px);
    color: white;
    /* Ensure text remains white */
}

.show-menu {
    bottom: 0;
}

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

/* HERO */
.home__container {
    gap: 1rem;
}

.home__content {
    grid-template-columns: 1fr;
    padding-top: 3.5rem;
    align-items: center;
    justify-items: center;
}

.home__data {
    text-align: center;
    order: 2;
    /* Move text below image on mobile defaults if needed, but handled by grid-template mostly */
}

/* IMAGE STYLES */
.home__img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    /* Circle profile */
    overflow: hidden;
    background: linear-gradient(145deg, var(--first-color-alt), var(--first-color));
    display: flex;
    align-items: flex-end;
    /* If it's a cutout */
    justify-content: center;
    box-shadow: 0 0 20px rgba(var(--hue), 60%, 55%, 0.3);
    margin-bottom: 2rem;
    order: 1;
    /* Image first */
}

.home__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.home__title {
    font-size: var(--h1-font-size);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.home__subtitle {
    font-size: var(--h3-font-size);
    color: var(--text-color);
    font-weight: var(--font-medium);
    margin-bottom: 0.75rem;
}

.home__description {
    margin-bottom: 2rem;
}

.home__buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: var(--font-medium);
    cursor: pointer;
}

.button--flex {
    background: var(--accent-gradient);
    color: white;
}

.button--flex:hover {
    box-shadow: 0 4px 12px hsla(var(--hue), 60%, 55%, 0.4);
    transform: translateY(-2px);
}

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

.button--ghost:hover {
    background: var(--first-color);
    color: white;
}

.button__icon {
    margin-left: 0.5rem;
    transition: .3s;
}

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

.home__social-icon {
    font-size: 1.5rem;
    color: var(--first-color);
}

.home__social-icon:hover {
    transform: translateY(-0.25rem);
}

/* ABOUT */
.about__img {
    width: 200px;
    border-radius: 0.5rem;
    justify-self: center;
    align-self: center;
    margin-bottom: 1rem;
}

.about__description {
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.about__strengths {
    margin-bottom: 2.5rem;
    text-align: center;
}

.about__strengths-title {
    font-size: var(--normal-font-size);
    margin-bottom: 1rem;
    color: var(--first-color);
}

.about__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.chip {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: var(--smaller-font-size);
    color: var(--text-color);
    transition: .3s;
}

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

.about__info {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 2.5rem;
}

.about__info-title {
    font-size: var(--h2-font-size);
    font-weight: var(--font-semibold);
    color: var(--title-color);
    display: block;
    text-align: center;
}

.about__info-name {
    font-size: var(--smaller-font-size);
    display: block;
    text-align: center;
}

/* EXPERIENCE & PROJECTS & EDUCATION CARDS */
.experience__content,
.projects__container,
.skills__container,
.education__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.experience__data,
.project__card,
.education__card {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: .3s;
    /* For projects with images */
    overflow: hidden;
}

.project__card {
    padding: 0;
    /* Remove padding for project card to let image fill full width if desired, or keep it */
    padding: 1.5rem;
    /* Let's keep padding for consistent look, or remove to make it like a card with top image */
}

/* Let's style project card to have image at top */
.project__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}


.experience__data:hover,
.project__card:hover,
.education__card:hover {
    border-color: var(--first-color);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.experience__header {
    margin-bottom: 1rem;
}

.experience__title,
.project__title,
.education__degree {
    font-size: var(--normal-font-size);
    margin-bottom: 0.25rem;
}

.experience__company,
.education__school {
    display: block;
    font-size: var(--small-font-size);
    color: var(--first-color);
    margin-bottom: 0.5rem;
}

.experience__date,
.project__date,
.education__date {
    display: block;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.experience__list li {
    list-style: disc inside;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    font-size: var(--small-font-size);
}

/* Projects specifics */
.project__tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--first-color-alt);
}

/* Skills */
.skills__container {
    row-gap: 2rem;
}

.skills__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skills__box {
    display: flex;
    justify-content: center;
}

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

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

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

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

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

.contact__content {
    text-align: center;
}

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

.contact__card {
    background-color: var(--container-color);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.contact__card-icon {
    font-size: 2rem;
    color: var(--first-color);
    margin-bottom: 0.75rem;
}

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

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

.contact__card-data {
    font-size: var(--small-font-size);
    margin-bottom: 0.75rem;
}

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

.contact__button-icon {
    font-size: 1rem;
    transition: .3s;
}

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

/* FOOTER */
.footer {
    background-color: var(--container-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1.5rem;
}

.footer__title {
    font-size: 2rem;
    color: var(--title-color);
    font-weight: var(--font-semibold);
}

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

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

.footer__social-link {
    font-size: 1.25rem;
    color: var(--title-color);
}

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

.footer__copy {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

/* SCROLL BAR */
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: hsl(var(--hue), 8%, 16%);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb {
    background-color: hsl(var(--hue), 8%, 24%);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(var(--hue), 8%, 32%);
}

/* Animation Utilities */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* MEDIA QUERIES */
/* Small devices */
@media screen and (max-width: 350px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .nav__menu {
        padding: 2rem 0.25rem 4rem;
    }

    .home__content {
        grid-template-columns: 0.25fr 3fr;
    }
}

/* Medium devices */
@media screen and (min-width: 568px) {
    .home__content {
        grid-template-columns: max-content 1fr 1fr;
    }

    .home__data {
        grid-column: -2 / -1;
        /* span last cols */
        text-align: initial;
        order: initial;
    }

    .home__img {
        order: initial;
        width: 250px;
        height: 250px;
    }

    .about__container,
    .projects__container,
    .education__container,
    .contact__info {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__data {
        text-align: initial;
    }

    .about__strengths {
        text-align: initial;
    }

    .about__chips {
        justify-content: flex-start;
    }

    .about__info {
        justify-content: space-between;
    }

    .about__description {
        text-align: initial;
    }
}

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

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

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

    .nav__menu {
        display: flex;
        margin-left: auto;
    }

    .nav__close,
    .nav__toggle {
        display: none;
    }

    .home__container {
        row-gap: 5rem;
    }

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

    .home__img {
        width: 350px;
        height: 350px;
    }

    .about__container {
        background-color: var(--container-color);
        border-radius: 1rem;
        padding: 2rem;
        grid-template-columns: repeat(2, 1fr);
        /* Side by side about */
        align-items: center;
    }

    .about__img {
        width: 300px;
    }
}

@media screen and (min-width: 1024px) {
    .section {
        padding: 6rem 0 3rem;
    }

    .projects__container {
        grid-template-columns: repeat(3, 1fr);
    }
}