/* ==================== GOOGLE FONTS ==================== */
/* Imported in HTML via <link> */

/* ==================== CSS VARIABLES ==================== */
:root {
    --header-height: 3.5rem; /* Adjust as needed */

    /* ========== Colors ========== */
    --hue: 200; /* Example: Blue-ish */
    --first-color: hsl(var(--hue), 69%, 61%);
    --first-color-alt: hsl(var(--hue), 57%, 53%);
    --first-color-lighter: hsl(var(--hue), 92%, 85%);
    --title-color: hsl(var(--hue), 8%, 95%); /* Keep titles bright */
    --text-color: hsl(var(--hue), 8%, 85%); /* Slightly brighter text */
    --text-color-light: hsl(var(--hue), 8%, 70%); /* Brighter light text */
    --input-color: hsla(var(--hue), 29%, 16%, 0.5); /* Slightly transparent inputs */

    /* Corrected: Body color is now a solid dark background again */
    --body-background-color: hsl(var(--hue), 28%, 12%); /* Solid dark background */

    /* Glassmorphism & Background Adjustments */
    /* Base background color for glass effect (with alpha for transparency) */
    /* Adjust HUE, saturation, lightness, and ALPHA (last value, 0.0 to 1.0) */
    --glass-bg-color: hsla(var(--hue), 28%, 16%, 0.7); /* Example: 70% opacity dark */
    --glass-blur: 15px; /* Increased Blur intensity */
    --glass-border-color: hsla(var(--hue), 15%, 85%, 0.15); /* Slightly more visible border */

    /* Containers use the glass background */
    --container-color: var(--glass-bg-color);

    /* Scrollbar colors - semi-transparent */
    --scroll-bar-color: hsla(var(--hue), 12%, 30%, 0.5);
    --scroll-thumb-color: hsla(var(--hue), 12%, 60%, 0.7);


    /* ========== Font and Typography ========== */
    --body-font: 'Poppins', sans-serif;
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2rem;
    --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-normal: 400;
    --font-semi-bold: 600;
    --font-bold: 700;

    /* ========== Margins Bottom ========== */
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75: .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 (min-width: 968px) {
    :root {
        --biggest-font-size: 4rem;
        --h1-font-size: 2.5rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.1rem;
        --small-font-size: .938rem;
        --smaller-font-size: .875rem;
    }
}

/* ==================== BASE ==================== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    /* Set the solid dark background color on the body */
    background-color: var(--body-background-color);
    color: var(--text-color);
    /* overflow: hidden; <- Only use if you don't want scrolling at all */
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--first-color);
}

a:hover {
    color: var(--first-color-alt);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* ==================== STARFIELD BACKGROUND ==================== */
#starfield-canvas {
    position: fixed; /* Stick to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Cover entire viewport height */
    z-index: -1;  /* IMPORTANT: Place it behind all other content */
    overflow: hidden; /* Prevent scrollbars on the canvas itself */
    /* Background color and opacity handled by Three.js renderer settings */
}


/* ==================== REUSABLE CSS CLASSES ==================== */
.section {
    padding: 6rem 0 2rem;
    position: relative; /* Ensure sections stack correctly */
    z-index: 1; /* Keep content above the background canvas */
}

.section__title {
    font-size: var(--h1-font-size);
    font-family: "Playwrite AU SA", "cursive"; /* Custom font for titles */
    color: var(--title-color);
    text-align: center;
    margin-bottom: var(--mb-0-5);
    /* text-shadow: 0 1px 3px hsla(0, 0%, 0%, 0.5); Optional subtle shadow */
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-align: center;
    margin-bottom: var(--mb-3);
}

/* ==================== LAYOUT ==================== */
.container {
    max-width: 968px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.main {
    position: relative;
    z-index: 1; /* Keep main content above background */
}

/* ==================== GLASSMORPHISM STYLES ==================== */
/* Apply these styles to individual card elements */
.glassmorphic-card {
    background-color: var(--glass-bg-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur)); /* Safari support */
    border: 1px solid var(--glass-border-color);
    box-shadow: 0 4px 20px hsla(0, 0%, 0%, 0.2);
    border-radius: 1rem;
    padding: 1.5rem; /* Default padding for cards */
}

