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

/* ==================== VARIABLES ==================== */
:root {
    /* Colors - Midnight Theme (Default Dark) */
    --hue-color: 250;
    /* Purple-ish Blue */
    --first-color: hsl(var(--hue-color), 69%, 61%);
    --first-color-second: hsl(var(--hue-color), 69%, 61%);
    --first-color-alt: hsl(var(--hue-color), 57%, 53%);
    --first-color-lighter: hsl(var(--hue-color), 92%, 85%);
    --title-color: hsl(var(--hue-color), 8%, 95%);
    --text-color: hsl(var(--hue-color), 8%, 75%);
    --text-color-light: hsl(var(--hue-color), 8%, 65%);
    --input-color: hsl(var(--hue-color), 29%, 16%);
    --body-color: hsl(var(--hue-color), 28%, 12%);
    /* Deep Midnight Blue */
    --container-color: hsl(var(--hue-color), 29%, 16%);
    /* Slightly lighter for cards */
    --scroll-bar-color: hsl(var(--hue-color), 12%, 48%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 36%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    /* Glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);

    /* Fonts */
    --body-font: 'Outfit', sans-serif;
    --heading-font: 'Space Grotesk', sans-serif;

    /* Font Sizes */
    --big-font-size: 3.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;

    /* Weights */
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /* Layout */
    --header-height: 3.5rem;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* Light Theme Variables */
body.light-theme {
    --title-color: hsl(var(--hue-color), 15%, 15%);
    --text-color: hsl(var(--hue-color), 12%, 35%);
    --text-color-light: hsl(var(--hue-color), 10%, 55%);
    --input-color: hsl(var(--hue-color), 10%, 96%);
    --body-color: hsl(var(--hue-color), 30%, 98%);
    --container-color: rgba(255, 255, 255, 0.85);
    --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 70%);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 40px -10px rgba(31, 38, 135, 0.1);
    --hover-shadow: 0 15px 45px -10px rgba(31, 38, 135, 0.2);
}

/* Responsive Typography */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 5rem;
        /* Larger Hero Text */
        --h1-font-size: 3rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: 1rem;
        --smaller-font-size: 0.875rem;
    }
}

/* ==================== 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: background-color .4s, color .4s;
    /* Smooth transition for theme switch */
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

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

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1600px;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

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

.main {
    overflow: hidden;
    /* Prevent horizontal scroll */
}

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

.section__title {
    font-size: var(--h1-font-size);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section__subtitle {
    display: block;
    text-align: center;
    font-size: var(--small-font-size);
    margin-bottom: 1rem;
    color: var(--first-color);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--container-color);
    backdrop-filter: blur(10px);
    /* Glass */
    border-top: 1px solid var(--glass-border);
    transition: .4s;
}

/* Desktop Header moves to top */
@media screen and (min-width: 768px) {
    .header {
        top: 0;
        bottom: initial;
        padding: 0 1rem;
        background-color: rgba(var(--body-color), 0.8);
        /* Use variable properly if converted to rgb */
        /* Fallback for now since vars are hsl */
        background-color: var(--body-color);
        border-bottom: 1px solid var(--glass-border);
        border-top: none;
    }
}

.nav {
    max-width: 1200px;
    /* Wider container for header */
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.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.5rem;
    /* Larger touch target */
    cursor: pointer;
}

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

.nav__menu {
    position: fixed;
    bottom: -100%;
    /* Hidden by default */
    left: 0;
    width: 100%;
    background-color: var(--container-color);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .15);
    border-radius: 1.5rem 1.5rem 0 0;
    transition: .3s;
    z-index: var(--z-fixed);
}

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

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

.show-menu {
    bottom: 0;
    border-top: 1px solid var(--first-color);
}

/* ==================== HERO SECTION (First Screen Compatible) ==================== */
.hero {
    min-height: 100vh;
    /* Takes full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 4rem;
    /* Compensate for header on desktop */
}

/* Tech Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 25%);
    pointer-events: none;
    transition: transform 0.1s ease-out;
    /* Parallax smooth */
}

/* Floating Shapes */
.parallax-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s ease-in-out infinite alternate;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-40px) scale(1.1);
    }
}

.hero__container {
    gap: 2rem;
    z-index: 1;
    /* Above particles */
}

.hero__content {
    text-align: center;
}

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

