/* --- Dark Theme Variables (New Palette based on your image) --- */
:root {
    --primary-bg: #1A1A2E; /* Keep a similar dark background for major sections, but can be adjusted */
    --secondary-bg: #15203A; /* Slightly lighter dark for alternating sections, blue-ish tint */
    --card-bg: #0F2740; /* Even lighter dark for cards, deeper blue */
    --text-color: #E0E0E0; /* Light text for contrast (same as before) */
    --heading-color: #00BCD4; /* Vibrant Turquoise from your image as primary accent for headings */
    --accent-color: #00BCD4; /* Vibrant Turquoise as primary accent for buttons, links etc. */
    --accent-hover: #00A3BF; /* Slightly darker Turquoise on hover */
    --border-color: #00BCD4; /* Turquoise for borders (same as accent) */
    --shadow-color: rgba(0, 0, 0, 0.4); /* Darker shadows (same as before) */
    --navbar-bg: #0D162A; /* Even darker for navbar, subtle blue tint */
}


/* Contact Section Styles */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%2300BCD4" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.contact-form {
    max-width: 700px;
    margin: 2rem auto;
    padding: 3rem;
    background: linear-gradient(145deg, var(--card-bg) 0%, rgba(15, 39, 64, 0.9) 100%);
    border-radius: 2rem;
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 188, 212, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease-in-out;
    position: relative;
    backdrop-filter: blur(10px);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), transparent, var(--accent-color));
    border-radius: 2rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 188, 212, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.contact-form:hover::before {
    opacity: 1;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-color);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
    transform-origin: left top;
    padding: 0 0.25rem;
    background: transparent;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(0, 188, 212, 0.3);
    border-radius: 1rem;
    font-size: 1rem;
    background: linear-gradient(145deg, var(--secondary-bg) 0%, rgba(21, 32, 58, 0.8) 100%);
    color: var(--text-color);
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(5px);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 
        0 0 0 3px rgba(0, 188, 212, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Placeholder styling */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

/* Floating Label Animation */
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: var(--accent-color);
    font-weight: 600;
    background: var(--card-bg);
    padding: 0 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Keep label up when input has content */
.form-group input:not(:placeholder-shown):not(:focus) + label,
.form-group textarea:not(:placeholder-shown):not(:focus) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: var(--text-color);
    font-weight: 500;
    background: var(--card-bg);
    padding: 0 0.5rem;
    border-radius: 4px;
}

/* Focus styles */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: none;
}

