body, html {
    height: 100%;
    margin: 0;
    overflow-y: auto;
    font-family: 'Arial', sans-serif;
}
.bg {
    background: url('images/bg4.jpg') no-repeat center center/cover;
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}
.overlay {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 60px;
    color: #fff;
}
nav .logo {
    font-weight: bold;
    font-size: 1.5em;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}
nav ul li {
    cursor: pointer;
}
.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 80vh;
    padding-left: 100px;
    color: #fff;
}
.center-content h1 {
    font-size: 3em;
    margin: 0;
}
.center-content h2 {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}
.center-content p {
    max-width: 500px;
    margin: 20px 0;
}
.btn {
    background: #ff5e57;
    color: #fff;
    padding: 15px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1em;
    cursor: pointer;
    margin-right: 20px;
}
.email-link {
    color: #fff;
    text-decoration: underline;
}
button{
    margin-top: 10px;
    margin-bottom: 30px;
}
a{
    color: #fff;
    text-decoration: none;
}
#slideshow {
    width: 350px;
    height: 500px;
    object-fit: contain;
    border: 3px solid #ccc;
    background: #222;
    transition: opacity 0.8s cubic-bezier(.4,0,.2,1);
    opacity: 1;
}
#slideshow.fade {
    opacity: 0;
}
.projects-container {
    display: flex;
    color: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}
.about-content{
    animation: fadeIn 1.2s ease-in;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: #fff;
}
.about-content p {
    text-align: center;
    margin: 5px 10px;
}
.first-row {
    display: flex;
    justify-content: center;
    gap:  100px;
    margin-bottom: 30px;
}
.second-row {
    display: flex;
    justify-content: center;
    gap:  50px;
    margin-bottom: 30px;
}
footer p { 
    display: flex;
    justify-content: center;
    color: aliceblue;
}
.first-row img,
.second-row img {
    width: 300px;
    height: 400px;/* or your preferred max width */
    height: 300px;
    border: 1px solid #ccc;
    background: #222;
    object-fit: cover;
    border-radius: 10px; /* optional: rounded corners */
    display: block;
}

#profile{
    width: 180px;         /* or your preferred size */
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff; /* optional: white border */
    box-shadow: 0 2px 12px rgba(0,0,0,0.15); /* optional: subtle shadow */
    display: block;
    margin: 0 auto;
}
#social-icons{
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 5px;
}

