/* ---------- Theme Variables ---------- */

:root {
    /* Core background: dark green, not black */
    --bg-main: #202220;

    /* British Racing Green–inspired navbar */
    --bg-navbar: #0b1f17;           /* deep forest green */
    --bg-navbar-elevated: #122e24;  /* slightly lighter green */

    /* Content surfaces */
    --bg-surface: #16181c;
    --bg-elevated: #0b1f17;

    /* Text */
    --text-main: #e5e7eb;
    --text-muted: #b0b4bf;
    --text-faint: #8a8f9c;

    /* Accent: muted antique jade */
    --accent: #7fb7a1;

    /* Borders */
    --border-subtle: #2a3f36;
}


/* ---------- Global Reset ---------- */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* ---------- Typography ---------- */

body {
    font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.75;
    letter-spacing: 0.1px;
        background:
        radial-gradient(
            circle at top,
            rgba(255, 255, 255, 0.02),
            transparent 60%
        ),
        var(--bg-main);
}



/* ---------- Navbar ---------- */

.navbar {
    background:
        linear-gradient(
            to bottom,
            rgba(11, 31, 23, 0.98),
            rgba(11, 31, 23, 0.92)
        );
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1000;

    /* very subtle depth */
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02),
        0 8px 24px rgba(0, 0, 0, 0.35);

    font-size: 1.2rem;
    letter-spacing: 0.25px;
}

.main-logo {
    align-items: center; /* THIS fixes the vertical mismatch */
    margin-right: 10px;
    transform: translateY(5px);
}


.navbar {
    background-color: #fff;  /* Adjust as needed */
    padding: 10px;           /* Adjust spacing */
}

.nav-container {
    display: flex;           /* Use Flexbox */
    align-items: center;     /* Vertically center items */
    padding-left: 50px;        /* Add some padding on the left and right */
    padding-right: 50px;        /* Add some padding on the left and right */
}

.navbar-logo {
    width: 28px;             /* Set desired pixel width */
    height: 28px;            /* Set desired pixel height */
    margin-right:10px;      /* Space between logo and title */
}

.nav-title {
    font-size: 24px;         /* Adjust as needed */
    color: #ffffff;             /* Text color */
    text-decoration: none;    /* No underline */
    font-variant: small-caps;
}

.nav-links {
    margin-left: auto;       /* Pushes the links to the right */
    display: flex;           /* Flexbox for the dropdowns */

    align-items: center; /* THIS fixes the vertical mismatch */
    gap: 0.8rem;
}



/* prevent link states from changing appearance */
.nav-title:visited,
.nav-title:hover,
.nav-title:active,
.nav-title:focus {
    color: var(--text-main);
    text-decoration: none;
}


.nav-links a,
.nav-links button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    
}

.nav-links a:hover,
.nav-links button:hover {
    color: var(--accent);
}

/* ---------- Hover Menus ---------- */

.dropdown-menu {
    display: flex;
    align-items: center; /* center the span vertically */
    position: relative;  /* needed for dropdown */
}


.dropdown-button {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: default;
    padding: 0.7rem 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;   /* space between text and caret */
    line-height: 1;
    transition: filter 0.3s; /* Smooth transition */
}


/* caret */
.dropdown-button::after {
    content: "▾";
    font-size: 0.75em;
    color: var(--text-faint);
    position: relative;
    top: 0.05em;
    transition: transform 0.15s ease, color 0.15s ease;
}

.dropdown-menu:focus-within .dropdown-button::after,
.dropdown-menu:hover .dropdown-button::after {
    transform: rotate(180deg);
    color: var(--accent);
}

.nav-links a {
    color: var(--text-muted);
}

.dropdown-menu:hover .dropdown-button,
.nav-links a:hover {
    color: var(--accent);
}

