@import "colors.css?v=6";
@layer base, layout, components;
/* ========= Root Variables ========= */
:root {
    /* Theme controls: change these tokens to adjust an entire color mode. */
    --theme-text: var(--mint-green);
    --theme-text-muted: var(--mossy-green);
    --theme-heading: color-mix(in srgb, var(--theme-text), black 20%);
    --theme-logo: color-mix(in srgb, var(--theme-text), black 40%);
    --theme-body-start: var(--light-orange);
    --theme-body-end: var(--cream);
    --theme-main-start: var(--lighter-orange);
    --theme-main-end: var(--lighter-cream);
    --theme-nav-start: var(--mossy-green);
    --theme-nav-end: var(--dark-turqoise);
    --theme-surface: var(--mint-cream);
    --theme-surface-raised: var(--lighter-cyan);
    --theme-border: var(--mossy-green);
    --theme-accent: var(--keppel);
    --theme-accent-strong: var(--tiffany-blue);
    --theme-highlight: var(--light-cyan);
    --theme-outline-a: var(--celadon);
    --theme-outline-b: var(--tiffany-blue);
    --theme-field-bg: rgb(255 255 255 / 55%);
    --theme-field-text: #101827;
    --theme-button-bg: var(--wine);

    /* Semantic aliases consumed by page-level styles. */
    --base-text-color: var(--theme-text);
    --muted-text-color: var(--theme-text-muted);
    --surface-color: var(--theme-surface);
    --surface-raised-color: var(--theme-surface-raised);
    --border-color: var(--theme-border);
    --accent-color: var(--theme-accent);
    --accent-strong-color: var(--theme-accent-strong);
    --field-bg-color: var(--theme-field-bg);
    --field-text-color: var(--theme-field-text);
    --button-bg-color: var(--theme-button-bg);

    --nav-fill: var(--theme-nav-start);
    --nav-gradient: var(--theme-nav-end);
    --nav-bg-color: linear-gradient(to left, var(--nav-fill), var(--nav-gradient));
    --nav-text-color: var(--base-text-color);
    --nav-border-color: var(--theme-border);

    --nav-gap:clamp(1.5rem, 4vw, 4.6875rem);
    --nav-font-size:1rem;
    --nav-padding:clamp(1rem, 2.5vw, 2rem);
    --page-highlight: var(--theme-highlight);
    --theme-svg-color: var(--base-text-color);
    
    --logo-size-1:2rem;
    --logo-size-2:2.5rem;
    --logo-size:var(--logo-size-2);
    --logo-color: var(--theme-logo);
    --body-fill: var(--theme-body-start);
    --body-gradient: var(--theme-body-end);
    --body-bg-color: linear-gradient(to right, var(--body-fill), var(--body-gradient));
    --main-fill: var(--theme-main-start);
    --main-gradient: var(--theme-main-end);
    --main-height: 80vh;
    --main-bg-color: linear-gradient(to right, var(--main-fill), var(--main-gradient));
    --intro-text-color: var(--theme-heading);
    --two-color-outline: var(--theme-outline-a) 5px 5px, var(--theme-outline-b) -5px -5px;
    --h1-color: var(--theme-heading);

    --h1-font-size-1: 2rem;
    --h1-font-size-2: 3rem;
    --h1-font-size: var(--h1-font-size-2);

    --header-height:5rem; 
    
    --footer-height:3.5rem;

    
}
/* ========= Root Variables Dark Mode ========= */
:root.dark {
    --theme-text: var(--moonlight-blue);
    --theme-text-muted: var(--mist-blue);
    --theme-heading: #F1F6FC;
    --theme-logo: var(--moonlight-blue);
    --theme-body-start: var(--midnight-950);
    --theme-body-end: var(--midnight-850);
    --theme-main-start: var(--midnight-900);
    --theme-main-end: var(--midnight-800);
    --theme-nav-start: #102A43;
    --theme-nav-end: var(--midnight-950);
    --theme-surface: #102943;
    --theme-surface-raised: #173955;
    --theme-border: var(--steel-blue);
    --theme-accent: var(--aurora-cyan);
    --theme-accent-strong: #8BD9C9;
    --theme-highlight: #294B68;
    --theme-outline-a: #3D738B;
    --theme-outline-b: #69BFC1;
    --theme-field-bg: #E6EFF8;
    --theme-field-text: #091625;
    --theme-button-bg: #285F78;
}
/* ========= Universal Tags ========= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color:var(--base-text-color);
    font-family: Helvetica, Arial, sans-serif;
    font-size: clamp(1rem,calc(1rem + 0.4vw), 1.15rem);

}

*::before,
*::after {
    box-sizing: inherit;
}

.content-grid {
    --padding-inline: 2rem;
    --content-max-width: 70ch;
    --breakout-max-width: 85ch;

    --breakout-size: calc((var(--breakout-max-width) - var(--content-max-width)) /2);

    display:grid;
    grid-template-columns: 
        [full-width-start] minmax(var(--padding-inline), 1fr)
        [breakout-start] minmax(0, var(--breakout-size))
        [content-start] min(100% - (var(--padding-inline) * 2), var(--content-max-width)) [content-end]
        minmax(0, var(--breakout-size)) [breakout-end]
        minmax(var(--padding-inline), 1fr) [full-width-end];
}

.content-grid > :not(.breakout, .full-width), 
.full-width > :not(.breakout, .full-width) {
    grid-column: content;
}

.content-grid > .breakout {
    grid-column: breakout;
}

.content-grid > .full-width {
    grid-column: full-width;
}


/* ========= Global Tags ========= */
h1 {
    display:flex;
    justify-content: center;
    color: var(--h1-color);
    font-size: var(--h1-font-size)
}
/* ========= Body Tags ========= */
body {
    display: flex;
    flex-direction: column;
    background: var(--body-bg-color);
   
}
/* ========= Main Tags ========= */
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: var(--main-height);
    padding: 1rem;
    background:  var(--main-bg-color);
}
/* ========= Header & Nav Tags ========= */
header menu, nav+button{
    display: none;
}
header {
    display:flex;
    flex-direction: row;  
    position: relative;
    width: 100%;
    min-width: 0;
    height: var(--header-height);
    align-items: center;
    
    > nav {
        -background: var(--nav-bg-color);
        text-transform: uppercase;
        padding:var(--nav-padding);
        flex:1;
        min-width: 0;
    }
    ul {
        display:flex;
        min-width: 0;
        list-style-type: none;
        align-items: center;
        justify-content: flex-start;
        gap: var(--nav-gap);
        padding: 0px;
        margin: 0px;
        a {
            display:inline-flex;
            align-items: center;
            white-space: nowrap;
            text-decoration: none;
            &:not(.logo a) {
                box-shadow: var(--two-color-outline);
                color: var(--nav-text-color);
                font-size: var(--nav-font-size);
                -background-color: var(--pale-red);
                padding: calc(var(--nav-font-size)/4);
            }
        }

    }
}




