/* =============== GOOGLE FONTS =============== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* =============== VARIABLES CSS =============== */
:root {
    --header-height: 3.5rem;

    /* ========== Colors ========== */
    /* Using a more sophisticated violet/purple palette */
    --hue: 250;
    --first-color: hsl(var(--hue), 66%, 55%);
    --first-color-alt: hsl(var(--hue), 66%, 50%);
    --first-color-light: hsl(var(--hue), 66%, 65%);
    --first-color-lighter: hsl(var(--hue), 66%, 80%);
    --title-color: hsl(var(--hue), 4%, 98%);
    /* Brighter titles */
    --text-color: hsl(var(--hue), 4%, 85%);
    /* Lighter text for better contrast on dark */
    --text-color-light: hsl(var(--hue), 4%, 65%);
    --body-color: hsl(var(--hue), 20%, 8%);
    /* Slightly richer dark background */
    --container-color: rgba(255, 255, 255, 0.03);
    /* Glass effect base */
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* ========== Font and Typography ========== */
    --body-font: 'Outfit', sans-serif;
    --big-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;

    /* ========== Font Weight ========== */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;

    /* ========== Z-index ========== */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* Responsive Typography */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 4.5rem;
        --h1-font-size: 3rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: .95rem;
        --smaller-font-size: .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: .4s;
    /* For theme switching if added later */
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: hsl(var(--hue), 8%, 16%);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb {
    background-color: hsl(var(--hue), 8%, 24%);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--first-color);
}

h1,
h2,
h3 {
    color: var(--title-color);
    font-weight: var(--font-semibold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--body-font);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =============== REUSABLE CSS CLASSES =============== */
.container {
    max-width: 1024px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.main {
    overflow: hidden;
}

.section {
    padding: 6rem 0 2rem;
}

.section__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: 0.25rem;
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--first-color-light);
    text-align: center;
    margin-bottom: 3.5rem;
}

/* Scroll Reveal Animation Classes */
.section--hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s ease-out;
}

.section--visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============== BACKGROUND GLOW =============== */
.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%,
            rgba(113, 88, 226, 0.15) 0%,
            rgba(113, 88, 226, 0.05) 50%,
            transparent 80%);
    filter: blur(80px);
    z-index: -1;
    animation: glow-move 20s infinite alternate;
}

@keyframes glow-move {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-5%, -5%);
    }
}

/* =============== HEADER & NAV =============== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: rgba(10, 10, 16, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: .4s;
}

/* Header slightly more transparent when scrolled? Handled by js potentially, but this base style is good. */

.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;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dot {
    color: var(--first-color);
    font-size: 2rem;
    line-height: 0;
}

.nav__logo:hover {
    color: var(--first-color-light);
}

.nav__toggle {
    font-size: 1.25rem;
    color: var(--title-color);
    cursor: pointer;
    display: none;
}

.nav__close {
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--title-color);
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 16, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 2rem 1.5rem 4rem;
        box-shadow: 0 -1px 20px rgba(0, 0, 0, .2);
        border-radius: 1.5rem 1.5rem 0 0;
        transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: var(--z-fixed);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav__toggle {
        display: block;
    }
}

.nav__list {
    display: flex;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.nav__link {
    color: var(--text-color);
    font-weight: var(--font-medium);
    transition: .3s;
    position: relative;
}

.nav__link:hover {
    color: var(--first-color);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--first-color);
    transition: .3s;
    border-radius: 2px;
}

.nav__link:hover::after,
.active-link::after {
    width: 100%;
}

.active-link {
    color: var(--first-color);
}

/* Show Menu */
.show-menu {
    bottom: 0;
}

/* =============== HOME =============== */
.home__container {
    row-gap: 4rem;
    padding-top: 2rem;
}

.home__content {
    text-align: center;
}

.home__subtitle {
    display: block;
    font-size: var(--normal-font-size);
    color: var(--first-color-light);
    font-weight: var(--font-medium);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.home__title {
    font-size: var(--big-font-size);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, var(--first-color-lighter));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home__description {
    margin-bottom: 2.5rem;
    color: var(--text-color);
}

.home__buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Button Component */
.button {
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    background-color: var(--first-color);
    color: #fff;
    padding: 1rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: var(--font-medium);
    transition: .3s;
    border: 1px solid var(--first-color);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.5);
    border-color: var(--first-color-alt);
}

.button--ghost {
    background-color: transparent;
    color: var(--first-color-lighter);
    border: var(--glass-border);
    backdrop-filter: blur(4px);
    box-shadow: none;
}

