/* CSS Variables for Light and Dark Mode */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --section-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --higlight-color: #e46e00;
    --link-color: #e98c01;
    --button-bg: #ffffff;
    --button-border: #cccccc;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg: #2d2d2d;
    --section-bg: #242424;
    --border-color: #404040;
    --higlight-color: #eef110;
    --link-color: #f0ff66;
    --button-bg: #2d2d2d;
    --button-border: #555555;
}

/* Dark Mode Toggle Button */
#dark-mode-toggle {
    background-color: var(--button-bg);
    border: 2px solid var(--button-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

#dark-mode-toggle:hover {
    transform: scale(1.2);
}

#dark-mode-toggle:active {
    transform: scale(0.85);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 1rem;
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0rem auto; /*setting left and right padding to auto centers the nav content */
}

nav h1 {
    font-size: 2rem; /* Increase font size for prominence */
    font-weight: bold; /* Ensure it stands out */
    color: var(--higlight-color); /* Use a distinct color */
    margin-right: 2rem; /* Add spacing between h1 and ul */
}

nav h1 a {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit the color from the parent element */
}

nav ul {
    list-style: none; /* Remove bullet points */
    display: flex; /* Use flexbox for horizontal alignment */
    gap: 1.5rem; /* Increase spacing between navigation links */
    align-items: center; /* Ensure vertical alignment with h1 */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

nav ul li {
    display: inline; /* Ensure list items are inline */
}

nav ul li a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Use the current text color */
    font-weight: bold; /* Make links bold */
}

nav ul li a:hover {
    text-decoration: underline; /* Add underline on hover */
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    padding: 2rem;
    margin-bottom: 2rem;
    
}

section h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

section p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul {
    
    padding-left: 2rem; /* Indent list */
}

ul li {
    padding: 0.2rem 0;
}

/* Horizontal Rule */
hr {
    border: none; /* Remove default border */
    border-top: 1px solid #ccc; /* Add a custom line */
    margin: 10px 0; /* Add spacing above and below */
    width: 100%; /* Adjust the width */
    margin-left: auto; /* Center the line */
    margin-right: auto;
}

/* Footer */
footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1rem;
    text-align: center;
    
    transition: background-color 0.3s ease;
}

/* Images */
img {
    max-width: 100%; /* Ensure images fit within their container */
    height: auto; /* Maintain aspect ratio */
}

/* Responsive Design */
@media (max-width: 768px) {
    header, main, footer {
        padding: 1rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    nav h1 {
        font-size: 1.2rem;
    }

    nav {
        flex-wrap: wrap; /* Allow items to wrap to the next line */
        gap: 0.5rem; /* Reduce spacing between items */
    }

    #dark-mode-toggle {
        aspect-ratio: 1 / 1; /* Maintain circular shape */
        min-width: 30px; /* Prevent shrinking too much */
        min-height: 30px; /* Prevent shrinking too much */
    }
}
