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

/* ==================== VARIABLES CSS ==================== */
:root {
    /* Colors for Light Mode */
    --hue-color: 230;
    --primary-color: hsl(var(--hue-color), 69%, 61%);
    --primary-color-alt: hsl(var(--hue-color), 57%, 53%);
    --title-color: hsl(var(--hue-color), 8%, 15%);
    --text-color: hsl(var(--hue-color), 8%, 45%);
    --input-color: hsl(var(--hue-color), 70%, 96%);
    --body-color: hsl(var(--hue-color), 60%, 99%);
    --container-color: #FFF;
    --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 80%);
    --bg-overlay-color: rgba(255, 255, 255, 0.7);

    /* Font and typography */
    --body-font: 'Poppins', sans-serif;
    --title-font: 'Playfair Display', serif;
    --big-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: .875rem;
}

/* ==================== DARK THEME VARIABLES ==================== */
html[data-theme='dark'] {
    --title-color: hsl(var(--hue-color), 8%, 95%);
    --text-color: hsl(var(--hue-color), 8%, 75%);
    --input-color: hsl(var(--hue-color), 29%, 16%);
    --body-color: hsl(var(--hue-color), 28%, 12%);
    --container-color: hsl(var(--hue-color), 29%, 16%);
    --scroll-bar-color: hsl(var(--hue-color), 12%, 48%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 36%);
    --bg-overlay-color: rgba(18, 18, 18, 0.6);
}

/* ==================== 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-image: linear-gradient(var(--bg-overlay-color), var(--bg-overlay-color)), url('assets/BG.JPG');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color 0.4s, color 0.4s;
}

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

h1 {
    font-family: var(--title-font);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

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

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

.section__title {
    font-size: var(--h1-font-size);
    text-align: center;
    font-family: var(--title-font);
}

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

.container {
    max-width: 968px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--body-color);
    box-shadow: 0 1px 4px hsla(0, 4%, 15%, .1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 4rem;
    transition: background-color 0.4s;
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--title-font);
}

.header__logo .dot {
    color: var(--primary-color);
}

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

.nav__link {
    font-weight: 500;
    transition: color .3s, filter .3s;
}

.nav__link:hover,
.nav__link.active-link {
    color: var(--primary-color);
    filter: brightness(1.2) drop-shadow(0 0 5px hsla(var(--hue-color), 69%, 61%, 0.5));
}

.theme-toggle {
    font-size: 1.25rem;
    color: var(--title-color);
    cursor: pointer;
    transition: color .3s;
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.header__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 102;
}

/* Add gap between theme toggle and hamburger for mobile */
@media screen and (max-width: 992px) {
    .header__right {
        gap: 1.5rem;
    }
}

.hamburger {
    display: none;
}

@media screen and (max-width: 992px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        width: 32px;
        height: 32px;
        margin-left: 8px;
    }

    .hamburger span {
        display: block;
        width: 24px;
        height: 3px;
        background: var(--title-color);
        margin: 3px 0;
        border-radius: 2px;
        transition: background 0.3s;
    }
}

/* Mobile Nav Close Button */
.mobile-nav__header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
}

.mobile-nav__close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-nav__close:hover {
    color: var(--primary-color);
}

/* ==================== HOME ==================== */
.home {
    padding-top: 8rem;
}

.home__container {
    grid-template-columns: 1.5fr 0.5fr;
    align-items: center;
    gap: 2rem;
}

.home__content {
    text-align: left;
}

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

.home__name {
    font-size: var(--big-font-size);
    margin: 0.5rem 0;
    color: var(--primary-color);
}

