:root {
    /* Shared colors */
    --hover-button-color: #0655a4;

    /* Light mode colors */
    --primary-color: #0071e3;
    --secondary-color: #333;
    --background-color: #f5f5f7;
    --text-color: #333;
    --header-bg: linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(240, 240, 245, 0.8));
    --nav-shadow: rgba(0, 0, 0, 0.1);

    /* Dark mode colors */
    --dark-primary-color: #4da3ff;
    --dark-secondary-color: #f5f5f7;
    --dark-background-color: #1a1a1a;
    --dark-text-color: #f5f5f7;
    --dark-header-bg: linear-gradient(to right, rgba(26, 26, 26, 0.8), rgba(38, 38, 38, 0.8));
    --dark-nav-shadow: rgba(0, 0, 0, 0.3);
    --dark-navbar-bg: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.8));
    --dark-header-body-color: rgb(110, 110, 115);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Header and navigation */
header {
    background-color: var(--background-color);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    opacity: 0;
    transition: opacity 0.3s ease-in-out, pointer-events 0.3s ease-in-out;
    pointer-events: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.logo a.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-menu {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
}

/* Add this new style for center-aligned animation on desktop */
.nav-menu a::after {
    transform-origin: center;
}

/* Media query for mobile devices */
@media screen and (max-width: 768px) {
    .nav-menu {
        padding-left: 1rem; /* Add left padding to the entire menu */
    }

    .nav-menu a::after {
        transform-origin: left;
        bottom: 0;
        left: 2rem; /* Align the underline with the text */
        width: calc(100% - 4rem); /* Adjust width to account for padding */
    }

    .nav-menu a:hover::after,
    .nav-menu a.active::after {
        transform: scaleX(1); /* Make the underline full width of the text */
    }

    .nav-menu a, #darkModeToggle {
        display: block;
        padding: 0.5rem 2rem !important;
    }
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        box-shadow: 0 2px 5px var(--nav-shadow);
    }

    .dark-mode .nav-menu {
        background-color: var(--dark-background-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a, #darkModeToggle {
        display: block;
        padding: 0.5rem 2rem !important;
    }

    .nav-menu a::after {
        bottom: 0;
    }
}

/* Dark mode styles */
.dark-mode header {
    background-color: var(--dark-background-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dark-mode .nav-menu a,
.dark-mode .logo a {
    color: var(--dark-text-color);
}

.dark-mode .hamburger span {
    background-color: var(--dark-text-color);
}

.dark-mode .nav-menu a::after {
    background-color: var(--dark-primary-color);
}

/* Updated Hero section styles */
#hero {
    text-align: left;
    padding: 0;
    background: linear-gradient(135deg, var(--background-color) 0%, #e8e8ed 100%);
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,113,227,0.1) 0%, rgba(0,113,227,0) 70%);
    transform: rotate(30deg);
}

#hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 6rem;
    position: relative;
    z-index: 1;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#hero h2 {
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

#hero p {
    font-size: 1.2rem;
    color: var(--header-body-color);
    max-width: 600px;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--hover-button-color);
}

@media (max-width: 768px) {
    #hero {
        padding: 6rem 0 4rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero h2 {
        font-size: 1.5rem;
    }

    #hero p {
        font-size: 1rem;
    }

    #hero .container {
        padding: 6rem 2rem 4rem;
    }
}

/* Experience section */
.job {
    background-color: white;
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px var(--nav-shadow);
}

.job h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.job .company {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.job .date {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.job ul {
    padding-left: 1.5rem;
}

/* Skills section */
#skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style-type: none;
    margin-top: 1rem;
}

#skills li {
    background-color: #e8e8ed;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Contact section */
#contact a {
    color: var(--primary-color);
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--background-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    nav ul li:first-child {
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

/* Updated section styles */
#about, #experience, #skills, #contact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Add more space between section titles and content */
#about h2, #experience h2, #skills h2, #contact h2 {
    margin-bottom: 2rem; /* Increase from 1rem to 2rem */
}

/* Add space between paragraphs in the about section */
#about p {
    margin-bottom: 1rem;
}

/* Adjust job card spacing */
.job {
    background-color: white;
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px var(--nav-shadow);
}

.job h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem; /* Increase from 0.5rem to 1rem */
}

.job .company {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem; /* Add some space after the company name */
}

.job .date {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 1.5rem; /* Increase from 1rem to 1.5rem */
}

.dark-mode .job .date {
    color: var(--dark-secondary-color);
}


/* Adjust skills section spacing */
#skills ul {
    margin-top: 1rem; /* Add space between the title and the skills list */
}

@media (max-width: 768px) {
    #hero .container {
        padding: 6rem 1rem 4rem;
    }

    #about, #experience, #skills, #contact {
        padding: 3rem 1rem;
    }
}

/* Animation styles */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in.appear {
    opacity: 1;
    transform: translateX(0);
}

/* Add this to your existing styles */
#hero {
    position: relative;
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.animated-bg span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(0, 113, 227, 0.1);
    animation: move 25s linear infinite;
    bottom: -150px;
}

@keyframes move {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

.typing-effect::after {
    content: '|';
    animation: blink 0.7s infinite;
}

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

/* Dark mode toggle button */
#darkModeToggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
}

/* Dark mode styles */
body.dark-mode {
    background-color: var(--dark-background-color);
    color: var(--dark-text-color);
}

body.dark-mode nav ul li a {
    color: var(--dark-text-color);
}

body.dark.mode nav ul li:first-child a {
    color: var(--dark-primary-color);
}

body.dark.mode nav ul li:first-child a:hover {
    color: var(--dark-primary-color);
}

body.dark-mode #hero {
    background: linear-gradient(135deg, var(--dark-background-color) 0%, #2a2a2a 100%);
}

/* Update the hero h1 color for dark mode */
body.dark-mode #hero h1 {
    color: var(--dark-text-color);
}

body.dark-mode .job,
body.dark-mode #skills li {
    background-color: #2a2a2a;
    color: var(--dark-text-color);
}

body.dark-mode .job .company {
    color: var(--dark-primary-color);
}

body.dark-mode .cta-button {
    background-color: var(--dark-primary-color);
}

body.dark-mode .cta-button:hover {
    background-color: var(--hover-button-color);
}

body.dark-mode footer {
    background-color: var(--dark-background-color);
    color: var(--dark-secondary-color);
}

body.dark-mode #about ul li::before {
    color: var(--dark-primary-color);
}

body.dark-mode .animated-bg span {
    background: rgba(77, 163, 255, 0.1);
}

/* Modify the parallax class */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Add a specific style for the hero section to ensure it doesn't have parallax */
#hero {
    background-attachment: scroll;
}

nav ul li a.active {
    color: var(--primary-color);
    font-weight: 700;
}

body.dark-mode nav ul li a.active {
    color: var(--dark-primary-color);
}

#about ul {
    padding-left: 20px;
}