li.logo {
    margin-right: auto;
}
.logo a {
    font-size: var(--logo-size);
    color: var(--logo-color);
    font-weight: bold;
    -letter-spacing: -0.5;
}
#navigation .nav-current {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: var(--two-color-outline);
    color: var(--nav-text-color);
    font-size: var(--nav-font-size);
    padding: calc(var(--nav-font-size)/4);
    background-color: var(--page-highlight);
    opacity: .67;
    font-weight: 600;
    cursor: default;
    user-select: none;
}
/* ========= Theme ========= */
#theme-menu-heading {
    color:var(--nav-text-color);

}

.theme-menu summary{
    list-style: none;
}
.theme-menu ul {
    gap:0;
}

.theme-menu li {
    display: none;
}

:root:not(.dark) .theme-menu li:has(button[data-theme="dark"]),
:root.dark .theme-menu li:has(button[data-theme="light"]) {
    display: list-item;
}

.theme-menu button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

li > button {
    background-color: transparent;
    cursor:pointer;
    border: none;
}  
.icon-sun,
.icon-moon {
    width: 1.5rem;
    height: 1.5rem;
    stroke: var(--theme-svg-color);
    fill: none;
    stroke-width: 2;
}
  
button[data-theme="light"]:hover .icon-sun {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

button[data-theme="dark"]:hover .icon-moon {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}
/* ========= Footer Tags ========= */

footer {
    display:flex;
    justify-content: center;
    height: var(--footer-height);
}
small {
    margin:auto;
}

  

/* ========= View Transitions ========= */
/*View transitions Disabled for now*/
/* @view-transition {
    navigation: auto;
}     

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 1.2s;
    animation-timing-function: ease-in-out;
}

::view-transition-old(root) {
    animation-name: crazy-out;
}

::view-transition-new(root) {
    animation-name: crazy-in;
} */
@keyframes fade-out-up {
    from {
      opacity: 1;
      transform: translateY(0%);
    }
    to {
      opacity: 0;
      transform: translateY(100%);
    }
   }
@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0%);
    }
}
   
