/* Custom Properties (CSS Variables) - Define your color palette */
:root {
    /* Light Mode Colors */
    --bg-primary: #f0f0f0; /* Light grey background */
    --bg-secondary: #ffffff; /* White for cards/sections */
    --text-primary: #333333; /* Dark grey text */
    --text-secondary: #555555; /* Slightly lighter dark grey for subtle text */
    --text-on-dark: #ffffff; /* White text for accents (used on buttons, icons) */
    --accent-primary: #666666; /* Primary grey accent for buttons/links */
    --accent-secondary: #888888; /* Lighter grey accent for hover/secondary */
    --border-color: #cccccc; /* Border for elements */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);

    /* Fonts and Transitions */
    --font-heading: 'Rowdies', cursive;
    --font-body: 'Poppins', sans-serif;
    --transition-speed: 0.3s;

    /* Cursor colors - default to light mode */
    --cursor-dot-color: black;
    --cursor-outline-color: black;
}

/* Dark Mode Colors - Applied when .dark-mode class is present on body */
body.dark-mode {
    --bg-primary: #1a1a1a; /* Dark grey background */
    --bg-secondary: #2c2c2c; /* Darker grey for cards/sections */
    --text-primary: #e0e0e0; /* Light grey text */
    --text-secondary: #bbbbbb; /* Slightly darker light grey for subtle text */
    --text-on-dark: #ffffff; /* White text remains */
    --accent-primary: #999999; /* Lighter grey accent */
    --accent-secondary: #cccccc; /* Even lighter grey accent for hover */
    --border-color: #444444; /* Darker border color */
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);

    /* Custom cursor colors for dark mode */
    --cursor-dot-color: #ffffff;
    --cursor-outline-color: #ffffff;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll due to animations/transforms */
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-secondary);
}

ul {
    list-style: none;
}

/* Global H1, H2, H3 styles */
h1, h2, h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h1 span {
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-secondary);
    border-radius: 2px;
    transition: background-color var(--transition-speed) ease;
}

h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

/* Sections */
.section {
    padding: 80px 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: background-color var(--transition-speed) ease;
}

/* Navbar */
.navbar {
    background-color: var(--bg-secondary);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-light);
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent-primary);
    font-weight: 700;
    letter-spacing: 1px;
    transition: color var(--transition-speed) ease;
}

.ul-links {
    display: flex;
    /* Adjusted gap for better spacing and to prevent "About Me" wrapping on larger screens */
    gap: 1.8rem;
}

.ul-links li a {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap; /* Ensures text stays on one line in the navbar */
    transition: color var(--transition-speed) ease;
}

.ul-links li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease, background-color var(--transition-speed) ease;
}

.ul-links li a:hover::after,
.ul-links li a.active::after {
    width: 100%;
}

.ul-links li a:hover,
.ul-links li a.active {
    color: var(--accent-secondary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 5px;
    transition: all var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

/* Hamburger Animation (Open State) */
.hamburger.open .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger.open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.open .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Dark Mode Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--accent-primary);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: var(--transition-speed);
    border-radius: 34px;
}

.slider:before {
    background-color: var(--text-on-dark);
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: var(--transition-speed);
    width: 26px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-secondary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Hero Section */
.hero-section {
    display: flex; /* Ensure flexbox is active */
    flex-direction: row; /* Default for desktop: image then text/buttons */
    justify-content: space-around;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 80px;
    text-align: left;
}

.hero-image-container {
    text-align: center; /* Center the image within its container */
    margin-left: 30px; /* Space between image and text on desktop, now image is on the right */
    order: 2; /* Ensure image comes after the text on desktop */
}

.text-container {
    max-width: 550px;
    margin-right: 30px; /* Space between text and image on desktop, now text is on the left */
    text-align: left;
    order: 1; /* Ensure text comes before the image on desktop */
}

.hero-section h1 {
    text-align: left;
    font-size: 4rem;
}

/* New style for the descriptive paragraph */
.hero-description {
    font-size: 1.15rem; /* Slightly larger than default p */
    color: var(--text-secondary); /* A bit lighter color */
    margin-top: 1rem; /* Space from the h1 */
    margin-bottom: 2rem; /* Space before buttons */
    text-align: left;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    justify-content: flex-start; /* Buttons align to the start (left) */
    margin-top: 2rem; /* Adjusted for new paragraph */
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    margin: 0.7rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    border: 3px solid var(--accent-primary);
    transition: transform var(--transition-speed) ease,
                background-color var(--transition-speed) ease,
                color var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
}

.primary-btn {
    background-color: var(--accent-primary);
    color: var(--text-on-dark);
}

.primary-btn:hover {
    background-color: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-light);
}