/* Styles for Header and Footer specifically */
.glassmorphic-header {
    background-color: hsla(var(--hue), 28%, 16%, 0.85); /* Slightly more opaque header */
    backdrop-filter: blur(var(--glass-blur)); /* Use main blur variable */
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: none;
    border-bottom: 1px solid var(--glass-border-color);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.3);
    border-radius: 0;
    padding: 0; /* Padding is handled by the nav container */
}

.glassmorphic-footer {
    background-color: var(--glass-bg-color); /* Footer uses card background */
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: none;
    border-top: 1px solid var(--glass-border-color);
    box-shadow: 0 -2px 8px hsla(0, 0%, 0%, 0.2); /* Shadow on top */
    border-radius: 0;
    padding: 3rem 0 2rem; /* Footer padding */
    margin-top: 4rem;
}

/* Ensure original background colors are overridden */
.header { background-color: transparent !important; }
.footer { background-color: transparent !important; }
/* Container color was set in :root */


/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    transition: background-color 0.3s, box-shadow 0.3s;
    /* Glassmorphic styles applied via .glassmorphic-header */
}

/* Add shadow to header on scroll (can enhance visibility) */
.scroll-header {
     box-shadow: 0 3px 10px hsla(var(--hue), 50%, 5%, .4); /* Stronger shadow on scroll */
}

/* ==================== NAV ==================== */
.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Container padding applies here */
}

.nav__logo,
.nav__toggle,
.nav__close {
    color: var(--title-color);
    cursor: pointer;
}

.nav__logo {
    font-weight: var(--font-semi-bold);
    font-family: "Playwrite AU SA", "cursive";
    font-size: 1.5rem;
    white-space: nowrap; /* Prevent text from wrapping to multiple lines */
    display: inline-block; /* Keep as inline-block for better control */
    line-height: 1; /* Reduce line height to minimize vertical space */
}

.nav__toggle {
    font-size: 1.2rem;
}

.nav__icon {
    margin-right: var(--mb-0-5);
    font-size: 1.1em;
    vertical-align: middle; /* Align icon nicely with text */
}

/* Mobile menu styles */
@media screen and (max-width: 767px) {
    /* Center the logo on mobile */
    .nav {
        justify-content: center;
        position: relative;
    }
    
    .nav__logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.3rem; /* Slightly smaller on mobile */
    }
    
    .nav__toggle {
        position: absolute;
        right: 1.5rem; /* Keep toggle button on the right */
    }
    
    /* body{
        background-color: hsl(var(--hue), 28%, 12%,0.5); /* Solid dark background */
  /*  } */
    .nav__menu {
        position: fixed;
        /* Apply glass effect to mobile menu */
        background-color: hsla(var(--hue), 28%, 16%, 0.9); /* Quite opaque */
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        border-left: 1px solid var(--glass-border-color);
        box-shadow: -4px 0 15px hsla(0, 0%, 0%, 0.3);
        width: 80%;
        height: 100%;
        top: 0;
        right: -100%;
        padding: 4rem 2rem 0;
        transition: right 0.4s ease-in-out;
        z-index: var(--z-fixed);
    }
}

/* Show menu */
.show-menu {
    right: 0;
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    transition: color 0.3s;
    position: relative;
    display: inline-flex; /* Align icon and text */
    align-items: center;
}

.nav__link:hover {
    color: var(--first-color);
}

.active-link {
    color: var(--first-color);
}

.active-link::before {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--first-color);
}


.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    color: var(--first-color);
}

/* ==================== HOME / HERO SECTION ==================== */
.home__container {
    padding-top: 2rem;
    row-gap: 3.5rem;
    align-items: center;
}

.home__content {
    text-align: center;
}

.home__greeting {
    font-size: var(--small-font-size);
    font-weight: var(--font-normal);
    color: var(--text-color);
    display: block;
    margin-bottom: var(--mb-0-25);
    font-family: "Playwrite AU SA", "cursive";
}

.home__name {
    margin-bottom: var(--mb-0-5);
    font-family: "Playwrite AU SA", "cursive"; 
    font-weight: bolder; 
    font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive font sizing */
    text-shadow: 0 1px 3px hsla(0, 0%, 0%, 0.5);
    letter-spacing: -0.05em; /* Negative letter spacing to make letters hover/overlap */
    word-spacing: 0.3em; /* Add extra space gap between "Hoang Nhan Le" and "(Jimmy Le)" */
}