h2.home__profession-title {
    font-size: var(--h2-font-size);
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.dynamic-text-container {
    min-height: 3rem;
    font-size: var(--h2-font-size);
    font-weight: 600;
}

.dynamic-text {
    color: var(--primary-color-alt);
    animation: textColorCycle 12s linear infinite;
}

@keyframes textColorCycle {
    0% {
        color: hsl(250, 69%, 61%);
    }

    25% {
        color: hsl(150, 69%, 61%);
    }

    50% {
        color: hsl(340, 69%, 61%);
    }

    75% {
        color: hsl(40, 69%, 61%);
    }

    100% {
        color: hsl(250, 69%, 61%);
    }
}

.home__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.button__wrapper {
    position: relative;
    padding: 3px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.button__wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    z-index: 1;
    background: conic-gradient(from 0deg,
            hsl(360, 100%, 50%),
            hsl(315, 100%, 50%),
            hsl(270, 100%, 50%),
            hsl(225, 100%, 50%),
            hsl(180, 100%, 50%),
            hsl(135, 100%, 50%),
            hsl(90, 100%, 50%),
            hsl(45, 100%, 50%),
            hsl(0, 100%, 50%));
    animation: rotate-rgb 4s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes rotate-rgb {
    to {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--body-color);
    color: var(--title-color);
    padding: 1rem 1.5rem;
    border-radius: 0.6rem;
    font-weight: 600;
    transition: background-color 0.4s, color 0.4s, transform .3s;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.button:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
}

.button span,
.button i {
    transition: color 0.3s;
}

.button:hover span,
.button:hover i {
    color: var(--primary-color);
}


.home__image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid var(--container-color);
    box-shadow: 0 10px 30px hsla(var(--hue-color), 20%, 50%, 0.2);
    margin: 0 auto;
}

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

/* ==================== ABOUT & CAREER ==================== */
.about__container {
    grid-template-columns: 0.8fr 1fr;
    align-items: center;
    gap: 3rem;
}

.about__image img {
    border-radius: 1rem;
    box-shadow: 0 10px 30px hsla(0, 0%, 0%, 0.1);
}

.about__description {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.career__timeline {
    position: relative;
}

.career__item {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    position: relative;
}

.career__item::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid var(--body-color);
}

.career__item::after {
    content: '';
    position: absolute;
    left: 0.7rem;
    top: 1rem;
    bottom: -1.5rem;
    width: 2px;
    background-color: var(--primary-color-alt);
    opacity: 0.3;
}

.career__item:last-child::after {
    display: none;
}

.career__item h3 {
    font-size: var(--h3-font-size);
    margin-bottom: 0.25rem;
}

.career__item h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.career__item p {
    font-size: var(--small-font-size);
}

/* ==================== SERVICES ==================== */
.services__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service__card {
    background-color: var(--container-color);
    padding: 2.5rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 8px hsla(0, 0%, 0%, 0.05);
    transition: transform .3s, box-shadow .3s;
}

.service__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px hsla(var(--hue-color), 40%, 28%, 0.15);
}

.service__card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service__card h3 {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}

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

.skills__content {
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 8px hsla(0, 0%, 0%, 0.05);
}

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

.skills__title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.skills__list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skills__list li {
    background-color: var(--input-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    color: var(--title-color);
}

.skills__list li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* ==================== CERTIFICATIONS ==================== */
.certifications__container {
    display: grid;
    gap: 2rem;
}

.certification__card {
    background-color: var(--container-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 8px hsla(0, 0%, 0%, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform .3s, box-shadow .3s;
}

.certification__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px hsla(var(--hue-color), 40%, 28%, 0.1);
}

.header__center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.certification__logo {
    flex-shrink: 0;
}

.certification__logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.certification__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.25rem;
}

.certification__issuer {
    font-size: var(--normal-font-size);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.certification__status {
    font-size: var(--small-font-size);
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.certification__link {
    font-size: var(--small-font-size);
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.certification__link i {
    transition: transform .3s;
}

.certification__link:hover i {
    transform: translateX(3px);
}

/* ==================== LEARNING JOURNEY ==================== */
.learning__container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Space between each resource line */
}

.learning__category {
    font-size: var(--h3-font-size);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    /* Adds space above the "Networking" title */
    margin-bottom: 1rem;
}

.learning__category:first-of-type {
    margin-top: 0;
    /* Removes extra space above "Programming" title */
}

.learning__category i {
    color: var(--primary-color);
}

.learning__resource {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--input-color);
}

.learning__resource:last-child {
    border-bottom: none;
}

.learning__resource img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.learning__resource .resource__text {
    flex-grow: 1;
    text-align: center;
    /* Align text to the center */
}

.learning__resource .resource__text h4 {
    font-size: var(--normal-font-size);
    margin-bottom: 0.15rem;
    color: var(--title-color);
}

.learning__resource .resource__text p {
    font-size: var(--small-font-size);
    color: var(--text-color);
}

/* ==================== LEARNING JOURNEY ANIMATION ==================== */
.learning__container .animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.8s ease-out;
}

/* Animate odd rows (1st, 3rd, 5th, etc.) from the LEFT */
.learning__container .animate-on-scroll:nth-child(odd) {
    transform: translateX(-100px);
}

/* Animate even rows (2nd, 4th, etc.) from the RIGHT */
.learning__container .animate-on-scroll:nth-child(even) {
    transform: translateX(100px);
}

/* When the element is visible, bring it to its final position */
.learning__container .animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateX(0);
}

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

.project__card {
    background-color: var(--container-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 16px hsla(0, 0%, 0%, 0.1);
    transition: transform .3s;
}

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

.project__card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project__data {
    padding: 1.5rem;
}

.project__data h3 {
    margin-bottom: 0.5rem;
}

.project__link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
    margin-top: 1rem;
}