.button--ghost:hover {
    background-color: rgba(108, 92, 231, 0.1);
    color: #fff;
    transform: translateY(-3px);
    border-color: var(--first-color);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
}

/* Visuals */
.home__visual {
    position: relative;
    display: flex;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically if needed */
    height: 350px;
    /* Reserve space explicitly */
}

.home__blob,
.home__blob-2 {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

.home__blob {
    background: var(--first-color);
    top: 0;
    left: 20%;
    animation: blob-bounce 8s infinite alternate;
}

.home__blob-2 {
    background: #a855f7;
    bottom: 0;
    right: 20%;
    animation: blob-bounce 8s infinite alternate-reverse;
}

@keyframes blob-bounce {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

.home__abstract-shape {
    width: 280px;
    height: 280px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 8s ease-in-out infinite;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg);
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(360deg);
    }
}

/* =============== ABOUT =============== */
.about__container {
    row-gap: 3rem;
}

.about__description {
    text-align: center;
    margin-bottom: 2.5rem;
}

.about__info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.about__box {
    background-color: var(--container-color);
    border: var(--glass-border);
    backdrop-filter: blur(10px);
    /* Glass */
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
    text-align: center;
    width: 140px;
    transition: .4s;
}

.about__box:hover {
    border-color: var(--first-color);
    transform: translateY(-8px);
    background-color: rgba(255, 255, 255, 0.08);
}

.about__icon {
    font-size: 1.75rem;
    color: var(--first-color-light);
    margin-bottom: 0.75rem;
}

.about__title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    margin-bottom: 0.25rem;
}

.about__subtitle {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

/* =============== SKILLS =============== */
.skills__container {
    row-gap: 2rem;
    justify-content: center;
}

.skills__content {
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: var(--glass-border);
    backdrop-filter: blur(16px);
    max-width: 600px;
    margin: 0 auto;
    transition: .4s;
}

.skills__content:hover {
    border-color: var(--first-color-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.skills__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--first-color-light);
}

.skills__box {
    display: flex;
    justify-content: center;
    column-gap: 4rem;
}

.skills__group {
    display: grid;
    align-content: flex-start;
    row-gap: 1.5rem;
}

.skills__data {
    display: flex;
    column-gap: 0.75rem;
    align-items: flex-start;
}

.skills__data i {
    font-size: 1.25rem;
    color: var(--first-color-light);
}

.skills__name {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.skills__level {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

/* =============== PROJECTS =============== */
.projects__container {
    row-gap: 2.5rem;
}

.projects__card {
    background-color: var(--container-color);
    border: var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1.25rem;
    border-radius: 1.5rem;
    transition: .4s;
    display: flex;
    flex-direction: column;
}

.projects__card:hover {
    border-color: var(--first-color);
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.projects__image {
    width: 100%;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
}

.projects__placeholder-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.4), rgba(168, 85, 247, 0.4));
    transition: transform .6s;
}

.projects__card:hover .projects__placeholder-img {
    transform: scale(1.1);
}

.projects__content {
    padding: 0 0.5rem 0.5rem;
    flex-grow: 1;
    /* Pushes button down if desc is short */
    display: flex;
    flex-direction: column;
}

.projects__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

.projects__description {
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
    line-height: 1.6;
    flex-grow: 1;
}

.projects__button {
    display: inline-flex;
    align-items: center;
    column-gap: 0.25rem;
    color: var(--first-color-light);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    transition: .3s;
    margin-top: auto;
}

.projects__button:hover {
    transform: translateX(5px);
    color: var(--first-color-lighter);
}

/* =============== CONTACT =============== */
.contact__container {
    row-gap: 3rem;
    padding-bottom: 3rem;
}

.contact__title {
    text-align: center;
    font-size: var(--h3-font-size);
    margin-bottom: 2rem;
}

.contact__info {
    display: grid;
    gap: 1.5rem;
}

.contact__card {
    background-color: var(--container-color);
    border: var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: .4s;
}

.contact__card:hover {
    border-color: var(--first-color);
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
}

.contact__card-icon {
    font-size: 2.5rem;
    color: var(--first-color-light);
    margin-bottom: 0.5rem;
}

.contact__card-title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
}

.contact__card-data {
    font-size: var(--small-font-size);
    display: block;
    margin-bottom: 1rem;
    color: var(--text-color-light);
}

.contact__button {
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.25rem;
    transition: .3s;
    font-weight: var(--font-medium);
}

.contact__button:hover {
    color: var(--first-color-lighter);
}

