html {
  interpolate-size: allow-keywords;
}

/* Theme colors */
:root {
  --text: #212529;
  --link: #007bff;
  --card-bg: aliceblue;
  --bg-overlay: transparent;
  --bar: #000;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #e4e6eb;
  --link: #6ea8fe;
  --card-bg: #1e2430;
  --bg-overlay: rgba(10, 12, 20, 0.85);
  --bar: #fff;
}

body {
    font-family: "Open Sans", sans-serif;
    color: var(--text);
    background-image: linear-gradient(var(--bg-overlay), var(--bg-overlay)), url('https://content.codecademy.com/courses/learn-css-selectors-visual-rules/hypnotize_bg.png');
    width: 100vw;
  }
  
  header {
    padding: 20px 0;
  }
  
  header .row, footer .row {
    display: flex;
    align-items: center;
  }
  
  h1 {
    font-weight: 700;
    margin: 0;
  }

  h5 {
    text-align: center;
  }

  a {
    color: var(--link);
  }

  .theme-toggle {
    padding: 1rem;
    border: none;
    background: none;
    color: white;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
  }

  .theme-toggle::before {
    content: '\1F319';
  }

  :root[data-theme="dark"] .theme-toggle::before {
    content: '\2600\FE0F';
  }

  nav {
    display: flex;
  }

  @media (min-width: 1200px) {
    header h1.col-sm-6 {
      flex: 1;
      max-width: none;
    }

    nav.col-sm-6 {
      width: fit-content;
      flex: none;
      max-width: none;
      margin: 3rem auto;
      background: hsl(0 0% 0% /0.8);
      padding: 8px;
      border-radius: 8px;

      isolation: isolate;

      anchor-name: --hovered-link;

      .nav-li:hover {
        anchor-name: --hovered-link;
      }

      &::after {
        content: '';
        position: absolute;
        z-index: -1;
        height: 5px;
        background: cornflowerblue;

        border-radius: 10px;

        position-anchor: --hovered-link;

        transition: 1000ms
          linear(
          0,
          0.029 1.6%,
          0.123 3.5%,
          0.651 10.6%,
          0.862 14.1%,
          1.002 17.7%,
          1.046 19.6%,
          1.074 21.6%,
          1.087 23.9%,
          1.086 26.6%,
          1.014 38.5%,
          0.994 46.3%,
          1
        );
      }

      &:has(a:hover)::after {
        top: anchor(bottom);
        left: anchor(left);
        right: anchor(right);
        bottom: anchor(bottom);
      }

      @supports (corner-shape: squircle) {
        border-radius: 24px;
        corner-shape: squircle;
      }

      > .nav-ul {
        padding: 0;
        margin: 0;
        list-style: none;
        display: flex;
      }

      a,
      a:hover,
      a:visited,
      a:active {
        display: block;
        padding: 1rem;
        text-decoration: none;
        color: white;
      }
    }
}

@media (max-width: 1199px) {
  .nav-ul {
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
  }

  .nav-li {
    margin: 10px;
  }
}


/* Mobile Hamburger  */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--bar);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 500px) {
  header .row {
    flex-wrap: wrap;
  }

  h1 {
    width: 100%;
  }

  nav {
    position: relative;
    width: 100%;
    justify-content: flex-end;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-ul {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    margin: 0;
    padding: 10px 0;
    background: hsl(0 0% 0% / 0.9);
    border-radius: 8px;
    z-index: 10;
  }

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

  .nav-li {
    margin: 0;
    text-align: center;
  }

  .nav-li a {
    display: block;
    padding: 10px 20px;
    color: white;
  }
}
/* End Mobile Hamburger */

  .jumbotron {
    display: flex;
    align-items: center;
    background-image: url('images/eburgh.JPG');
    background-size: cover;
    color: wheat;
    height: 500px;
  }
  
  .jumbotron h2 {
    font-size: 60px;
    font-weight: 700;
    margin: 0;
    color: wheat;
  }
  
  .jumbotron h3 {
    margin: 0 0 10px;
    color: wheat;
  }
  
  section .row img {
    margin: 0 0 30px;
    width: 100%;
  }

  .col-sm-4 {
    background-color: var(--card-bg);
    border: solid;
    border-color: #2a70e0;
    border-width: 1px;
    border-radius: 5px;
  }
  
  .col-md-6 {
    margin: 0 0 30px;
  }
  
  .btn.btn-primary {
    border-radius: 2px;
    border: 0px;
    color: #fbd1d5;
    background-color: #ffffff;
  }
  
  .btn.btn-primary:hover {
    color: #ffffff;
    background-color: #fbd1d5;
  }
  
  .btn-secondary {
    background-color: #2a70e0;
    color: #ffffff;
    margin: 0 0 30px;
  }
  
  .portrait {
    width: 100%;
    height: 200px;
    border-radius: 5px;
  }
  
  figure img {
    width: 100%;
    height: auto;
  }
  
  figure {
    margin-bottom: 30px;
  }

  .font-weight {
    font-weight: 700;
  }

  .font-weight-bold {
    text-align: center;
  }
  
  footer {
    font-size: 12px;
    padding: 20px 0;
  }
  
  footer .col-sm-8 {
    display: flex;
    justify-content: flex-end;
  }
  
  footer ul {
    list-style: none;
  }

  .footer-logo {
    width: 70px;
    height: 70px;
  }
  
  /* @media (max-width: 990px) {
    nav {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      width: 100%;
    }

    body {
      width: 100vw;
    }
  }

  @media (max-width: 518px) {
    .container-index {
      height: 100%;
    }
  }

  @media (max-width: 490px) {
    .jumbotron {
      height: 650px;
    }
  } */

  /* Nav Transition */

  @view-transition {
    navigation: auto;
  }

  ::view-transition-group(page-content) {
    animation-duration: 1s;
    animation-timing-function: ease;
  }

  ::view-transition-old(page-content) {
    animation-name: slide-out;
  }

  ::view-transition-new(page-content) {
    animation-name: slide-in;
  }

  main {
    view-transition-name: page-content;
  }

  @keyframes slide-out {
    to {
      translate: -100vw;
    }
  }

    @keyframes slide-in {
    from {
      translate: 100vw;
    }
  }