:root {
    /* header colors */
    --header-bgColor: #08102d;
    --dropdown-nav-bgColor: #0d1a49;
    --lightest-blue2: #9AC8CD;

    /* footer colors*/
    --lightest-blue: #E1F7F5;
    --light-blue: #1679AB;
    --blue: #102C57;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bgColor);
    padding: 0 10%;
    width: 100%;
    height: 80px;
    z-index: 1000;
}

header img {
    height: 50px;
}

header nav,
footer nav {
    float: right;
    display: block;
    position: static;
    width: auto;
}

.my-logo {
    text-decoration: none;
}

/* links (i.e., home, portfolio, services, etc.)*/
header nav ul li,
footer nav ul li {
    display: inline-block;
    margin: 10px 20px;
}

header li,
footer li {
    list-style: none;
}

.nav-link {
    position: relative;
    text-decoration: none;
    font-size: 18px;
}

header .nav-link {
    color: white;
}

.nav-link.active,
.nav-link:hover {
  color: var(--lightest-blue2);
  transition: 0.3s ease-out;
  -webkit-transition: 0.3s ease-out;
  -moz-transition: 0.3s ease-out;
  -ms-transition: 0.3s ease-out;
  -o-transition: 0.3s ease-out;
}

header .nav-link.active {
  font-size: 16px;
  font-weight: 350;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    color: white;
    font-size: 25px;
    border: none;
    background: var(--header-bgColor);

    transition: transform 0.12s ease, color 0.12s ease;
}

.menu-toggle:hover {
    transform: scale(1.12);
    color: var(--lightest-blue2);
}

/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  border: none;
  background: var(--lightest-blue2);
  color: var(--header-bgColor);
  text-decoration: none;
  padding: 8px 12px;
  z-index: 9999;
}
.skip-link:hover {
  color: var(--dropdown-nav-bgColor);
  background: white;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
}

/* Desktop nav layout */
/* Ensure the hidden attribute is always honored to avoid flashes during initial load */
.nav-list[hidden] {
  display: none !important;
  visibility: hidden !important;
}

.nav-list {
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-list li {
  list-style: none;
  margin: 0;
}
.nav-list .nav-link {
  display: inline-block;
  padding: 8px 0;
}

/* Mobile nav behavior (single nav used for all sizes) */
/* Hide the nav list on small screens and reveal via header.menu-open */
.nav-list.mobile-hidden {
  display: none;
}

header.menu-open .nav-list {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--dropdown-nav-bgColor);
  padding: 12px 0;
  max-height: 70vh;
  overflow-y: auto;
  transition: max-height 0.35s ease-in-out, padding 0.2s ease-in-out;
  gap: 0;
  align-items: stretch;
}

header.menu-open .nav-list li {
  width: 100%;
}

header.menu-open .nav-list li a {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-align: center;
}

/* focus styles for keyboard users */
 .nav-link:focus-visible {
  outline: 3px solid var(--lightest-blue2);
  outline-offset: 2px;
  border-radius: 4px;
}

header hr {
  display: none;
}



/* ------------------ responsiveness -------------------*/
@media all and (max-width: 1024px) {
    header {
        padding: 5px 8%;
    }

    header img {
        height: 42px
    }
}

@media only screen and (max-width: 850px) {
    header img {
        height: 32px
    }

    /* Hide nav on small screens until toggled */
    .nav-list {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    /* when header.menu-open is applied via JS, the nav-list becomes visible (see rules above) */
}




/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    position: relative;
    bottom: 0;
    left: 0;

    background: var(--lightest-blue);
    padding: 8px 10%;
    width: 100%;
    height: 60px;

    font-weight: 400;
    box-shadow: inset 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
}

.nav-link.footer-nav {
    color: var(--light-blue);
    font-size: 16px;
    font-weight: 500;
}

.nav-link.footer-nav.active,
.nav-link.footer-nav:hover {
    color: var(--blue);
    font-size: 14px;
}

footer p {
    font-size: 16px;
    text-align: center;
    color: var(--light-blue);
}



/* ------------------ responsiveness -------------------*/
@media all and (max-width: 1024px) {
    footer {
        padding: 8px 8%;
    }
}

@media only screen and (max-width: 850px) {
    footer {
        align-items: center;
        justify-content: center;
        height: 45px;
    }

    footer nav {
        display: none;
    }
}