.home__education {
    font-size: var(--h2-font-size);
    color: var(--text-color);
    font-weight: var(--font-semi-bold);
    margin-bottom: var(--mb-1);
}

.home__description {
    margin-bottom: var(--mb-2);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Home Image/Picture Styles */
.home__image-container {
    /* Layout for the image container within the grid */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem; /* Add some padding around the picture */
}

.home__image-wrapper {
    /* Styles for the clickable area around the image */
    width: 250px; /* Set a size for the image container */
    height: 250px; /* Make it square */
    border-radius: 1rem; /* Corner rounding */
    overflow: hidden; /* Hide image parts outside the border-radius */
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid var(--first-color); /* Add a border */
    box-shadow: 0 4px 10px hsla(var(--hue), 28%, 8%, 0.2);
}

.home__image-wrapper:hover {
     transform: translateY(-5px);
     box-shadow: 0 8px 15px hsla(var(--hue), 28%, 8%, 0.3);
}


.home__img {
    /* Styles for the image itself inside the wrapper */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container while maintaining aspect ratio */
    display: block; /* Remove extra space below image */
    /* Image Protection */
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* Prevent direct interaction with image */
    -webkit-user-drag: none; /* Prevent dragging */
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Protection overlay for home image - blocks right-click and interaction */
.home-image-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Above image */
    background: transparent;
    cursor: pointer; /* Keep pointer cursor for clickability */
    pointer-events: auto; /* Capture all interactions */
}


/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    background-color: var(--first-color);
    color: #FFF;
    padding: 1rem 1.75rem;
    border-radius: .5rem;
    font-weight: var(--font-semi-bold);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    text-align: center;
    border: 1px solid transparent; /* Base border */
    box-shadow: 0 2px 5px hsla(0, 0%, 0%, 0.3);
}

.button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
    color: #FFF;
    box-shadow: 0 4px 8px hsla(0, 0%, 0%, 0.4);
}

.button__icon {
    margin-left: var(--mb-0-5);
    transition: transform .3s;
}

.button--flex {
    display: inline-flex;
    align-items: center;
}

.button--small {
    padding: 0.75rem 1rem;
}

.button--link {
    padding: 0;
    background-color: transparent;
    color: var(--first-color);
    box-shadow: none;
}

.button--link:hover {
    background-color: transparent;
    color: var(--first-color-alt);
    transform: none;
    box-shadow: none;
}

/* ==================== ABOUT SECTION ==================== */
.bruh{transition: 0.6s ;display: block; margin: auto; width: 78px; height: auto;} 

.bruh:hover{transition: 0.6s ;display: block; margin: auto; width: 88px; height: auto;}
.about__container {
    row-gap: 2.5rem;
    align-items: center;
}

.about__data { /* Applies glassmorphic styles */
    text-align: center;
}

.about__description {
    margin-bottom: var(--mb-2-5);
}

.about__info {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: var(--mb-2-5);
    gap: 1rem; /* Add gap */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.about__info > div { /* Target the divs inside about__info */
     text-align: center; /* Center text within each stat block */
}


.about__info-title {
    display: block;
    font-size: var(--h2-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
    margin-bottom: var(--mb-0-5);
}
.about__info-title2 {
    transition: 0.6s;
    display: block;
    font-size: var(--h2-font-size);
    flex-grow: 1;
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
    margin-bottom: var(--mb-0-5);
    text-align: center;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    opacity: 90%;
}
.about__info-title22 {
    transition: 0.6s ;display: block; margin: auto; width: 60px; height: auto;
}
.about__info-title22:hover {
display: block; margin: auto; width: 70px; height: auto;
}

.about__info-name {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    
}

.about__info-name2 {
    transition: 0.6s;
    font-size: var(--smaller-font-size);
    color: white;
}
.about__info-name2:hover {
    font-size: var(--smaller-font-size)+ 10px;
    color: var(--first-color);
}


.about__buttons {
    display: flex;
    justify-content: center;
}

/* ==================== INTERESTS SECTION ==================== */
.interests__container {
    display: flex; /* Use flexbox */
    justify-content: center; /* Center the card */
    /* gap handled by container default grid/flex gap */
}

.interests__card { /* Applies glassmorphic styles */
    max-width: 500px; /* Limit card width for readability */
    width: 100%; /* Take full width up to max-width */
    text-align: center; /* Center contents */
    /* Padding applied by glassmorphic-card */
}

.interests__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
    color: var(--title-color);
}

.interests__list {
    /* remove default list styling */
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allow interests to wrap */
    justify-content: center; /* Center list items */
    gap: 1rem; /* Space between items */
}

.interests__list li {
    font-size: var(--normal-font-size);
    color: var(--text-color);
    /* Add some padding/margin if needed */
}


/* ==================== EXPERIENCE SECTION ==================== */
.experience__container {
    max-width: 768px;
}

.experience__timeline {
    position: relative;
    padding-left: 3rem;
    margin-left: 1rem;
}

.experience__timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--first-color-alt);
}