/* Carousel styles */
.carousel {
    width: 960px; /* 3 * 320px images */
    margin: 0px auto 0 auto;
    overflow: hidden;
    border-radius: 18px;
    position: relative;
    background: transparent;
}
.carousel-track {
    display: flex;
    transition: transform 0.7s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.carousel-img {
    width: 320px;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    margin: 0 10px;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.carousel-img.center {
    width: 340px;
    height: 240px;
    opacity: 1;
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}
.carousel-controls button {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: #222;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}
.carousel-controls button:hover {
    background: #444;
}

.idle-float {
    animation: fadeSlideIn 1.2s cubic-bezier(.4,0,.2,1) forwards, 
               idleFloat 1.5s ease-in-out 0.6s infinite alternate;
}

@keyframes idleFloat {
    from { transform: translateY(0); }
    to   { transform: translateY(-12px); }
}
.row{
    display: inline-flex;
    justify-content: center;
    align-items: center;    
    gap: 100px;
}
.gif-container img{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    border-radius: 12px;
}

.aboutme-images img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

.contact-content { 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
}

/* --- Add responsive styles at the end of your CSS file --- */
@media (max-width: 1100px) {
    .carousel {
        width: 100vw;
        max-width: 100vw;
    }
    .carousel-img,
    .carousel-img.center {
        width: 90vw;
        max-width: 340px;
        height: auto;
    }
    .projects-container {
        gap: 20px;
        padding: 10px;
    }
}

@media (max-width: 900px) {
    nav {
        flex-direction: column;
        padding: 20px 10px;
        gap: 10px;
    }
    .center-content {
        padding-left: 0;
        align-items: center;
        height: auto;
        text-align: center;
    }
    .row {
        flex-direction: column;
        gap: 40px;
    }
    .about-content,
    .projects-container,
    .contact-content {
        padding: 10px;
        gap: 20px;
        align-items: center;
    }
    .first-row,
    .second-row {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }
    .first-row img,
    .second-row img {
        width: 90vw;
        max-width: 320px;
        height: auto;
    }
    #profile {
        width: 120px;
        height: 120px;
    }
    .carousel-controls {
        gap: 10px;
        margin-top: 10px;
    }
}

@media (max-width: 600px) {
    /* ... existing styles ... */

    /* Compact Navigation */
    nav {
        padding: 15px; /* Reduce padding */
        background: rgba(0, 0, 0, 0.8); /* Dark background for readability */
    }

    nav ul {
        flex-direction: row; /* Keep icons/links side-by-side if they fit, or wrap */
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px; /* Smaller gap */
    }

    nav ul li a {
        font-size: 0.9em; /* Slightly smaller text */
    }
    
    /* Fix Huge Gap in Home Container */
    .home-container {
        gap: 40px; /* Was 300px on desktop! */
        padding-top: 20px;
    }
    
    /* Prevent horizontal scrolling issues */
    body, html {
        overflow-x: hidden;
    }
}

.project-details {
    text-align: center;
    max-width: 600px;
    margin-top: 3px;
    min-height: 50px; /* Prevents jumping when text length changes */
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.project-details h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #ff5e57; /* Matches your button color */
}

.project-details p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Update responsive styles for the new section */
@media (max-width: 600px) {
    .project-details h2 { font-size: 1.5em; }
    .project-details p { font-size: 1em; }
}

/* --- Layout Improvements --- */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.header-section {
    text-align: center;
    color: #fff;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    margin-top: -10px;
    font-weight: 300;
}

/* --- Modern Carousel Controls --- */
.carousel-controls {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* --- Glassmorphism Project Card --- */
.project-details-card {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    backdrop-filter: blur(12px);           /* Blur effect */
    -webkit-backdrop-filter: blur(12px);   /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: slideUpFade 0.8s ease forwards 0.5s;
    transition: transform 0.3s ease;
}

.project-details-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.details-content h2 {
    font-size: 2em;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.details-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
}

/* --- Modern Glow Button --- */
.glow-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, #ff5e57, #ff8c94);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 94, 87, 0.4);
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 87, 0.6);
    background: linear-gradient(90deg, #ff8c94, #ff5e57);
}

/* --- Animations --- */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .projects-container {
        padding-top: 80px; /* Space for nav */
    }
    .project-details-card {
        padding: 20px;
        width: 95%;
    }
    .details-content h2 {
        font-size: 1.5em;
    }
}

/* --- About Me Page Layout --- */
.about-container {
    max-width: 1200px;
    margin: 80px auto; /* 80px top margin to clear nav */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Left column narrower than right */
    gap: 30px;
    align-items: start;
}

/* Glass Card Style (Reusable) */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    color: white;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Profile Section */
.profile-card {
    text-align: center;
    position: sticky;
    top: 100px; /* Sticks while scrolling on large screens */
}

#profile {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    object-fit: cover;
}

.profile-card h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 20px;
    font-weight: 300;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.social-links a:hover img {
    transform: translateY(-5px) scale(1.1);
}

.bio-text p {
    text-align: left;
    margin-bottom: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Skills Section */
.skills-section {
    margin-bottom: 30px;
}

.skills-section h2, .gallery-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.3s;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Gallery Section */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.photo-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s, filter 0.3s;
    opacity: 0.9;
}

.photo-grid img:hover {
    transform: scale(1.03);
    opacity: 1;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }
    .profile-card {
        position: static; /* Remove sticky behavior on mobile */
    }
}


/* --- Resume Page Styles --- */
.resume-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.resume-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Puts download button on the right */
}