/* Dropdown initially hidden */
.dropdown-popup {
    position: absolute;
    top: 2.4rem;             /* adjust if needed to clear button */
    right: 0;
    background: var(--bg-navbar-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.4rem 0;
    min-width: 240px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;

    box-shadow: 0 14px 36px rgba(0,0,0,0.45);
    z-index: 100;
}


.dropdown-menu:focus-within .dropdown-popup,
.dropdown-menu:hover .dropdown-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.dropdown-popup a {
    display: block;
    padding: 0.55rem 1.2rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
}

.dropdown-popup a:hover {
    background: var(--bg-surface);
    color: var(--accent);
}


/* ---------- Main Content ---------- */

.main-content {
    max-width: 780px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    margin-top: 50px;
}

.main-content a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.main-content img {
    display: block;           /* makes margin auto centering work */
    margin: 1.5rem auto;      /* vertical spacing + horizontal centering */
    max-width: 100%;          /* never exceeds container width */
    height: auto;             /* preserve aspect ratio */
    border-radius: 6px;       /* subtle rounding for elegance */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* optional classy depth */
}

.main-content img:hover {
    transform: scale(1.02);
    transition: transform 0.25s ease;
}


.main-content ul,
.main-content ol {
    display: block;                /* ensure normal block layout */
    list-style-type: disc;          /* bullets for ul */
    list-style-position: outside;   /* bullets outside text */
    padding-left: 2rem !important; /* force indentation */
    margin: 1rem 0 !important;     /* vertical spacing */
}

.main-content ol {
    list-style-type: decimal;
    padding-left: 2rem !important;       /* numbers for ol */
}

.main-content li {
    display: list-item;             /* force normal list-item behavior */
    margin-bottom: 0.5rem;
    line-height: 1.5;
    padding-left: 2rem !important;
}

.main-content ul li::marker {
    color: var(--text-muted);
}
.main-content ol li::marker {
    color: var(--text-muted);
}

.main-content ul ul,
.main-content ol ol {
    padding-left: 1rem;      /* slight extra indent for sublists */
}





/* ---------- Headings ---------- */

h1, h2, h3 {
    font-weight: 500;
    color: var(--text-main);
    margin-top: 3rem;
}

h1 {
    font-size: 2.4rem;
    letter-spacing: -0.3px;
    margin-top: 0;
}

h2 {
    font-size: 1.55rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.4rem;
}

h3 {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ---------- Body Text ---------- */

p {
    margin: 1.6rem 0;
    text-align: justify;
    color: var(--text-main);
}

/* ---------- Links ---------- */

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- Tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}

thead {
    background: var(--bg-elevated);
}

th, td {
    padding: 0.85rem 1.1rem;
    text-align: left;
}

th {
    font-weight: 500;
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

td {
    color: var(--text-main);
}

tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-subtle);
}

/* ---------- Subtle Details ---------- */

::selection {
    background: rgba(143, 179, 255, 0.25);
}

hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 3rem 0;
}


/* ---------- Footer ---------- */

.site-footer {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-family: Georgia, "Times New Roman", serif; /* elegant serif */
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 3rem; /* spacing from content */
    
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* ---------- Image Caption ---------- */

.image-caption {
    text-align: center;          /* Center the caption text */
    font-size: 0.9rem;          /* Keep font size slightly smaller than main text */
    color: var(--text-muted);   /* Use muted text for subtlety */
    margin-top: -1.5rem;         /* Space between the image and caption */
    font-style: italic;          /* Optional: italicize for elegance */
}




/* ---------- Tweak Layout for Mobile ---------- */


@media (max-width: 768px) {
    .main-content {
        max-width: 100%;
        font-size: 1.05rem;
        padding: 1.25rem;
        margin-top: 10px
    }

    .main-content p {
        text-align: left;
    }

    .main-content h1 {
        font-size: 1.8rem;
    }

    .main-content h2 {
        font-size: 1.4rem;
    }

    .nav-container {

    padding-left: 5px;        /* Add some padding on the left and right */
    padding-right: 0px;        /* Add some padding on the left and right */
    }

    .nav-links {
    margin-left: auto;       /* Pushes the links to the right */
    display: flex;           /* Flexbox for the dropdowns */

    align-items: center; /* THIS fixes the vertical mismatch */
    gap: 0rem;
    }

    .nav-title {
    font-size: 20px;         /* Adjust as needed */
    color: #333;             /* Text color */
    text-decoration: none;    /* No underline */
    font-variant: small-caps;
}

}