.contact__button:hover .contact__button-icon {
    transform: translateX(0.25rem);
}

.contact__button-icon {
    transition: .3s;
}

.contact__form-div {
    position: relative;
    margin-bottom: 2rem;
    height: 4rem;
}

.contact__form-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    /* Input glass */
    color: var(--text-color);
    border-radius: 1rem;
    padding: 1.5rem;
    outline: none;
    z-index: 1;
    transition: .3s;
}

.contact__form-input:focus {
    border-color: var(--first-color);
    background: rgba(255, 255, 255, 0.06);
}

.contact__form-tag {
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    font-size: var(--smaller-font-size);
    padding: 0.25rem 0.5rem;
    background-color: var(--body-color);
    border-radius: 0.25rem;
    z-index: 10;
    color: var(--first-color-light);
}

.contact__form-area {
    height: 11rem;
}

.contact__form-area textarea {
    resize: none;
}

/* =============== FOOTER =============== */
.footer {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer__title {
    color: var(--first-color-lighter);
    font-size: var(--h2-font-size);
    margin-bottom: 0;
}

.footer__list {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer__link {
    color: var(--text-color);
    font-size: var(--normal-font-size);
    transition: .3s;
}

.footer__link:hover {
    color: var(--first-color);
}

.footer__social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer__social-link {
    background-color: rgba(255, 255, 255, 0.05);
    /* slightly lighter bg */
    color: var(--first-color-light);
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: inline-flex;
    font-size: 1.25rem;
    transition: .3s;
    border: 1px solid transparent;
}

.footer__social-link:hover {
    background-color: var(--first-color);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.footer__copy {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-top: 1rem;
}

/* =============== SCROLL UP =============== */
.scrollup {
    position: fixed;
    right: 2rem;
    bottom: -20%;
    background-color: var(--first-color);
    opacity: 0.9;
    padding: 0.6rem;
    border-radius: 0.75rem;
    z-index: var(--z-tooltip);
    transition: .4s;
    color: #fff;
    font-size: 1.5rem;
    display: inline-flex;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.scrollup:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(108, 92, 231, 0.5);
}

.show-scroll {
    bottom: 3rem;
}

/* =============== MEDIA QUERIES =============== */
/* Small devices */
@media screen and (max-width: 320px) {
    .nav__menu {
        padding: 1.5rem;
    }

    .home__title {
        font-size: var(--h1-font-size);
    }

    .skills__box {
        column-gap: 1rem;
    }
}

/* Medium devices */
@media screen and (min-width: 576px) {
    .home__content {
        max-width: 450px;
        margin: 0 auto;
    }

    .about__info {
        grid-template-columns: repeat(3, 140px);
    }

    .contact__info {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact__form {
        width: 500px;
        margin: 0 auto;
    }

    .projects__container {
        grid-template-columns: 380px;
        justify-content: center;
    }
}

@media screen and (min-width: 767px) {
    .nav {
        height: calc(var(--header-height) + 1.5rem);
    }

    .nav__menu {
        width: initial;
        margin: 0;
        background: transparent;
        padding: 0;
        position: initial;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
    }

    .nav__list {
        display: flex;
        gap: 2.5rem;
    }

    .nav__item i {
        display: none;
        /* Hide icons in desktop nav if we had them inside li */
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }

    .home__container {
        grid-template-columns: 1fr max-content;
        gap: 4rem;
        text-align: initial;
        padding-top: 6rem;
        align-items: center;
    }

    .home__content {
        margin: 0;
        text-align: left;
    }

    .home__buttons {
        justify-content: flex-start;
    }

    .home__visual {
        min-height: 400px;
        /* Ensure space for blob */
        width: 400px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .home__abstract-shape {
        width: 350px;
        height: 350px;
    }

    .home__blob,
    .home__blob-2 {
        width: 350px;
        height: 350px;
    }

    .about__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        column-gap: 5rem;
    }

    .about__description {
        text-align: left;
        margin-bottom: 2rem;
    }

    .about__data {
        text-align: left;
    }

    .about__info {
        justify-content: flex-start;
    }

    .projects__container {
        grid-template-columns: repeat(2, 380px);
        gap: 3rem;
    }

    .contact__container {
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        column-gap: 6rem;
    }

    .footer__container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Large devices */
@media screen and (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    .home__blob {
        left: 30%;
    }

    .home__blob-2 {
        right: 30%;
    }

    .section {
        padding: 8rem 0 3rem;
    }

    .projects__container {
        grid-template-columns: repeat(3, 350px);
    }
}