.secondary-btn {
    background-color: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.secondary-btn:hover {
    background-color: var(--accent-primary);
    color: var(--text-on-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-light);
}

.hero-image {
    width: 400px; /* Increased size */
    height: 400px; /* Increased size */
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--border-color); /* Thicker border */
    box-shadow: 0 0 25px var(--shadow-light); /* Slightly larger shadow */
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.hero-image:hover {
    transform: scale(1.05);
}

/* About Section */
.about-section {
    background-color: var(--bg-secondary);
    padding: 100px 5%;
}

.about-content {
    max-width: 800px;
    text-align: center;
    margin-top: 2rem;
}

.about-content p {
    font-size: 1.15rem;
}

/* Projects Section */
.projects-section {
    padding: 100px 5%;
    background-color: var(--bg-primary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin-top: 2rem;
    width: 100%;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px var(--shadow-dark);
}

/* Project name should be darker */
.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: left;
    font-size: 1.5rem;
}

.project-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

/* Make project buttons darker */
.project-link-btn {
    display: flex;
    align-items: center;
    background-color: var(--text-primary);
    color: var(--text-on-dark);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.project-link-btn:hover {
    background-color: var(--text-secondary);
}

.project-link-btn i {
    margin-right: 0.5rem;
}

.project-link-btn.coming-soon {
    background-color: #aaaaaa;
    cursor: not-allowed;
    opacity: 0.8;
}

.project-link-btn.coming-soon:hover {
    background-color: #aaaaaa;
}

/* Projects Section - Show More/Less Styles */
.hidden-projects {
    display: none;
    width: 100%;
}

.hidden-projects.show {
    display: contents;
    animation: fadeInProjects 0.8s ease-out forwards;
}

@keyframes fadeInProjects {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.show-more-btn {
    margin-top: 3rem;
}

/* Skills Section */
.skills-section {
    background-color: var(--bg-secondary);
    padding: 100px 5%;
}

.skills-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin-top: 2rem;
    width: 100%;
}

.skill-category-card {
    background-color: var(--bg-primary);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.skill-category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px var(--shadow-dark);
}

.skill-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.skill-category-icon {
    background-color: var(--accent-primary);
    border-radius: 50%;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.skill-category-icon i {
    font-size: 1.8rem;
    color: var(--text-on-dark);
}

/* Skill category names should be darker */
.skill-category-card h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.6rem;
    text-align: center;
}

.skill-tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1rem;
}

.skill-tag {
    background-color: var(--text-primary); /* Default for light mode */
    color: var(--text-on-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Dark mode adjustment for skill tags */
body.dark-mode .skill-tag {
    background-color: var(--accent-secondary); /* Brighter in dark mode */
    color: var(--text-on-dark);
}


/* Contact Section */
.contact-section {
    padding: 100px 5%;
    background-color: var(--bg-primary);
}

.contact-intro {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.contact-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    align-items: flex-start;
}

.contact-form {
    background-color: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
    flex: 1;
    min-width: 350px;
    max-width: 550px;
    border: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.input-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-secondary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 2px var(--accent-secondary);
}

.contact-form textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--accent-primary);
    color: var(--text-on-dark);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.submit-btn:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-3px);
}

.contact-map {
    flex: 1;
    min-width: 350px;
    max-width: 600px;
    height: 450px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.site-footer {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-left,
.footer-middle,
.footer-right {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.footer-left h3 {
    font-size: 1.2rem;
    line-height: 1.5;
    text-align: center;
}

.footer-middle h3,
.footer-right h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
    transition: color var(--transition-speed) ease;
}

.footer-middle p,
.footer-right p {
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: center;
}

.footer-middle p i {
    margin-right: 10px;
    color: var(--accent-secondary);
    transition: color var(--transition-speed) ease;
}

.footer-links-nav {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.footer-links-nav a {
    color: var(--text-primary);
    font-weight: 500;
}

.footer-links-nav a:hover {
    color: var(--accent-secondary);
}

.copyright-area {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.2rem;
    justify-content: center;
}

/* Dark mode styling for social links background */
.social-links a {
    color: var(--text-on-dark);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    background-color: var(--accent-primary); /* Default for light mode */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.social-links a:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-5px);
}

/* This targets the social icons themselves if they are <i> or <svg> */
.social-links a i,
.social-links a svg {
    color: var(--text-on-dark); /* Ensure icon color stays white/light */
    transition: color var(--transition-speed) ease;
}


/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: difference;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--cursor-dot-color);
}

.cursor-outline {
    width: 35px;
    height: 35px;
    border: 2px solid var(--cursor-outline-color);
    transition: width 0.2s ease-out, height 0.2s ease-out, border-color 0.2s ease-out, transform 0.1s ease-out;
}