.project__link i {
    transition: transform .3s;
}

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

/* ==================== PROJECT VIEW MORE ==================== */
.project-hidden {
    display: none;
}

.projects__view-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

#view-more-projects.expanded i {
    transform: rotate(180deg);
}

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

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

.contact__item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact__item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact__item h3 {
    font-size: var(--normal-font-size);
    margin-bottom: 0.25rem;
}

.contact__item a,
.contact__item span {
    font-size: var(--small-font-size);
}

.contact__socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact__socials a {
    font-size: 1.5rem;
    transition: color .3s, transform .3s;
}

.contact__socials a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.contact__input {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--input-color);
    background-color: var(--input-color);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color .3s;
}

.contact__input:focus {
    border-color: var(--primary-color);
}

textarea.contact__input {
    resize: vertical;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--container-color);
    padding-top: 1rem;
}

.footer__container {
    display: grid;
    /* Create 3 columns: Left (1.5fr), Center (1fr), Right (1.5fr) */
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--input-color);
}

.footer__logo {
    font-size: var(--h3-font-size);
    font-family: var(--title-font);
    color: var(--primary-color);
    /* Restored the primary color */
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer__description {
    font-size: var(--small-font-size);
    line-height: 1.6;
}

.footer__content-center {
    text-align: center;
}

.footer__title {
    font-size: var(--normal-font-size);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    font-size: var(--small-font-size);
    transition: color 0.3s, padding-left 0.3s;
}

.footer__link:hover {
    color: var(--primary-color);
    padding-left: 0.25rem;
}

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

.footer__social-link {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: color .3s, transform .3s;
}

.footer__social-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer__links-container {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

.footer__copy {
    text-align: center;
    padding: 1.5rem 0;
    font-size: var(--small-font-size);
    background-color: var(--input-color);
}

/* Responsive Media Queries for Footer */
@media screen and (max-width: 992px) {
    .header {
        padding: 0 1.5rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 4rem;
    }

    .header__left {
        min-width: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .header__center {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header__right {
        min-width: unset;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        justify-content: flex-end;
        position: relative;
        z-index: 102;
    }

    .theme-toggle {
        display: block;
        font-size: 1.25rem;
        color: var(--title-color);
        cursor: pointer;
        transition: color .3s;
        margin-right: 0;
    }

    .hamburger {
        display: block;
        position: relative;
        width: 2rem;
        height: 2rem;
        cursor: pointer;
        z-index: 103;
        margin-left: 0;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--title-color);
        margin: 6px 0;
        border-radius: 2px;
        transition: 0.4s;
    }
}

/* ==================== ANIMATIONS ON SCROLL ==================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible,
.animate-zoom-in.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}


/* ==================== MEDIA QUERIES for Responsiveness ==================== */
@media screen and (max-width: 992px) {
    .container {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .home__container,
    .about__container,
    .contact__container,
    .projects__container,
    .learning__container {
        grid-template-columns: 1fr;
    }

    .home__image {
        order: -1;
        margin-bottom: 2rem;
        width: 250px;
        height: 250px;
    }

    .about__container {
        gap: 1rem;
    }

    .contact__container {
        row-gap: 3rem;
    }

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

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__socials {
        justify-content: center;
        margin-top: 1rem;
    }

    .footer__links-container {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: var(--small-font-size);
    }

    .section {
        padding: 4rem 0 1rem;
    }

    .header {
        padding: 0 1.5rem;
    }

    .nav {
        display: none;
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 2rem;
        height: 2rem;
        cursor: pointer;
        z-index: 101;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--title-color);
        margin: 6px 0;
        border-radius: 2px;
        transition: 0.4s;
    }

    .header__right {
        position: relative;
        z-index: 102;
    }

    .mobile-nav__close {
        position: absolute;
        top: 1.2rem;
        right: 1.5rem;
        background: none;
        border: none;
        font-size: 2rem;
        color: var(--title-color);
        cursor: pointer;
        z-index: 201;
        transition: color 0.3s;
    }

    .mobile-nav__close:hover {
        color: var(--primary-color);
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--body-color);
        z-index: 200;
        padding-top: 5rem;
        align-items: center;
        transition: transform 0.3s ease;
        transform: translateY(-100%);
    }

    .mobile-nav.open {
        transform: translateY(0);
    }

    .mobile-nav__list {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        align-items: center;
    }

    .mobile-nav__link {
        font-size: 1.25rem;
        color: var(--title-color);
        font-weight: 600;
        text-decoration: none;
        transition: color 0.3s;
    }

    .mobile-nav__link.active-link,
    .mobile-nav__link:hover {
        color: var(--primary-color);
    }

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

    .footer__links-container {
        flex-direction: column;
        text-align: center;
    }
}