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

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

    /* ========== Colors ========== */
    --hue: 230;
    --first-color: hsl(var(--hue), 69%, 61%);
    --first-color-second: hsl(var(--hue), 69%, 55%);
    --first-color-alt: hsl(var(--hue), 57%, 53%);
    --first-color-lighter: hsl(var(--hue), 92%, 85%);
    --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: 'Poppins', sans-serif;

    --biggest-font-size: 2.5rem;
    --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;
    --tiny-font-size: 0.625rem;

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

    /* ========== Margins 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 (max-width: 992px) {
    :root {
        --biggest-font-size: 2rem;
        --h1-font-size: 1.5rem;
        --h2-font-size: 1.25rem;
        --h3-font-size: 1rem;
        --normal-font-size: 0.938rem;
        --small-font-size: 0.813rem;
        --smaller-font-size: 0.75rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body,
button,
input,
textarea {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

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

/* ==================== REUSABLE CSS CLASSES ==================== */
.container {
    max-width: 968px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

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

.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);
    color: var(--first-color);
    text-align: center;
    margin-bottom: var(--mb-0-25);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: var(--font-medium);
}

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

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

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

.button__ghost:hover {
    background-color: var(--first-color);
    color: #fff;
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    z-index: var(--z-fixed);
    transition: box-shadow 0.3s;
}

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

.nav__logo {
    color: var(--title-color);
    font-weight: var(--font-medium);
    font-size: var(--h3-font-size);
}

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

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

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    transition: color 0.3s;
    position: relative;
}

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

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--first-color);
    transition: width 0.3s;
}

.nav__link:hover::after,
.active-link::after {
    width: 100%;
}

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

.nav__toggle,
.nav__close {
    display: none;
}

/* Scroll Header */
.scroll-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==================== HOME ==================== */
.home__container {
    position: relative;
    row-gap: 4.5rem;
    padding-top: 2rem;
}

.home__data {
    text-align: center;
}

.home__greeting {
    display: block;
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    margin-bottom: var(--mb-0-25);
}

.home__name {
    font-size: var(--biggest-font-size);
    margin-bottom: var(--mb-0-25);
}

.home__education {
    font-size: var(--h3-font-size);
    color: var(--text-color);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-2-5);
}

.home__buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.home__handle {
    justify-self: center;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--first-color), var(--first-color-alt));
    padding: 0.5rem;
    animation: profile-animate 8s ease-in-out infinite;
}

@keyframes profile-animate {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.home__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home__social {
    display: grid;
    grid-template-columns: max-content;
    row-gap: 1rem;
    position: absolute;
    top: 0;
    left: 0;
}

.home__social-link {
    width: 40px;
    height: 40px;
    background-color: var(--container-color);
    border: 2px solid var(--first-color);
    color: var(--first-color);
    font-size: 1.25rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.home__social-link:hover {
    background-color: var(--first-color);
    color: #fff;
    transform: translateY(-5px);
}

.home__scroll {
    color: var(--first-color);
    display: inline-flex;
    column-gap: 0.5rem;
    align-items: center;
    justify-self: center;
    margin-top: 3rem;
    transition: transform 0.3s;
}

.home__scroll:hover {
    transform: translateY(5px);
}

.home__scroll-name {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
}

/* ==================== ABOUT ==================== */
.about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 4rem;
}

.about__img {
    width: 350px;
    border-radius: 1.5rem;
    justify-self: center;
}

.about__info {
    display: grid;
    grid-template-columns: repeat(3, 140px);
    gap: 0.5rem;
    margin-bottom: var(--mb-2);
}

.about__box {
    background-color: var(--container-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    text-align: center;
    padding: 1rem 1.25rem;
    transition: all 0.3s;
}

.about__box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.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-medium);
}

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

.about__description {
    padding: 0 4rem 0 0;
    margin-bottom: var(--mb-2-5);
    text-align: justify;
}

/* ==================== SKILLS ==================== */
.skills__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
}

