html {
    scroll-behavior: smooth;
}

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll from absolute positioning */
}

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

/* Body font and background */
body {
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #f4c2f7;
    background: linear-gradient(135deg, #360a48, #360133);
}

/* HEADER STYLES */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    background-color: #180a18;
    color: rgb(190, 162, 196);
    position: fixed; /* Keep header fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

/* Logo styling */
.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #907b9e;
    text-decoration: none;
    text-shadow:
        1px 1px 0 #000,
        2px 2px 0 #000,
        3px 3px 0 #000,
        4px 4px 0 #000,
        5px 5px 0 #222;
}

/* Navbar styling */
.navbar a {
    margin-left: 20px;
    text-decoration: none;
    font-size: 12px;
    color: #cccccc;
    font-family: 'Press Start 2P', cursive;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

/* Hover effect on nav links */
.navbar a:hover {
    transform: scale(1.2);
    color: #00bcd4;
    text-shadow: 0 0 5px #747e95;
}


/* HERO SECTION STYLES (Carefully positioned absolute elements) */
.hero-container {
    position: relative; /* Crucial for absolute children positioning */
    width: 100%;
    min-height: 100vh;
    overflow: hidden; /* Hide anything that goes outside */
    padding-top: 80px; /* Space for fixed header */
    background: linear-gradient(135deg, #360a48, #360133);
}

.hero-background-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    mix-blend-mode: screen; /* changed from soft-light — see note below */
    opacity: 0.35; /* can push higher since screen handles dark bg better */
    filter: blur(0.5px) brightness(1.1);
    z-index: 1;
    pointer-events: none;

    /* NEW: fades the rectangular edges to transparent */
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}

/* Typed Text (Hello, I'm Ananya!) */
#typed-text {
    position: absolute;
    top: 25%; 
    left: 10%; 
    /* width: auto; controlled by font-size and nowrap */
    z-index: 5;
    text-align: left; /* Align to left within its potential width */
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem; /* Initial desktop size */
    color: #00bcd4;
    white-space: nowrap; /* Keep text on one line for typing effect */
    border-right: 0.15em solid #00bcd4; /* Cursor effect */
    overflow: hidden; /* Hide text before typing */
    text-shadow: 0 0 15px rgba(0, 188, 212, 0.8);
    animation: typing 3.5s steps(20, end) forwards, blink-caret 0.75s step-end infinite; 
}

/* Intro Text below "Hello, I'm Ananya!" */
.intro-text-hero {
    position: absolute;
    top: 55%; 
    left: 10%; 
    width: 45%; 
    max-width: 650px; 
    color: rgb(225, 164, 223);
    font-size: 1.4em;
    line-height: 1.6;
    text-align: left;
    z-index: 5;
}
.intro-text-hero p {
    margin-bottom: 1em; /* Space between paragraphs */
}


/* Circular Image Container for Hero */
.circular-image-container-hero {
    position: absolute;
    top: 45%; 
    right: 10%; 
    width: 250px; /* Fixed size */
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 6;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border: 3px solid #8a2be2;
    background-color: rgba(0,0,0,0.2);
}

.circular-image-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Caption for Hero Image */
.image-caption-hero {
    position: absolute;
    top: calc(45% + 250px + 15px); /* Position below image: image top + image height + margin */
    right: 10%; 
    width: 250px; 
    text-align: center; 
    color: #f0def1;
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-size: 0.9em;
    line-height: 1.2;
    z-index: 6;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
}
.image-caption-hero p {
    margin-bottom: 0.2em;
}

/* Animations for typing and blinking cursor */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #00bcd4 }
}

/* ABOUT SECTION STYLES (Simple central box as per screenshot) */