.submit-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    border-radius: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px -5px rgba(0, 188, 212, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px -8px rgba(0, 188, 212, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn i {
    margin-right: 0.5rem;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--text-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.submit-btn:disabled {
    background: var(--secondary-bg);
    cursor: not-allowed;
    transform: none;
}

.contact-info {
    margin-top: 3rem;
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(145deg, var(--card-bg) 0%, rgba(15, 39, 64, 0.9) 100%);
    border-radius: 2rem;
    box-shadow: 
        0 15px 35px -10px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 188, 212, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 188, 212, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.contact-info:hover::before {
    transform: translateX(100%);
}

.contact-info p {
    margin: 1.5rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.contact-info p strong {
    color: var(--accent-color);
    font-weight: 600;
}

.contact-info i {
    margin-right: 12px;
    color: var(--accent-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.contact-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-hover);
    transform: translateX(5px);
}

.contact-info a:hover::after {
    width: 100%;
}

.contact-info a:hover + i {
    transform: scale(1.2);
    color: var(--accent-hover);
}

/* Enhanced Form Styles */
.form-group {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    position: absolute;
    bottom: 0;
    left: 0;
    margin-top: 0.25rem;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.success-message .success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.success-message i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.success-message h3 {
    margin: 0.5rem 0;
}

.success-message p {
    margin: 0;
    font-size: 0.9rem;
}

.success-message.fade-out {
    animation: slideOut 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color); /* Use dark theme text color */
    background-color: var(--primary-bg); /* Use dark theme background */
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
    overflow-x: hidden; /* Prevent horizontal scrollbar from appearing due to loading overlay */
}

/* === Skeleton Loader === */
#skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px;
    gap: 40px;
}

.skeleton-hero {
    width: 90%;
    max-width: 1000px;
    height: 250px;
    border-radius: 12px;
    background: linear-gradient(90deg, #1A1A2E 8%, #2A3F5B 18%, #1A1A2E 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.skeleton-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1000px;
    width: 90%;
}

.skeleton-card {
    width: 300px;
    height: 180px;
    border-radius: 8px;
    background: linear-gradient(90deg, #0F2740 8%, #2A3F5B 18%, #0F2740 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* Hide skeleton after 3s */
body.loaded #skeleton-loader {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}


.container {
    width: 85%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Navbar Styling */
.navbar {
    background-color: var(--navbar-bg); /* Darker for navbar */
    color: var(--text-color);
    padding: 2px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color); /* Darker shadow */
    height: 75px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    color: var(--heading-color); /* Accent color for logo */
    text-decoration: none;
    font-size: 1.8em;
    font-weight: 700;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    transition: transform 0.3s ease-out; /* For mobile menu animation */
}
.navbar .nav-links li {
    margin-left: 30px;
    position: relative;
}

.navbar .nav-links a {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

/* Base style for the underline effect */
.navbar .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px; /* space between text and underline */
    width: 0%;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Active state for navigation links */
.navbar .nav-links a.active {
    color: var(--accent-color);
}

.navbar .nav-links a.active::after {
    width: 100%; /* Full underline for active link */
}

.navbar .nav-links a:hover {
    color: var(--accent-color);
}

.navbar .nav-links a:hover::after {
    width: 100%;
}


/* Hamburger Menu Toggle */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Above nav links when active */
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* Hamburger animation */
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}


/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1500x800/1A1A2E/00BCD4?text=Abstract+Dark+Background') no-repeat center center/cover; /* Placeholder background matching dark theme */
    color: var(--text-color);
    text-align: center;
    padding: 150px 0 100px; /* Adjust top padding for fixed navbar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Make hero section full height */
}

.hero-section .profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-color); /* Match theme accent */
    margin-bottom: 25px;
    box-shadow: 0 0 15px var(--shadow-color);
    background-position: bottom;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    color: var(--heading-color); /* Accent for hero heading */
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 30px;
    font-family: 'Roboto', sans-serif;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.project-btn {
    margin-top: 15px;
    padding: 8px 18px;
    font-size: 0.9em;
}

/* Sections General Styling */
section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--primary-bg); /* Use dark theme background */
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
    opacity: 0; /* Hidden by default for fade-in effect */
    transform: translateY(20px); /* Slightly below its final position */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.fade-in {
    opacity: 1;
    transform: translateY(0);
}


section:nth-of-type(even) {
    background-color: var(--secondary-bg); /* Alternating dark background */
}

h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--heading-color); /* Accent for headings */
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color); /* Match theme accent */
    border-radius: 2px;
}

/* About Section */
.about-section, .education-item p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 15px;
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
}

/* Skills Section */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.skill-item {
    background-color: var(--card-bg); /* Dark card background */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color); /* Darker shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--accent-color); /* Accent border */
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.skill-item h3 {
    color: var(--heading-color); /* Accent for subheadings */
    margin-bottom: 10px;
    font-size: 1.4em;
}

.skill-item p {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
}

/* Projects Section with Native Horizontal Scrolling */
.projects-section {
    position: relative;
}

.project-carousel-wrapper {
    position: relative;
    max-width: 1000px; /* Same as project-grid max-width */
    margin: 0 auto;
}

.project-grid {
    display: flex; /* Use flex for horizontal layout */
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow-x: scroll; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-snap-type: x mandatory; /* Enable mandatory scroll snapping on x-axis */
    gap: 30px; /* Space between cards */
    padding: 0 20px 20px; /* Add padding to the sides and bottom for scrollbar */
    max-width: 100%; /* Allow it to take full width */
    margin: 0 auto; /* Center the grid */
    scrollbar-width: thin; /* Firefox scrollbar */
    scrollbar-color: var(--accent-color) var(--card-bg); /* Firefox scrollbar colors */
}

/* Style individual project items for scroll snapping */
.project-item {
    flex-shrink: 0; /* Prevent items from shrinking */
    width: 300px; /* Define a fixed width for each card */
    scroll-snap-align: start; /* Snap to the start of the item */
    background-color: var(--card-bg); /* Dark card background */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    box-shadow: 0 6px 20px var(--shadow-color);
}

.project-item h3 {
    color: var(--heading-color); /* Accent for subheadings */
    margin-bottom: 10px;
    font-size: 1.5em;
}

.project-item p {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    margin-bottom: 20px;
}

.coming-soon-text {
    margin-top: 50px;
    font-style: italic;
    color: var(--text-color);
    font-size: 1.1em;
}