@keyframes crazy-out {
    from {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
        filter: blur(6px);
    }
}

@keyframes crazy-in {
    from {
        opacity: 0;
        transform: scale(1.1) rotate(5deg);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0);
    }
}

/*========== Sizing Adjustments for Nav Breakpoints========*/

/* The compact menu is a mobile fallback; wider layouts retain the full nav. */
@media (max-width: 760px){
    .page-title {
        display: none;
    }

    header nav > ul > li:not(.logo):not(.theme-menu):not(:has(> .nav-current)){
        display: none;
    }
    header{
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-inline-end:var(--nav-padding);
        
        nav > ul{
            gap:clamp(.5rem, 2vw, 1rem);
        }
        nav > ul > li:has(> .nav-current) {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }
        .nav-current {
            font-size: clamp(.75rem, 3.5vw, .9rem);
        }
        nav+button{
            --bar-w: 25px;
            --bar-h: 5px;
            --bar-gap: 10px;
            --bar-color: var(--nav-text-color);
            --menu-width: calc(var(--bar-w) + 16px);
            --menu-height: calc(3 * var(--bar-h) + 2 * var(--bar-gap) + 16px);
            position: relative;
            display: inline-block;
            width: var(--menu-width);
            height: var(--menu-height);
            -border: 1px solid hsl(0 0% 100% / .2);
            -border-radius: .5rem;
            border:none;
            box-shadow: var(--two-color-outline);
            background: transparent;
            cursor: pointer;
            &::before, &::after {
                content:"";
                position:absolute; 
                left: 50%;
                top: 50%;
                height:3px;
                width: var(--bar-w);
                height: var(--bar-h);
                background: var(--bar-color);
                transform: translate(-50%, -50%);
                transition: transform .25s ease, opacity .25s ease, top .25s ease;
            }
            &::before{
                box-shadow:
                    0 calc(-1 * (var(--bar-gap) + var(--bar-h))) 0 0 var(--bar-color),
                    0 calc( 1 * (var(--bar-gap) + var(--bar-h))) 0 0 var(--bar-color);
            }
            &::after {
                opacity:0;
            }
        }
        > menu[popover]{
            display: none;   
            -position: fixed;           
            inset: auto 1rem auto auto; 
            -translate: 0 50%;
            top:5rem;
            right:0%;
            &:popover-open{
                display: flex;
                flex-direction:column;            
                margin: 0; 
                padding: 0.5rem 0;
                list-style: none;
                background: linear-gradient(to left,var(--nav-fill), var(--nav-gradient));
                border: 1px solid var(--nav-border-color);
                -border-radius: .6rem;
                box-shadow: 0 10px 25px rgba(0,0,0,.25);
            }
            li:has(> a[aria-current="page"]) {
                display: none;
            }
            a {
                display: block;
                padding: .65rem 1rem;
                color: var(--nav-text-color);
                text-decoration: none;
                &:hover {
                    background: hsl(0 0% 100% / .08);
                }
            }
        }
        &:has(menu[popover]:popover-open) > button[popovertarget]{
            &::before {
                box-shadow: none;
                transform: translate(-50%, -50%) rotate(45deg);
            }
            &::after {
                opacity: 1;
                transform: translate(-50%, -50%) rotate(-45deg);
            }
        }
    }
}

/* Enable default cross-fade for all content */
html.view-transition {
    view-transition-name: default;
}

/* Make content fade smoothly when DOM changes */
::view-transition-old(default) {
    animation: fadeOut 200ms ease forwards;
}

::view-transition-new(default) {
    animation: fadeIn 250ms ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
