body {
    --toggle-background: #091540;
    --toggle-icon-invert: 1;
    color: var(--ink, black);
    font-family: "Source Sans 3", Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.65;
    background-color: var(--bg, #e6f1fa);
    margin: 0;
    padding: 0;
}

/* This styles the main container for the resume */
.main-container {
    background-color: var(--elevated, #f6f5f4);
    max-width: 700px;
    margin: 30px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.1));
    border-top: 4px solid var(--line, #2c365a);
}

/* This styles the name at the top */
h1, h2 {
    font-family: "DM Sans", Arial, sans-serif;
    text-wrap: balance;
}

h1 {
    color: var(--ink, #2c365a);
    font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
}

/* styling for section headers */
h2, #lab4 {
    color: var(--ink, #003d5c);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    border-bottom: 1px solid var(--line, #ddd);
    padding-bottom: 5px;
    margin: 2rem 0 0.75rem;
}

/* Header styling */
body > header {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--surface, #091540);
}

/* Keep the solid navy fallback when backdrop blur is unavailable. */
@supports (backdrop-filter: blur(12px)) {
    body > header {
        background-color: var(--header-glass, rgba(9, 21, 64, 0.9));
        backdrop-filter: blur(12px);
    }
}

nav {
    display: flex;
    overflow-x: auto;
}

nav a {
    flex: 0 0 auto;
    color: var(--ink, #f2f2f2);
    text-align: center;
    padding: 20px 16px;
    text-decoration: none;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
}

nav a:hover {
    background-color: var(--elevated, #ddd);
    color: var(--ink, black);
}

nav a:focus-visible {
    outline: 2px solid var(--focus, #e6f1fa);
    outline-offset: -4px;
}

nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 5px;
}

/* Keep the phone menu control hidden on wider screens. */
.nav-toggle, .nav-toggle-label {
    display: none;
}

@media (max-width: 600px) {
    .nav-toggle {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

    .nav-toggle-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 16px;
        color: var(--ink, #f2f2f2);
        font-size: 1.0625rem;
        font-weight: 600;
        line-height: 1.4;
        cursor: pointer;
    }

    .nav-toggle:focus-visible + .nav-toggle-label {
        outline: 2px solid var(--focus, #e6f1fa);
        outline-offset: -4px;
    }

    #primary-nav {
        display: none;
        flex-direction: column;
    }

    .nav-toggle:checked ~ #primary-nav {
        display: flex;
    }

    #primary-nav a {
        text-align: left;
        padding: 14px 16px;
    }
}

/* Leave clearance above fragment targets and keyboard-focused content. */
html {
    scroll-padding-top: 80px;
}

nav a.active {
  background-color: #04AA6D;
  color: white;
}

/* Leave room below the content for the fixed theme control. */
body {
    padding-bottom: 80px;
}

.theme-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background-color: var(--toggle-background);
    color: var(--ink, #f2f2f2);
    cursor: pointer;
}

.theme-toggle:focus-within {
    outline: 3px solid var(--focus, #04AA6D);
    outline-offset: 3px;
}

/* Keep the checkbox operable while the icon supplies its visible appearance. */
.theme-toggle input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.theme-toggle img {
    display: block;
    filter: invert(var(--toggle-icon-invert));
}

/* Template tokens are inherited from the page root; light-mode fallbacks stay above. */
.main-container p {
    color: var(--muted, inherit);
    margin: 0 0 1rem;
}

.main-container > :last-child {
    margin-bottom: 0;
}

.main-container a {
    color: var(--accent, revert);
}

.main-container a:focus-visible {
    outline: 2px solid var(--focus, #2c365a);
    outline-offset: 3px;
}
/* Adapted from the supplied CodeFronts root-token demo; retain the manual override. */
@media (prefers-color-scheme: light) {
    body:has(#theme-toggle:checked) {
        --bg: #09090b;
        --surface: #121216;
        --elevated: #17171c;
        --ink: #f4f4f5;
        --muted: #a1a1aa;
        --line: #26262c;
        --accent: #8b8bff;
        --focus: #a5b4fc;
        --shadow: rgba(0, 0, 0, 0.6);
        --header-glass: rgba(18, 18, 22, 0.95);
        --toggle-background: #f4f4f5;
        --toggle-icon-invert: 0;
        color-scheme: dark;
    }
}
/* Adapted from the supplied CodeFronts root-token demo; retain the manual override. */
@media (prefers-color-scheme: dark) {
    body:not(:has(#theme-toggle:checked)) {
        --bg: #09090b;
        --surface: #121216;
        --elevated: #17171c;
        --ink: #f4f4f5;
        --muted: #a1a1aa;
        --line: #26262c;
        --accent: #8b8bff;
        --focus: #a5b4fc;
        --shadow: rgba(0, 0, 0, 0.6);
        --header-glass: rgba(18, 18, 22, 0.95);
        --toggle-background: #f4f4f5;
        --toggle-icon-invert: 0;
        color-scheme: dark;
    }
}


/* styling to weather */
#weather {
    display: flex;
    align-items: center;
    gap: 12px;
}

#weather img {
    border-radius: 8px;
}
/* enlarge the image icon when mouse hovers over it */
#weather img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

#weather:hover img {
    transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
    #weather img {
        transition: none;
    }
}