/* Hide Carousel Navigation Arrows */
.carousel-nav-btn {
    display: none; /* Hide buttons completely */
}


/* Education Section */
.education-item {
    max-width: 800px;
    margin: 0 auto 15px;
    /* background-color: var(--card-bg);  Dark card background */
    /*padding: 30px;*/
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: left;
   /* border-left: 5px solid var(--accent-color);  Accent border */
}

.education-item h3 {
    color: var(--heading-color); /* Accent for subheadings */
    margin-bottom: 10px;
    font-size: 1.6em;
}

/* Contact Section */
.contact-info {
    margin-top: 30px;
    font-size: 1.1em;
}

.contact-info p {
    margin-bottom: 10px;
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.cta-message {
    margin-top: 40px;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--heading-color); /* Accent for CTA */
}

/* Footer */
footer {
    background-color: var(--navbar-bg); /* Darker for footer */
    color: var(--text-color);
    text-align: center;
    padding: 25px 0;
    margin-top: 20px;
    font-size: 0.9em;
    box-shadow: 0 -2px 10px var(--shadow-color);
}

footer p {
    font-family: 'Roboto', sans-serif;
}



/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: row; /* Keep logo and toggle on same row */
        justify-content: space-between; /* Space out logo and toggle */
        align-items: center;
    }

    .navbar .nav-links {
        position: absolute;
        top: 100%; /* Position below navbar */
        left: 0;
        width: 100%;
        background-color: var(--navbar-bg); /* Match navbar background */
        flex-direction: column;
        padding: 20px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        transform: translateY(-100%); /* Hide menu initially above viewport */
        opacity: 0;
        pointer-events: none; /* Disable clicks when hidden */
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        box-shadow: 0 5px 10px var(--shadow-color);
    }

    .navbar .nav-links.active {
        transform: translateY(0); /* Show menu */
        opacity: 1;
        pointer-events: auto; /* Enable clicks when active */
    }

    .navbar .nav-links li {
        margin: 10px 0;
    }

    .navbar .nav-links a {
        display: block; /* Make links full width for better tapping */
        padding: 10px 20px;
        text-align: center;
        width: 100%;
    }

    /* Show hamburger menu */
    .menu-toggle {
        display: flex;
    }

    .hero-section {
        padding-top: 120px;
        min-height: auto; /* Allow hero section to shrink */
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1.1em;
    }

    h2 {
        font-size: 2em;
    }

    /* Skills grid: remains grid, but items might stack more */
    .skill-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    /* Projects grid: Enhanced for native horizontal scroll with snapping */
    .project-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: scroll; /* Allow manual horizontal scrolling */
        scroll-snap-type: x mandatory; /* Enable mandatory snapping */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        gap: 20px; /* Space between cards */
        padding: 0 15px 20px; /* Padding for the sides and bottom for scrollbar */
        margin-left: auto; /* Ensure centering */
        margin-right: auto;
        max-width: calc(100% - 30px); /* Adjust max-width to consider padding */
        /* Remove explicit width/margin adjustments from previous version */
    }

    .project-item {
        flex-shrink: 0;
        width: 85vw; /* Make each card take up a good portion of viewport width */
        max-width: 350px; /* Max width for consistency */
        scroll-snap-align: start; /* Snap to the start of the item */
        /* Removed margin-right as gap handles spacing now */
    }

    /* No need for project-item:last-child margin as gap handles it */

    /* Hide carousel navigation arrows on small screens (already hidden globally) */
    .carousel-nav-btn {
        display: none;
    }

    .education-item {
        margin: 0 15px;
        text-align: center; /* Center text in education item on small screens */
    }
    .education-item p {
        text-align: center;
    }

    .about-section p {
        padding: 0 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .navbar .logo {
        font-size: 1.5em;
    }

    .navbar .nav-links li {
        margin: 10px 0; /* Adjust spacing for very small screens */
    }

    .hero-section {
        padding-top: 100px;
    }

    .hero-section h1 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .about-section p,
    .education-item p {
        font-size: 1em;
    }

    .contact-info {
        font-size: 1em;
    }

    .project-item {
        width: 90vw; /* Even wider cards for very small screens */
    }
}
/* Dark scrollbars for Webkit browsers */
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

body::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

/* Custom scrollbar for .project-grid (Webkit) */
.project-grid::-webkit-scrollbar {
    height: 8px; /* height of horizontal scrollbar */
}

.project-grid::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.project-grid::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
    border: 2px solid var(--card-bg); /* A border around the thumb */
}