.timeline__item {
    position: relative;
    margin-bottom: var(--mb-2-5);
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: 0.75rem; /* Position over the line */
    top: 0.9rem; /* Adjust vertical alignment */
    width: 12px;
    height: 12px;
    background-color: var(--first-color);
    border-radius: 50%;
    border: 2px solid var(--body-background-color); /* Border matching body background */
    z-index: 1;
}

.timeline__content { /* Applies glassmorphic styles, default padding 1.5rem */
    /* Override padding for timeline item */
    padding: var(--mb-1-5);
}

.timeline__title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    margin-bottom: var(--mb-0-25);
}

.timeline__company {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-0-25);
}

.timeline__date {
    display: block;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-1);
}

.timeline__duties {
    font-size: var(--small-font-size);
    padding-left: 1.2rem;
}

.timeline__duties li {
    margin-bottom: var(--mb-0-5);
    position: relative;
    list-style-type: disc;
    color: var(--text-color);
}

/* ==================== PROJECTS SECTION ==================== */
.projects__container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project__card { /* Applies glassmorphic styles, default padding 1.5rem */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px hsla(0, 0%, 0%, 0.3); /* Enhanced shadow on hover */
}

.project__data {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-75);
}
.project__title2 {
    font-size: var(--h3-font-size);
}

.project__description {
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-1);
    flex-grow: 1;
}

.project__stack {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-1-5);
    font-style: italic;
}

.project__links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project__button {
    font-size: var(--small-font-size);
}

/* ==================== SKILLS SECTION ==================== */
.skills__container {
    /* Changed to flexbox for centering */
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center items horizontally */
    gap: 2.5rem; /* Space between items */
}

.skills__content { /* Applies glassmorphic styles */
     /* Override padding for skills content */
    padding: 2rem 1.5rem;
    /* Flexbox item properties (optional, but good for centering) */
    /* flex-basis: 300px; */ /* Minimum width */
    /* flex-grow: 1; */ /* Allow to grow */
    max-width: 400px; /* Optional: prevent cards from getting too wide on large screens */
    width: 100%; /* Take full width up to max-width */
}

.skills__title {
    font-size: var(--h3-font-size);
    text-align: center;
    margin-bottom: var(--mb-1-5);
}

.skills__box {
    display: flex;
    justify-content: center; /* Center groups within the card */
    column-gap: 3rem;
    flex-wrap: wrap;
    row-gap: 1rem;
}

.skills__group {
    display: grid;
    align-content: flex-start;
    row-gap: 1rem;
}

.skills__data {
    display: flex;
    align-items: center;
    column-gap: .5rem;
    font-size: var(--small-font-size);
}

.skills__icon {
    font-size: 1rem;
    color: var(--first-color);
}

/* ==================== CONTACT SECTION ==================== */
.contact__container {
    row-gap: 3rem;
}

/* Applied glassmorphic style to the wrapper div */
.contact__container > .glassmorphic-card {
     /* Padding is already set by .glassmorphic-card */
}


.contact__information {
    display: flex;
    align-items: center;
    margin-bottom: var(--mb-2);
    gap: 1rem;
}

.contact__icon {
    font-size: 1.8rem;
    color: var(--first-color);
}

.contact__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-normal);
    margin-bottom: var(--mb-0-25);
}