.about-section {
    background: linear-gradient(135deg, #360133, #360a48);
    padding: 100px 50px;
    color: #f4c2f7;
    display: flex;
    justify-content: center; /* Center the content box horizontally */
    align-items: center; /* Center the content box vertically if space allows */
    min-height: 80vh; /* Ensure section takes up enough space */
    padding-top: 100px; /* Adjust to clear fixed header */
    text-align: center; 
}

.about-info-box {
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent dark background */
    padding: 40px;
    border-radius: 10px;
    max-width: 800px; /* Limit width for better readability */
    width: 90%; /* Responsive width */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* Subtle shadow */
    text-align: center; 
    line-height: 1.6;
    font-size: 1.1em;
}

.about-heading {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2em; /* Adjust size */
    color: #8a2be2;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.7);
}

.about-info-box p {
    color: #f4c2f7;
    font-family: "WDXL Lubrifont SC", sans-serif;
    margin-bottom: 1em; /* Space between paragraphs in the about box */
}


/* PROJECTS SECTION STYLES  */
.projects-section {
    background: linear-gradient(135deg, #360a48, #360133);
    padding: 100px 50px;
    color: #f4c2f7;
    text-align: center;
    margin-top: 0;
    padding-top: 100px;
}

.projects-heading {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.8em;
    color: #00bcd4;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.7);
}

.projects-intro {
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-size: 1.1em;
    color: #cccccc;
    max-width: 800px;
    margin: 0 auto 60px auto;
    line-height: 1.5;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.project-card {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.project-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.6em;
    color: #8a2be2;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.4);
}

.project-description {
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-size: 1em;
    color: #f0def1;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.project-links {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.project-link {
    background-color: #00bcd4;
    color: #180a18;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-link:hover {
    background-color: #00a0b0;
    transform: translateY(-2px);
}

.project-link i {
    font-size: 1em;
}



/* CONTACT FORM SECTION STYLES  */
.contact-form-section {
    background: linear-gradient(135deg, #360a48, #360133);
    padding: 100px 20px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f4c2f7;
    margin-top: 0;
    padding-top: 100px;
}

.contact-form-container {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 40px 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.contact-form-heading {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2em;
    color: #00bcd4;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.7);
}

.contact-form-intro {
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-size: 1.1em;
    color: #cccccc;
    margin-bottom: 40px;
    line-height: 1.5;
}

.main-contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.form-group {
    width: 100%;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: "WDXL Lubrifont SC", sans-serif;
    color: #f4c2f7;
    font-size: 1em;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #8a2be2;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f4c2f7;
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-size: 1em;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999999;
    opacity: 0.8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 8px rgba(0, 188, 212, 0.5);
}

.submit-button {
    background-color: #8a2be2;
    color: #ffffff;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 15px;
}

.submit-button:hover {
    background-color: #9a4cd2;
    transform: translateY(-2px);
}



/* FOOTER STYLES (Kept from previous, responsive) */

.site-footer {
    background-color: #000;
    color: #f4c2f7;
    padding: 60px 50px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 100px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-left-content {
    flex: 2;
    min-width: 280px;
    padding-right: 20px;
}

.footer-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.footer-tagline {
    font-family: "WDXL Lubrifont SC", sans-serif;
    font-size: 1.1em;
    line-height: 1.6;
    color: #ccc;
}

.footer-right-content {
    flex: 1;
    min-width: 200px;
    text-align: right;
}

.footer-social-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.4em;
    color: #fff;
    margin-bottom: 25px;
}

.footer-social-icons {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}

.footer-social-icons a {
    color: #fff;
    font-size: 2.2em;
    transition: transform 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.footer-social-icons a:hover {
    transform: scale(1.2) translateY(-3px);
    color: #00bcd4;
}

.footer-bottom-line {
    width: 100%;
    max-width: 1200px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}


/* MEDIA QUERIES */

/* Larger Desktops / Widescreen Monitors (1200px and up) - Original Layout Focus */
@media (min-width: 1201px) {
    #typed-text {
        font-size: 3rem;
        top: 25%;
        left: 10%;
        text-align: left;
        transform: translateX(0); /* Remove center transform */
    }

    .intro-text-hero {
        top: 50%; /* Adjusted slightly to be lower and more aligned with image top */
        left: 10%;
        width: 45%;
        font-size: 1.4em;
        text-align: left;
    }

    .circular-image-container-hero {
        top: 45%; /* Match original image position */
        right: 10%;
        width: 250px;
        height: 250px;
    }

    .image-caption-hero {
        top: calc(45% + 250px + 15px); /* Below image */
        right: 10%;
        width: 250px;
        font-size: 0.9em;
        text-align: center;
    }
}

/* Tablets in landscape, small laptops (up to 1200px and down to 768px) */
@media (max-width: 1200px) {
    /* Header */
    .header {
        padding: 25px 4%;
    }
    .logo {
        font-size: 1.8em;
    }
    .navbar a {
        margin-left: 20px;
        font-size: 0.95em;
    }

    /* Hero Section Adjustments */
    #typed-text {
        font-size: 2.5rem;
        top: 20%;
        left: 5%; /* Slightly closer to edge */
    }

    .intro-text-hero {
        top: 40%; /* Move up */
        left: 5%;
        width: 50%; /* Wider relative width */
        font-size: 1.2em;
        text-align: left;
    }

    .circular-image-container-hero {
        top: 35%; /* Move up */
        right: 5%;
        width: 220px;
        height: 220px;
    }

    .image-caption-hero {
        top: calc(35% + 220px + 10px);
        right: 5%;
        width: 220px;
        font-size: 0.8em;
    }

    /* About Section */
    .about-section {
        padding: 80px 30px;
    }
    .about-info-box {
        padding: 35px;
        font-size: 1.1em;
    }
    .about-heading {
        font-size: 2em;
    }

    /* Projects */
    .projects-section {
        padding: 80px 30px;
    }
    .projects-grid {
        gap: 30px;
    }
    .project-card {
        padding: 25px;
    }
}

/* Phones and small tablets (up to 768px and down to 480px) */
@media (max-width: 768px) {
    /* Header */
    .header {
        padding: 15px 3%;
    }
    .logo {
        font-size: 1.4em;
    }
    .navbar { 
        display: none;
    }

    /* Hero Section Adjustments (Stacking elements more centrally) */
    .hero-container {
        display: flex; /* Enable flex for better vertical distribution */
        flex-direction: column;
        justify-content: flex-start; 
        align-items: center; 
        padding-top: 60px; 
        min-height: 120vh; /* Make it taller to accommodate stacked elements */
    }

    #typed-text {
        position: relative; /* Change to relative for stacking */
        top: auto;
        left: auto;
        transform: none;
        width: 90%; /* Take up more width */
        font-size: 2rem;
        margin-top: 50px; 
        margin-bottom: 30px;
        text-align: center; /* Center text when stacked */
        white-space: normal; 
        border-right: none; 
        animation: none; /* Disable typing animation on smaller screens if wrapping occurs */
    }

    .intro-text-hero {
        position: relative; /* Change to relative for stacking */
        top: auto;
        left: auto;
        width: 90%;
        max-width: 500px; /* Max width for readability */
        font-size: 0.95em;
        margin-bottom: 30px;
        text-align: center; /* Center text when stacked */
    }

    .circular-image-container-hero {
        position: relative; /* Change to relative for stacking */
        top: auto;
        right: auto;
        left: auto;
        transform: none;
        width: 180px;
        height: 180px;
        margin-bottom: 20px; /* Space below image */
    }

    .image-caption-hero {
        position: relative; /* Change to relative for stacking */
        top: auto;
        right: auto;
        left: auto;
        transform: none;
        width: 180px; /* Maintain width for alignment */
        font-size: 0.8em;
        margin-bottom: 40px; /* Space below caption */
    }

    /* About Section */
    .about-section {
        padding: 60px 15px;
    }
    .about-info-box {
        padding: 25px;
        font-size: 0.9em;
    }
    .about-heading {
        font-size: 1.8em;
    }

    /* Projects */
    .projects-section {
        padding: 60px 15px;
    }
    .projects-grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
        max-width: 350px;
    }
    .project-card {
        padding: 18px;
    }
    .project-title {
        font-size: 1.2em;
    }
    .project-links {
        flex-direction: column; /* Stack buttons */
        gap: 10px;
    }

    /* Contact form */
    .contact-form-container {
        max-width: 350px;
    }
    .contact-form-heading {
        font-size: 1.8em;
    }
    .contact-form-intro {
        font-size: 0.9em;
    }
    .form-group input,
    .form-group textarea {
        font-size: 0.9em;
    }

    /* Footer */
    .site-footer {
        padding: 40px 15px 20px;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .footer-right-content {
        text-align: center;
    }
    .footer-social-icons {
        justify-content: center;
    }
}

/* Extra small phones (up to 480px) */
@media (max-width: 480px) {
    /* Header */
    .logo {
        font-size: 1.1em;
    }

    /* Hero Section */
    #typed-text {
        font-size: 1.5rem;
        margin-top: 40px;
    }
    .intro-text-hero {
        font-size: 0.8em;
        margin-bottom: 20px;
    }
    .circular-image-container-hero {
        width: 130px;
        height: 130px;
        margin-bottom: 15px;
    }
    .image-caption-hero {
        width: 130px;
        font-size: 0.7em;
        margin-bottom: 30px;
    }

    /* About Section */
    .about-info-box {
        padding: 20px;
        font-size: 0.8em;
    }
    .about-heading {
        font-size: 1.5em;
    }

    /* Projects */
    .project-card {
        padding: 15px;
    }
    .project-title {
        font-size: 1.1em;
    }
    .project-description {
        font-size: 0.8em;
    }
    .project-link {
        font-size: 0.7em;
        padding: 6px 10px;
    }

    /* Contact Form */
    .contact-form-container {
        max-width: 300px;
        padding: 20px 10px;
    }
    .contact-form-heading {
        font-size: 1.5em;
    }
    .contact-form-intro {
        font-size: 0.8em;
    }
    .form-group input,
    .form-group textarea {
        font-size: 0.8em;
    }
    .submit-button {
        font-size: 0.9em;
        padding: 10px 20px;
    }

    /* Footer */
    .footer-name {
        font-size: 16px;
    }
    .footer-tagline {
        font-size: 0.75em;
    }
    .footer-social-title {
        font-size: 1em;
    }
    .footer-social-icons a {
        font-size: 1.8em;
    }
}