:root {
    --bg-color: #ffffff;
    --text-color: #222;
    --accent-color: hsl(180, 30%, 35%);
    --card-bg: #f9f9f9;
}

body.dark {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --accent-color: #00bfff;
    --card-bg: #1e1e1e;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    padding-top: 60px; /* Add padding to prevent content from hiding behind fixed nav */
}

header {
    /* Remove padding to eliminate the empty space above the nav */
    padding: 0;
}

nav {
    /* Changed position from sticky to fixed */
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--accent-color);
    z-index: 1000;
    color: white;
    line-height: 1.6;
    text-align: center;
    padding: 10px 0;
    font-family: 'Times New Roman', Times, serif;
    transition: background-color 0.3s, color 0.3s;
}

nav ul {
    margin: 0 auto;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li {
    display: inline;
}

nav a, #toggle-theme {
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

nav a:hover, nav a.active {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

h2 {
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-family:'Times New Roman', Times, serif;
    font-size:2rem;
    align-self: center;
}

.project-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.project-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.project-card a {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--accent-color);
    color: white;
}

#about, #projects, #skills, #experience, #education, #contact {
    background: var(--card-bg);
    padding: 10px 20px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-top: 40px;
}

#about h2 {
    margin-bottom: 10px;
    font-family:'Times New Roman', Times, serif;
    font-size: 4ex;
}

#about .name-highlight {
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-color);
}

#about p {
    font-size: 1.1em;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 20px;
}

#about .tagline {
    color: var(--accent-color);
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 0;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.skills-list li {
    background-color: var(--card-bg);
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.exp-date, .edu-date {
    font-size: 0.85em;
    color: gray;
    display: block;
    margin-top: 10px;
}

nav ul li a {
    margin-right: 10px;
}

/* --- New Contact Form Styles --- */
#contact {
    /* Uses your existing section styles from the provided CSS */
    background: var(--card-bg);
    padding: 10px 20px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-top: 40px;
}

#contact .contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

#contact .contact-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#contact .contact-details p {
    margin: 0;
}

#contact .form-horizontal {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-control,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--text-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.send-button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.send-button:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}
/* --- End New Contact Form Styles --- */

/* media start */
@media (max-width: 600px) {
    nav ul {
        flex-wrap: wrap;
        flex-direction: row;
        gap: 8px;
        padding: 6px 0;
        justify-content: center;
    }
    nav ul li {
        flex: 1 1 45%;
        margin-bottom: 6px;
        display: flex;
        justify-content: center;
    }

    nav a, #toggle-theme {
        font-size: larger;
        width: 100%;
        display: block;
    }

    nav {
        padding: 2px 0;
    }
    #contact .form-horizontal {
    width: 80%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    }
    #about h2 {
    padding-top: 30px;
    }
}
/* media end */