.contact__subtitle {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* Optional: Contact Form Styling */
.contact__form { /* Apply glassmorphic-card to the form itself if used */
    row-gap: 1.5rem;
}

.contact__inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.contact__content {
    background-color: var(--input-color); /* Uses variable with alpha */
    border-radius: .5rem;
    padding: .75rem 1rem .25rem;
    border: 1px solid var(--glass-border-color); /* Add subtle border */
}

.contact__label {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

.contact__input {
    width: 100%;
    background-color: transparent; /* Input field itself transparent */
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    border: none;
    outline: none;
    padding: .25rem .5rem .5rem 0;
}

textarea.contact__input {
    resize: vertical;
    min-height: 100px;
}

/* ==================== FOOTER ==================== */
.footer { /* Applies glassmorphic styles via .glassmorphic-footer */
    /* Padding handled by glassmorphic-footer */
}

.footer__container {
    text-align: center;
}

.footer__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1);
    font-family: "Playwrite AU SA", "cursive"; /* Custom font for titles */
}

.footer__list {
    display: flex;
    justify-content: center;
    column-gap: 1.5rem;
    margin-bottom: var(--mb-1-5);
    flex-wrap: wrap; /* Allow wrapping */
}

.footer__link {
    color: var(--text-color);
}

.footer__link:hover {
    color: var(--first-color);
}

.footer__social {
    display: flex;
    justify-content: center;
    column-gap: 1.25rem;
    margin-bottom: var(--mb-2);
}

.footer__social-link {
    background-color: hsla(var(--hue), 28%, 16%, 0.7); /* Semi-transparent dark */
    border: 1px solid var(--glass-border-color);
    color: var(--first-color);
    font-size: 1.2rem;
    padding: .5rem;
    border-radius: .5rem;
    display: inline-flex;
    transition: background-color 0.3s, transform 0.2s;
}

.footer__social-link:hover {
    background-color: var(--first-color);
    color: var(--glass-bg-color); /* Use glass background color for text */
    transform: translateY(-2px);
    border-color: transparent;
}

.footer__copy {
    display: block;
    margin-top: 2rem;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

/* ==================== SCROLL UP BUTTON ==================== */
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -30%;
    background-color: hsla(var(--hue), 69%, 61%, 0.8); /* Semi-transparent */
    backdrop-filter: blur(5px); /* Subtle blur */
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid hsla(var(--hue), 15%, 85%, 0.2);
    opacity: .8;
    padding: .3rem .5rem;
    border-radius: .4rem;
    z-index: var(--z-tooltip);
    transition: bottom .4s, opacity .3s, background-color .3s;
}

.scrollup:hover {
    background-color: hsla(var(--hue), 57%, 53%, 0.9); /* Alt color, more opaque */
    opacity: 1;
}

.scrollup__icon {
    font-size: 1.2rem;
    color: #FFF;
}

.show-scroll {
    bottom: 3rem;
}

/* ==================== SCROLL BAR ==================== */
::-webkit-scrollbar {
    width: .60rem;
    background-color: var(--scroll-bar-color);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb-color);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsla(var(--hue), 12%, 70%, 0.9);
}

/* ==================== IMAGE MODAL (POP-UP) ==================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal); /* Ensure it's on top */
    display: flex; /* Use flexbox to center content */
    justify-content: center;
    align-items: center;
    /* Initially hidden */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.show-modal {
    visibility: visible;
    opacity: 1;
}

.image-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsla(0, 0%, 0%, 0.8); /* Dim background */
}

