/*///////////////////////////////////////////////////////////////*/
/* GLOBAL HTML VARIABLES / STYLING */
/*///////////////////////////////////////////////////////////////*/

:root {
    color-scheme: light;
    --nav-background: #23282d;
    --nav-text: #f2f2f2;
    --nav-submenu-background: #333;
    --background: #ffffff;
    --surface-bg: #eee;
    /*--text: #222222;*/
    --text: #4b5563;
    --text-muted: #666666;
    --accent: #4672fe;
    /* Roboto, Arial, Georgia, Montserrat, Inter... */
    --font-family: "Inter", sans-serif;
}

:root.dark-mode {
    color-scheme: dark;
    --nav-background: #232323;
    --nav-text: #fff;
    --nav-submenu-background: #23282d;
    --background: #121212;
    --surface-bg: #4672fe;
    --text: #eeeeee;
    --text-muted: #aaaaaa;
    --accent: #4672fe;
    /*--accent: #80aaff;*/
}

/* make specified dimensions include padding and border */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.wrapper-main {
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
}

/*///////////////////////////////////////////////////////////////*/
/* FONTS */
/*///////////////////////////////////////////////////////////////*/

@font-face {
    font-family: "Montserrat";
    src: url("../assets/fonts/google-fonts/Montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
}

@font-face {
    font-family: "Scriptin";
    src: url("../assets/fonts/SCRIPTIN.ttf") format("truetype");
}


/*///////////////////////////////////////////////////////////////*/
/* TOP NAV BAR */
/*///////////////////////////////////////////////////////////////*/

.topnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-background);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 5rem;
    transition: 300ms;
    padding: 0 20px;
    opacity: 1;
    font-family: var(--font-family);
}

.logo img {
    display: block;
    height: 3rem;
    width: auto;
    object-fit: contain;
}

@keyframes shrink-nav {
    to {
        height: 3.25rem;
    }
}

@keyframes shrink-logo {
    from {
        height: 3.25rem;
    }
    to {
        height: 2rem;
    }
}
@supports (animation-timeline: scroll()) {
    .topnav {
        animation: shrink-nav linear both;
        animation-timeline: scroll(root);
        animation-range: 0px 400px;
    }

    .logo img {
        animation: shrink-logo linear both;
        animation-timeline: scroll(root);
        animation-range: 0px 400px;
    }
}

/* group night light and nav menu aligned right */
.nav-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* NAVIGATION LINKS */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--nav-text);
    letter-spacing: 0.1rem;
    text-decoration: none;
    /*font-weight: bold;*/
    border-radius: 5px;
    padding: 14px 16px;
    transition: background-color 200ms, color 200ms;
}

/* Change color on hover */
.nav-menu a:hover {
    /*background: #555;*/
    /*background-color: #dddddd;*/
    color: var(--accent);
    background: #ddd;
}


/*///////////////////////////////////////////////////////////////*/
/* MOBILE NAVIGATION */
/*///////////////////////////////////////////////////////////////*/

/* HAMBURGER BUTTON */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    transition: transform 200ms, opacity 200ms;
}

@media (max-width: 700px) {
    .topnav {
        min-height: 60px;
        padding: 0 16px;
    }

    .nav-group {
        gap: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px;
        background: var(--nav-submenu-background);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        padding: 14px 16px;
        border-radius: 5px;
    }

    html.dark .nav-menu {
        background: var(--nav-submenu-background);
    }

    /* Animate hamburger into an X */
    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}


/*///////////////////////////////////////////////////////////////*/
/* DARK MODE TOGGLE */
/*///////////////////////////////////////////////////////////////*/

.night-light-label #night-light-checkbox {
    position: absolute;
    visibility: hidden;
}

.night-light-label {
    display: block;
    margin: 0;
    height: 31px;
    width: 60px;
    border: 2px solid var(--accent);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;  /* mobile interaction, disabling square background flash */
}

.night-light-label .night-light-ball {
    position: absolute;
    width: 25px;
    height: 25px;
    top: 1px;
    left: 1px;
    border-radius: 50%;
    background: var(--accent);
    z-index: 99;
    transition: 300ms;
}

/* move ball on click */
.night-light-label #night-light-checkbox:checked + .night-light-ball {
    transform: translateX(28px);
}

/* set icon size and position relative to slider */
.moon-svg,
.sun-svg {
    width: 16px;
    height: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    fill: #ffffff
}

/* shift icons back in a little */
.moon-svg {
    right: 5px;
}
.sun-svg {
    left: 5px;
}

.hero, .logo img {
    transition: filter 300ms ease;
}
.dark-mode .hero {
    filter: invert(1) hue-rotate(180deg);
}

/* test changing logo w/ filter instead of separate img
.dark-mode .logo img {
  filter: sepia(1) saturate(800%) hue-rotate(20deg);
*/


/*///////////////////////////////////////////////////////////////*/
/* CONTENT */
/*///////////////////////////////////////////////////////////////*/

h1, h2, h3 {
    font-family: var(--font-family);
}

body {
    margin: 0;
    background-color: var(--background);
    color: var(--text);
    font-family: var(--font-family);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: cover;
}

.nametag {
    padding: 2rem 5% 0rem;
}
.nametag h1 {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: 4rem;
    letter-spacing: 0.1rem;
}
.nametag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 800px;
    margin-inline: auto;
}
.nametag-list > div {
    flex: 1 1 150px;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: center;
    /* button-style implies clickable, dissapointing when not -> remove for now
    background: var(--surface-bg);
    border-radius: 10px;
    */
}

.profile {
    display: grid;
    grid-template-columns: 3fr 7fr;
    gap: 1rem;
    padding: 2rem 5%;
    max-width: 2000px;
    margin-inline: auto;
    align-items: stretch;
    box-sizing: border-box;
}

.profile-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.profile-img-container img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.profile-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    padding-left: 1rem;
}

.profile-text h2,
.profile-text h3 {
    margin: 0 0 0.75rem;
    letter-spacing: 0.1rem;
    font-family: "Montserrat", sans-seriff;
}

.profile-text p {
    margin: 0 0 0.75rem;
}

@media (max-width: 700px) {
    .profile {
        grid-template-columns: 1fr;
    }

    .profile-img-container {
        max-height: 75vh;
    }
}

.signature {
    font-family: "Scriptin";
    font-size: 2.5rem;
    margin-top: 1rem;
    font-weight: bold;
}

.parallax {
    background-image: var(--parallax-background); /* define inline */
    min-height: 150px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: brightness(0.75);
}
.dark-mode .parallax {
    filter: brightness(0.45);
}

/* Turn off parallax scrolling for all tablets and phones */
@media only screen and (max-device-width: 700px) {
    .parallax {
        background-attachment: scroll;
    }
}


/*///////////////////////////////////////////////////////////////*/
/* FOOTER */
/*///////////////////////////////////////////////////////////////*/

.footer {
    /*background-color: #f1f1f1;*/
    background-color: var(--background);
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.footer-logo {
    display: block;
    max-height: 10rem;
    width: auto;
    object-fit: contain;
}
.dark-mode .footer-logo {
    filter: invert(1);
}