/* The Paper Look */
.resume-paper {
    width: 100%;
    background: rgba(255, 255, 255, 0.95); /* High opacity white for readability */
    color: #333; /* Dark text for contrast against white paper */
    padding: 50px;
    border-radius: 8px; /* Slight rounding like real paper */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Header Styling */
.resume-header {
    text-align: center;
    margin-bottom: 30px;
}

.resume-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.divider {
    border: 0;
    height: 2px;
    background: #577eff;
    margin: 20px 0 30px 0;
}

/* Section Styling */
.resume-section {
    margin-bottom: 30px;
}

.resume-section h2 {
    font-size: 1.4em;
    color: #577eff;
    text-transform: uppercase;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.resume-item {
    margin-bottom: 20px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.resume-item h3 {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #222;
}

.resume-item .role {
    font-style: italic;
    color: #666;
    margin: 0 0 5px 0;
}

.resume-item .date {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

/* List Styling */
.achievements {
    list-style-type: disc;
    margin-left: 20px;
    color: #444;
}

.achievements li {
    margin-bottom: 5px;
    line-height: 1.5;
}

/* Small Skills Grid */
.skills-grid-small {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-grid-small span {
    background: #eee;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #555;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .resume-paper {
        padding: 20px;
    }
    .contact-info {
        flex-direction: column;
        gap: 5px;
    }
    .resume-header h1 {
        font-size: 1.8em;
    }
}

/* --- Contact Page Layout --- */
.contact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh; /* Full height minus nav roughly */
    padding: 20px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Info takes less space than form */
    max-width: 1000px;
    width: 100%;
    padding: 0; /* Remove padding from main card, we handle it inside */
    overflow: hidden; /* Ensures rounded corners clip content */
}

/* Left Side: Info */
.contact-info {
    background: rgba(0.2, 0, 0, 0.2); /* Slightly darker for contrast */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #fff, #ff8c94);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-text {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.6;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #fff;
}

.info-item i {
    color: #ff5e57;
    font-size: 1.2em;
    width: 20px;
}

.social-icons-contact {
    margin-top: auto; /* Pushes icons to bottom */
    display: flex;
    gap: 20px;
}

.social-icons-contact a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em;
    transition: 0.3s;
}

.social-icons-contact a:hover {
    color: #ff5e57;
    transform: translateY(-3px);
}

/* Right Side: Form */
.contact-form-section {
    padding: 50px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Floating Label Input Styles */
.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #fff;
    margin-bottom: 5px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    outline: none;
    background: transparent;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    padding: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: 0.3s ease all;
}

/* Animations for Focus/Valid States */
.input-group input:focus,
.input-group textarea:focus {
    border-bottom: 1px solid #ff5e57;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 12px;
    color: #ff5e57;
}

/* Responsive */
@media (max-width: 800px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .contact-info, .contact-form-section {
        padding: 30px;
    }
    .contact-info {
        text-align: center;
        align-items: center;
    }
    .social-icons-contact {
        margin-top: 30px;
    }
}

/* --- Homepage Specific Styles --- */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 0 20px;
    /* CHANGE THIS: */
    gap: 50px; /* Reduced from 300px to be safe on laptops */
}

/* Typography */
.hero-text h1 {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1.1;
}

.highlight {
    color: #ff5e57; /* Your brand color */
}

.typewriter-text {
    font-size: 2em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-weight: 300;
    min-height: 40px; /* Prevent layout shift */
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.intro-blurb {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.outline-btn {
    padding: 12px 30px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.outline-btn:hover {
    background: white;
    color: #333;
}

.social-mini a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9em;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    transition: 0.3s;
}

.social-mini a:hover {
    color: #ff5e57;
}

/* Image Styling */
.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.glass-circle {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%; /* Circle shape */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: float 6s ease-in-out infinite;
}

.glass-circle img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.1);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Responsive */
@media (max-width: 900px) {
    .home-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 50px;
        gap: 40px; /* Explicitly set small gap for mobile */
    }
    
    .hero-image {
        order: -1; /* Puts image ON TOP of text on mobile */
        margin-bottom: 20px;
    }

    .hero-text h1 { font-size: 3em; }
    .typewriter-text { font-size: 1.5em; }
    
    .cta-buttons {
        justify-content: center;
    }

    .glass-circle {
        width: 280px;
        height: 280px;
        margin-bottom: 50px;
    }
    
    .intro-blurb {
        margin: 0 auto 30px auto; /* Center text block */
    }
}

@media (max-width: 600px) {
    .project-details-card, 
    .glass-card {
        background: rgba(20, 20, 20, 0.6); /* Darker background for contrast */
        backdrop-filter: blur(15px);
        width: 95%; /* Use full width */
        margin: 0 auto;
    }
    
    .carousel {
        width: 100%; /* Ensure full width */
    }
}