.image-modal__content {
    position: relative;
    z-index: var(--z-modal); /* Ensure content is above overlay */
    background-color: var(--body-background-color); /* Dark background for modal */
    border-radius: 1rem;
    max-width: 90vw; /* Max width relative to viewport */
    max-height: 90vh; /* Max height relative to viewport */
    width: fit-content; /* Shrink to fit image size */
    height: fit-content; /* Shrink to fit image size */
    padding: 1.5rem; /* Padding inside the modal */
    box-shadow: 0 8px 30px hsla(0, 0%, 0%, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Clip animation content within the modal box */
}

/* Image wrapper for animation */
.image-modal__img-wrapper {
    position: relative;
    overflow: hidden; /* Clip sliding images during animation */
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: calc(90vw - 3rem); /* Account for modal padding */
    max-height: calc(90vh - 6rem); /* Account for modal padding and counter */
}

.image-modal__content img {
    display: block;
    max-width: calc(90vw - 3rem); /* Ensure it fits within viewport minus padding */
    max-height: calc(90vh - 6rem); /* Ensure it fits within viewport minus padding and counter */
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Maintain aspect ratio while fitting */
    border-radius: 5px; /* Rounded corners for images */
    /* Image Protection */
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* Prevent direct interaction with image */
    -webkit-user-drag: none; /* Prevent dragging */
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* No transition - instant swap for performance */
.image-modal__img {
    opacity: 1;
}

/* Hide images with empty src to prevent alt text from showing */
.image-modal__img[src=""],
.image-modal__img:not([src]) {
    visibility: hidden;
}

/* Protection overlay - blocks right-click and interaction */
.image-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: calc(var(--z-modal) + 1); /* Above image but below buttons */
    background: transparent;
    cursor: default;
    pointer-events: auto; /* Capture all interactions */
}

/* Ensure navigation buttons are above protection overlay */
.image-modal__nav {
    z-index: calc(var(--z-modal) + 4) !important;
}

.image-modal__close {
    z-index: calc(var(--z-modal) + 4) !important;
}

.image-modal__counter {
    z-index: calc(var(--z-modal) + 4) !important;
}


/* Navigation Buttons */
.image-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: hsla(var(--hue), 28%, 16%, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--first-color);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: calc(var(--z-modal) + 2);
    transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
    border: 1px solid var(--glass-border-color);
    opacity: 0.7;
}

.image-modal__nav:hover {
    background-color: var(--first-color);
    color: #FFF;
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.image-modal__nav:active {
    transform: translateY(-50%) scale(0.95);
}

.image-modal__nav--prev {
    left: 1.5rem;
}

.image-modal__nav--next {
    right: 1.5rem;
}

/* Hide navigation buttons when there's only one image */
.image-modal__nav.hidden {
    display: none;
}

/* Image Counter */
/* Glassmorphic bubble base style */
.image-modal__counter,
.image-modal__description {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Glassmorphic effect */
    background: linear-gradient(
        135deg,
        hsla(var(--hue), 28%, 20%, 0.6) 0%,
        hsla(var(--hue), 28%, 12%, 0.7) 100%
    );
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    z-index: calc(var(--z-modal) + 2);
    border: 1px solid hsla(var(--hue), 50%, 70%, 0.2);
    box-shadow: 
        0 2px 10px hsla(var(--hue), 28%, 8%, 0.3),
        inset 0 1px 0 hsla(255, 255%, 255%, 0.1);
    white-space: nowrap;
}

.image-modal__counter {
    bottom: 0.5rem;
}

/* Image description bubble */
.image-modal__description {
    bottom: 2.2rem;
    font-style: normal;
    max-width: 50%;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    padding: 0.2rem 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: clamp(0.55rem, 1vw, 0.7rem);
    border-radius: 0.4rem;
}

/* Scribble/handwritten text style */
.image-modal__description span {
    font-family: 'Caveat', cursive;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    letter-spacing: 0.02em;
    color: var(--text-color);
    text-shadow: 0 1px 2px hsla(var(--hue), 28%, 8%, 0.3);
}

.image-modal__description.show {
    opacity: 1;
}

.image-modal__description:empty,
.image-modal__description span:empty {
    display: none;
}

.image-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: hsla(var(--hue), 28%, 16%, 0.7); /* Semi-transparent dark */
    color: var(--first-color);
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; /* Round button */
    cursor: pointer;
    z-index: calc(var(--z-modal) + 1); /* Ensure button is on top */
    transition: background-color 0.3s, transform 0.2s;
}

