/* Basic Reset & Body Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #fdfdfd;
    margin: 0;
    padding: 0;
}

/* Container for Centering Content */
main, header, footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
    color: #111;
}

header p {
    font-size: 1.1em;
    color: #555;
}

/* Section Styling */
section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 1.8em;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    margin-top: 40px; /* Add space above section titles */
}

section h3 {
    font-size: 1.4em;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Typography */
p {
    margin-bottom: 1.2em;
}

ul, ol {
    margin-bottom: 1.2em;
    padding-left: 25px;
}

li {
    margin-bottom: 0.6em;
}

strong {
    font-weight: 600;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Illustrations */
figure {
    margin: 30px 0;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

figure figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* References Section */
#references ol {
    list-style-type: none; /* Remove default numbering */
    padding-left: 0;
}

#references li {
    margin-bottom: 1em;
    padding-left: 30px; /* Space for custom counter */
    position: relative;
}

#references li::before {
    content: "[" counter(ref-counter) "]";
    counter-increment: ref-counter;
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #555;
}

body {
    counter-reset: ref-counter; /* Initialize counter */
}

/* Footer */
footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.9em;
    color: #888;
}

/* Responsive Design */
@media (max-width: 840px) {
    main, header, footer {
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    section h2 {
        font-size: 1.6em;
    }

    section h3 {
        font-size: 1.3em;
    }
}



/* Navigation Styling */
nav {
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
    padding: 10px 0;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