.cursor-outline.hover-active {
    width: 50px;
    height: 50px;
    border-color: var(--accent-primary);
}


/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
    .hero-image {
        width: 350px; /* Adjust for smaller screens */
        height: 350px; /* Adjust for smaller screens */
    }

    /* Adjust Navbar links for single line on smaller desktop view */
    .ul-links {
        gap: 1rem; /* Further reduce gap to fit items on one line */
    }
    .ul-links li a {
        font-size: 1rem; /* Slightly reduce font size */
        padding: 0.5rem 0.2rem; /* Reduce horizontal padding */
    }

    .btn {
        font-size: 1.1rem;
        padding: 0.8rem 1.8rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }

    .navbar-brand {
        font-size: 1.8rem;
    }

    /* Ensure "Nandan" brand is on the left in mobile view */
    .navbar-header {
        position: relative;
        justify-content: space-between; /* Ensures brand on left, hamburger on right */
        width: 100%;
    }

    .hamburger {
        display: flex;
        order: 2; /* Keep hamburger to the end */
    }

    .theme-switch-wrapper {
        order: 1; /* Keep theme switch at the beginning of the header for consistency, or adjust as desired */
        margin-right: auto; /* Pushes theme switch to the left, beside the brand */
        position: static;
        transform: none;
    }

    .ul-links {
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-secondary);
        padding: 1.5rem 0;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 5px 15px var(--shadow-light);
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
        gap: 0; /* Reset gap for vertical stacking */
    }

    .ul-links.open {
        transform: translateX(0);
    }

    .ul-links li {
        text-align: center;
        margin-bottom: 0.8rem;
    }

    .ul-links li a {
        display: block;
        padding: 0.8rem 0;
        width: 100%;
        font-size: 1rem;
        white-space: nowrap; /* Keep items on single line within the mobile menu */
    }

    .ul-links li a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-section {
        flex-direction: column; /* Stack vertically for mobile */
        text-align: center;
        padding-top: 90px; /* Reduced top spacing for mobile */
        padding-bottom: 60px;
    }

    .hero-image-container {
        margin-right: 0; /* Remove right margin for mobile */
        margin-left: 0; /* Ensure no left margin from desktop styles */
        margin-bottom: 2rem; /* Add spacing below the image for mobile */
        order: -1; /* Ensure image is first in the column */
    }

    .text-container {
        margin-right: 0; /* Remove right margin for mobile */
        margin-left: 0; /* Remove left margin for mobile */
        margin-bottom: 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2.8rem;
        text-align: center;
    }

    /* Mobile specific style for the descriptive paragraph */
    .hero-description {
        text-align: center;
        margin-top: 0.8rem; /* Adjusted for mobile spacing */
        margin-bottom: 1.5rem; /* Adjusted for mobile spacing */
        font-size: 1rem; /* Slightly smaller for mobile */
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center; /* Center buttons for mobile */
        align-items: center;
        margin-top: 1.5rem;
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .btn {
        width: auto;
        max-width: none;
    }

    .btn.small-btn {
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
        margin: 0.3rem 0;
    }

    .hero-image {
        width: 280px; /* Smaller for mobile */
        height: 280px; /* Smaller for mobile */
        border: 6px solid var(--border-color); /* Adjusted border thickness for mobile */
    }

    h2 {
        font-size: 2rem;
    }

    .project-grid,
    .skills-categories-grid {
        grid-template-columns: 1fr;
    }

    .contact-content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .contact-form,
    .contact-map {
        max-width: 100%;
        min-width: unset;
    }

    .footer-left,
    .footer-middle,
    .footer-right {
        text-align: center;
        min-width: unset;
    }

    .footer-left h3,
    .footer-middle h3,
    .footer-right h3 {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 3%;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 0.95rem; /* Even smaller for very small screens */
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .hero-buttons {
        gap: 0.5rem;
    }

    .btn.small-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    p {
        font-size: 1rem;
    }

    .project-card,
    .skill-category-card,
    .contact-form {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }

    .project-link-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .skill-category-icon i {
        font-size: 1.5rem;
    }

    .skill-category-card h3 {
        font-size: 1.4rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    .site-footer {
        padding: 2rem 3%;
    }

    .footer-left h3 {
        font-size: 1.1rem;
    }

    /* Keep the desktop navbar links adjusted for very small screens if they appear before hamburger */
    .ul-links li a {
        font-size: 0.9rem;
        padding: 0.6rem 0.1rem;
        white-space: nowrap;
    }
    .ul-links {
        gap: 0.8rem;
    }
}