.image-modal__close:hover {
    background-color: var(--first-color);
    color: var(--body-background-color);
    transform: rotate(90deg); /* Rotate on hover */
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .home__name {
        font-size: clamp(1.8rem, 4vw, 2.5rem); /* Smaller on tablets */
        letter-spacing: -0.08em; /* Even tighter letter spacing for overlap */
        word-spacing: 0.25em; /* Slightly less word spacing on tablets */
    }
    
    .image-modal__content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 1rem;
    }
    
    .image-modal__img-wrapper {
        max-width: calc(95vw - 2rem);
        max-height: calc(95vh - 4.5rem);
    }
    
    .image-modal__content img {
        max-width: calc(95vw - 2rem);
        max-height: calc(95vh - 4.5rem);
    }
    
    .image-modal__nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .image-modal__nav--prev {
        left: 0.5rem;
    }
    
    .image-modal__nav--next {
        right: 0.5rem;
    }
    
    .image-modal__counter {
        bottom: 0.4rem;
        font-size: clamp(0.55rem, 1.2vw, 0.65rem);
        padding: 0.2rem 0.4rem;
    }
    
    .image-modal__description {
        bottom: 2rem;
        padding: 0.2rem 0.4rem;
        max-width: 60%;
    }
    
    .image-modal__description span {
        font-size: clamp(0.75rem, 2vw, 0.95rem);
    }
    
    .image-modal__close {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .home__name {
        font-size: clamp(1.5rem, 3.5vw, 2rem); /* Smaller on mobile */
        letter-spacing: -0.1em; /* Maximum tightness for overlap on mobile */
        word-spacing: 0.2em; /* Slightly less word spacing on mobile */
    }
    
    .image-modal__content {
        max-width: 98vw;
        max-height: 98vh;
        padding: 0.75rem;
    }
    
    .image-modal__img-wrapper {
        max-width: calc(98vw - 1.5rem);
        max-height: calc(98vh - 4rem);
    }
    
    .image-modal__content img {
        max-width: calc(98vw - 1.5rem);
        max-height: calc(98vh - 4rem);
    }
    
    .image-modal__nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .image-modal__nav--prev {
        left: 0.25rem;
    }
    
    .image-modal__nav--next {
        right: 0.25rem;
    }
    
    .image-modal__counter {
        bottom: 0.3rem;
        font-size: clamp(0.5rem, 1.5vw, 0.6rem);
        padding: 0.15rem 0.35rem;
    }
    
    .image-modal__description {
        bottom: 1.6rem;
        padding: 0.15rem 0.35rem;
        max-width: 70%;
        border-radius: 0.4rem;
    }
    
    .image-modal__description span {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}


/* ==================== MEDIA QUERIES ==================== */
/* Mobile menu styles */
@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        /* Apply glass effect to mobile menu */
        background-color: hsla(var(--hue), 28%, 16%, 0.95); /* Almost fully opaque */
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        border-left: 1px solid var(--glass-border-color);
        box-shadow: -4px 0 15px hsla(0, 0%, 0%, 0.4); /* Stronger shadow */
        width: 100%; /* Cover the full width */
        height: 100vh; /* Cover the full viewport height */
        top: 0;
        right: -100%; /* Start off-screen */
        padding: 6rem 2rem 2rem; /* More padding top and bottom */
        transition: right 0.4s ease-in-out;
        z-index: var(--z-fixed); /* Ensure it's on top */
        overflow-y: auto; /* Add scrolling if menu content exceeds height */
    }

    /* Show menu */
    .show-menu {
        right: 0;
    }

    .nav__list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem; /* Keep good spacing */
    }

    .nav__link {
         /* Keep existing link styles */
         color: var(--title-color);
         font-weight: var(--font-semi-bold);
         transition: color 0.3s;
         position: relative;
         display: inline-flex;
         align-items: center;
         padding: 0.5rem 0; /* Add some vertical padding to links */
    }

    .nav__icon {
         margin-right: var(--mb-0-75); /* Slightly more space for icons */
         font-size: 1.2em; /* Slightly larger icons */
    }


    .nav__close {
        position: absolute;
        top: 1.5rem; /* Adjust position based on padding */
        right: 1.5rem; /* Adjust position based on padding */
        font-size: 1.8rem; /* Larger close icon */
        color: var(--first-color);
        background-color: hsla(var(--hue), 28%, 16%, 0.8); /* Subtle button background */
        border-radius: 50%;
        width: 40px; /* Make close button larger target */
        height: 40px;
        display: flex; /* Center icon */
        justify-content: center;
        align-items: center;
        transition: background-color 0.3s;
    }

    .nav__close:hover {
        background-color: var(--first-color);
        color: var(--body-background-color);
    }
}