.skills__content {
    background-color: var(--container-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem 4rem;
    border-radius: 1.25rem;
    transition: all 0.3s;
}

.skills__content:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.skills__title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    text-align: center;
    margin-bottom: var(--mb-1-5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.skills__title i {
    color: var(--first-color);
    font-size: 1.5rem;
}

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

.skills__group {
    display: grid;
    row-gap: 1rem;
}

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

.skills__data i {
    font-size: 1.5rem;
    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(--tiny-font-size);
    color: var(--text-color-light);
}

/* ==================== PROJECTS ==================== */
.projects__container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.projects__card {
    background-color: var(--container-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: 1rem;
    transition: all 0.3s;
}

.projects__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.projects__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: var(--mb-1);
}

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

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

.projects__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.projects__link {
    display: inline-flex;
    align-items: center;
    column-gap: 0.25rem;
    color: var(--first-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    transition: all 0.3s;
}

.projects__link:hover {
    color: var(--first-color-alt);
    transform: translateX(5px);
}

/* ==================== CONTACT ==================== */
.contact__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    column-gap: 6rem;
    padding-bottom: 3rem;
}

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

.contact__info {
    display: grid;
    row-gap: 1rem;
    grid-template-columns: 300px;
}

.contact__card {
    background-color: var(--container-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s;
}

.contact__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

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

.contact__button {
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: inline-flex;
    align-items: center;
    column-gap: 0.25rem;
    font-weight: var(--font-medium);
    transition: transform 0.3s;
}

.contact__button:hover {
    transform: translateX(5px);
}

.contact__form {
    width: 360px;
}

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

.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;
    color: var(--title-color);
}

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

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

.contact__form-area {
    height: 11rem;
}

.contact__form-area textarea {
    resize: none;
}

.contact__message {
    font-size: var(--small-font-size);
    margin-top: 1rem;
    text-align: center;
}

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

.footer__container {
    padding: 2rem 0;
}

.footer__title {
    text-align: center;
    margin-bottom: var(--mb-2);
    color: #fff;
    font-size: var(--h1-font-size);
}

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

.footer__link {
    color: #fff;
    transition: opacity 0.3s;
}

.footer__link:hover {
    opacity: 0.7;
}

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

.footer__social-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    transition: all 0.3s;
}

.footer__social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.footer__copy {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--small-font-size);
}

/* ==================== SCROLL UP ==================== */
.scrollup {
    position: fixed;
    right: 2rem;
    bottom: -20%;
    background-color: var(--first-color);
    opacity: 0.8;
    padding: 0.5rem;
    border-radius: 0.4rem;
    z-index: var(--z-tooltip);
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.scrollup i {
    color: #fff;
    font-size: 1.25rem;
}

.show-scroll {
    bottom: 3rem;
}

/* ==================== SCROLL BAR ==================== */
::-webkit-scrollbar {
    width: 0.6rem;
    border-radius: 0.5rem;
    background-color: var(--scroll-bar-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb-color);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color-light);
}

/* ==================== BREAKPOINTS ==================== */
/* For Large Devices */
@media screen and (max-width: 992px) {
    .container {
        margin-left: var(--mb-1-5);
        margin-right: var(--mb-1-5);
    }

    .home__handle {
        width: 250px;
        height: 250px;
    }

    .home__social {
        position: initial;
        display: flex;
        justify-content: center;
        column-gap: 1rem;
    }

    .about__container {
        grid-template-columns: 1fr;
        row-gap: 2.5rem;
    }

    .about__img {
        width: 250px;
    }

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

    .about__description {
        padding: 0;
    }

    .skills__container {
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }

    .skills__content {
        padding: 2rem;
    }

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

    .contact__container {
        grid-template-columns: 1fr;
        row-gap: 3rem;
    }

    .contact__info {
        justify-self: center;
    }

    .contact__form {
        justify-self: center;
    }
}

/* For Medium Devices */
@media screen and (max-width: 768px) {
    .section {
        padding: 4.5rem 0 2rem;
    }

    .nav {
        height: var(--header-height);
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100%;
        background-color: var(--body-color);
        padding: 4rem 0 3rem;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
        transition: right 0.4s;
    }

    .nav__list {
        flex-direction: column;
        row-gap: 2rem;
        padding-left: 3rem;
    }

    .nav__link {
        font-size: var(--h3-font-size);
    }

    .nav__toggle,
    .nav__close {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--title-color);
    }

    .nav__close {
        position: absolute;
        top: 1rem;
        right: 1.5rem;
    }

    .show-menu {
        right: 0;
    }

    .home__buttons {
        flex-direction: column;
    }

    .about__info {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects__container {
        grid-template-columns: 1fr;
    }

    .contact__info {
        grid-template-columns: 1fr;
    }

    .contact__form {
        width: 100%;
    }
}

/* For Small Devices */
@media screen and (max-width: 576px) {
    .nav__menu {
        width: 100%;
    }

    .home__handle {
        width: 200px;
        height: 200px;
    }

    .home__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .home__buttons .button {
        width: 100%;
        justify-content: center;
    }

    .about__info {
        grid-template-columns: 1fr;
    }

    .about__box {
        padding: 0.75rem;
    }

    .skills__content {
        padding: 1.5rem;
    }

    .skills__box {
        flex-direction: column;
        row-gap: 1.5rem;
    }

    .footer__list {
        flex-direction: column;
        row-gap: 0.75rem;
    }

    .scrollup {
        right: 1rem;
    }
}

/* For Extra Small Devices */
@media screen and (max-width: 350px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }

    .home__handle {
        width: 180px;
        height: 180px;
    }

    .skills__content {
        padding: 1rem;
    }
}
