/* Using :root to define color variables for the themes */
:root {
    /* Dark Mode (Default) */
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --primary-color: #007bff;
    --border-color: #333;
    --link-hover-color: #4da3ff;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

body.light-mode {
    /* Light Mode (toggled by JS) */
    --bg-color: #f4f4f4;
    --text-color: #333;
    --card-bg: #ffffff;
    --primary-color: #0056b3;
    --border-color: #ddd;
    --link-hover-color: #004085;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* --- Base Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    /* Smooth transition for theme switching */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    color: var(--text-color);
    transition: color 0.3s ease;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 40px;
}

p {
    font-size: 1.1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* --- Header & Theme Toggle --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows stacking on small screens */
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

#theme-toggle {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

#theme-toggle:hover {
    background-color: var(--link-hover-color);
}

/* --- Project Card Styling --- */
.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.project-card h3 {
    margin-top: 0;
}

.project-links a {
    margin-right: 15px;
    font-weight: bold;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    header {
        /* Stack header items vertically on small screens */
        flex-direction: column;
        align-items: flex-start;
    }

    #theme-toggle {
        margin-top: 15px;
    }
}