/* For medium devices */
@media screen and (min-width: 568px) {
    .home__name {
        font-size: clamp(2.2rem, 4.5vw, 3rem); /* Medium size for tablets */
        letter-spacing: -0.06em; /* Moderate letter spacing for overlap */
        word-spacing: 0.28em; /* Balanced word spacing */
    }
    
    .home__container,
    .about__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }
     /* Keep contact 1 column until larger screens */
    .home__content,
    .about__data {
        text-align: initial;
    }
     /* Contact info stays centered on medium screens */
    .contact__information {
        text-align: initial;
    }
     .home__description {
        margin-left: 0;
        margin-right: 0;
    }
    .home__image-container {
        /* When grid is 2 columns, place image in the second column */
        grid-column: 2;
        grid-row: 1 / span 2; /* Span row for better alignment */
        justify-content: flex-start; /* Align image left in its grid cell */
    }
    .about__data {
        grid-column: 1 / -1; /* Span full width if no image */
        /* If image present, it will take 1 column, data will take the other */
    }
    .about__buttons {
    }
    .experience__timeline {
         margin-left: 2rem;
         padding-left: 4rem;
    }
    /* Contact container on medium - still 1 column for info block */
     .contact__container {
        grid-template-columns: 1fr; /* Stack info and optional form */
        row-gap: 3rem;
     }
     .contact__container > .glassmorphic-card {
        max-width: 500px; /* Limit width of the info card */
        margin-left: auto; /* Center the info card */
        margin-right: auto;
     }
     .interests__container {
         justify-content: center; /* Still center the card */
         grid-template-columns: 1fr; /* Ensure it takes full width if in a grid */
     }


}

/* For large devices */
@media screen and (min-width: 768px) {
    body {
        margin: 0; /* Remove top margin */
    }
    .section {
        padding: 8rem 0 4rem;
    }
    .section__subtitle {
        margin-bottom: 4rem;
    }
    .header {
        top: 0;
        bottom: initial;
    }
    .nav {
        height: calc(var(--header-height) + 1.5rem);
        column-gap: 3rem;
    }
    .nav__toggle,
    .nav__close {
        display: none;
    }
    .nav__list {
        flex-direction: row;
        column-gap: 3rem;
    }
    .nav__menu {
        margin-left: auto;
        /* Reset mobile menu styles */
        position: static;
        background-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-left: none;
        box-shadow: none;
        width: auto;
        height: auto;
        padding: 0;
        transition: none;
    }
    .active-link::before {
        bottom: -0.75rem;
    }
    .home__container {
        padding-top: 4rem;
    }
     .home__image-container {
        /* Place image in the second column */
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-content: flex-start; /* Align left */
    }
    .about__container {
       column-gap: 5rem;
    }
     .about__data {
         grid-column: 1/-1; /* Data takes the first column */
     }
    .experience__container {
        max-width: 800px;
    }
     /* Contact container on large - info left, form right */
     .contact__container {
        grid-template-columns: 1fr max-content; /* Info on left, form on right */
        align-items: start;
        column-gap: 3rem;
        row-gap: 0; /* Remove row gap */
    }
     .contact__container > .glassmorphic-card {
         max-width: none; /* Remove max-width */
         margin: 0; /* Remove auto margins */
         grid-column: auto; /* Ensure it stays in its column */
     }
    .contact__form { /* Apply glassmorphic-card to the form if used */
        width: 460px; /* Fixed width for form */
    }
     .contact__information {
         text-align: initial; /* Now align left */
     }
     .interests__container {
         justify-content: center; /* Still center the card */
         /* If interests were in a grid, could adjust columns here */
     }
     .interests__card {
         max-width: 600px; /* Slightly wider on larger screens */
     }
}

/* For extra large devices */
@media screen and (min-width: 1024px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .home__container {
        column-gap: 4rem; /* More space in home section */
    }
     .home__image-wrapper {
        width: 300px; /* Larger image wrapper */
        height: 300px;
    }
    .about__container {
       column-gap: 7rem;
    }
}

/* Prevent logo wrapping on screens smaller than 1200px */
@media screen and (max-width: 1199px) {
    .nav__logo {
        white-space: nowrap; /* Prevent wrapping */
        font-size: clamp(1.2rem, 2vw, 1.5rem); /* Responsive font size */
    }
}

/* For highest resolution screens */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1100px;
    }
     .home__image-wrapper {
        width: 350px;
        height: 350px;
    }
}