.hero__title {
    font-size: var(--big-font-size);
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--title-color), var(--first-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__typing {
    font-size: var(--h2-font-size);
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', monospace;
}

.hero__description {
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    transition: .3s;
    cursor: pointer;
}

.button--primary {
    background-color: var(--first-color);
    color: #fff;
}

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

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

.button--outline:hover {
    background-color: var(--first-color);
    color: #fff;
    transform: translateY(-3px);
}

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

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

/* ==================== GLASS CARDS ==================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: .3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--first-color);
    box-shadow: var(--hover-shadow);
}

/* ==================== EXPERIENCE (Timeline) ==================== */
.experience__container {
    gap: 2rem;
}

.experience__item {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--first-color-alt);
    margin-bottom: 2rem;
}

.experience__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.56rem;
    /* Center on line */
    width: 1rem;
    height: 1rem;
    background-color: var(--first-color);
    border-radius: 50%;
    border: 2px solid var(--body-color);
}

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

.experience__company {
    display: block;
    color: var(--first-color);
    font-weight: var(--font-medium);
    margin-bottom: 0.5rem;
}

.experience__date {
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.experience__list {
    margin-left: 1rem;
    list-style: disc;
    margin-bottom: 1rem;
}

.experience__list li {
    margin-bottom: 0.5rem;
}

.experience__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience__tags span {
    font-size: var(--smaller-font-size);
    background-color: var(--container-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
}

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

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--first-color);
}

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

.skill-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: var(--container-color);
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    transition: .3s;
}

.skill-badge:hover {
    transform: translateY(-5px);
    border-color: var(--first-color);
    background: var(--glass-bg);
}

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

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

/* ==================== CERTIFICATIONS ==================== */
.certifications__container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cert__card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.cert__icon-box {
    font-size: 2rem;
    color: var(--first-color);
    margin-bottom: 1rem;
}

.cert__title {
    font-size: var(--normal-font-size);
    margin-bottom: 0.5rem;
}

.cert__issuer {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}

.cert__date {
    font-size: var(--smaller-font-size);
    display: block;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.cert__id {
    font-size: --smaller-font-size;
    font-family: monospace;
    color: var(--first-color);
}

.cert__expand {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: .3s;
}

.cert__card:hover .cert__expand {
    opacity: 1;
    color: var(--first-color);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .85);
    z-index: var(--z-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
}

.show-modal {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    position: relative;
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
}

.modal__body img,
.modal__body iframe {
    width: 100%;
    border-radius: 0.5rem;
    height: auto;
    min-height: 400px;
}

/* ==================== RECOMMENDATIONS ==================== */
.recommendations__container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2rem;
    gap: 2rem;
    scroll-snap-type: x mandatory;
}

.recommendation__card {
    min-width: 300px;
    /* Force flexible width */
    flex: 0 0 300px;
    scroll-snap-align: center;
}

.recommendation__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recommendation__avatar {
    font-size: 3rem;
    color: var(--first-color);
}

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

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

.recommendation__text {
    font-style: italic;
    font-size: var(--small-font-size);
}

/* ==================== CONTACT ==================== */
.contact__container {
    justify-content: center;
}

.contact__content {
    width: 100%;
    max-width: 600px;
}

.contact__card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact__card-icon {
    font-size: 2.5rem;
    color: var(--first-color);
}

.contact__button {
    margin-left: auto;
    color: var(--first-color);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--container-color);
    padding: 2rem 0 6rem;
    /* Extra padding for mobile nav */
    text-align: center;
    margin-top: 4rem;
}

.footer__title {
    font-size: var(--h2-font-size);
    margin-bottom: 0.5rem;
}

.footer__subtitle {
    display: block;
    margin-bottom: 2rem;
}

.footer__social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

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

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

/* For medium devices */
@media screen and (min-width: 568px) {
    .skills__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .recommendation__card {
        min-width: 400px;
        flex: 0 0 400px;
    }
}

@media screen and (min-width: 768px) {
    .nav {
        height: calc(var(--header-height) + 1.5rem);
        column-gap: 1rem;
    }

    .nav__menu {
        position: initial;
        width: initial;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

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

    .nav__link {
        flex-direction: row;
        font-size: var(--normal-font-size);
        text-transform: capitalize;
        /* Cleaner look */
    }

    .nav__close,
    .nav__toggle {
        display: none;
    }

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

    .hero__content {
        text-align: left;
    }

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

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

    .experience__item::before {
        left: -2.5rem;
        /* Adjust for larger padding if needed, keep logic consistent */
    }

    .footer {
        padding: 3rem 0;
        /* Normal padding for desktop */
    }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    .certifications__container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media screen and (min-width: 1600px) {
    .hero__title {
        font-size: 6rem;
    }

    .hero__description {
        font-size: 1.25rem;
        max-width: 800px;
    }
}