/* ==========================
Navigation Styles
========================== */
header {
  background: var(--clr-nav-background);
  color: var(--clr-nav);
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 10;
}

/* ==========================
Responsive Video/Embed Styles
========================== */
.embed-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.embed-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
/* Video Embed (youtube or vimeo etc)
   ----------------------------------
   This CSS creates a responsive video embed container that maintains 
   the aspect ratio of the video.
   Use by wrapping your <iframe> embed code in a div with the class "videoWrapper" 
   and an additional class indicating the aspect ratio, 
   e.g., "ratio-16-9" or "ratio-4-3".
   
*/
.videoWrapper {
    position: relative;
    padding-top: 25px;
    height: 0;
}

.videoWrapper.ratio-16-9 {
    padding-bottom: 56.25%;
    /* 16:9 */
}

.videoWrapper.ratio-4-3 {
    padding-bottom: 75%;
    /* 4:3 */
}



html {
  background: var(--primary-bg);
  margin: 0;
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  width: 100%;
}

.logo {
  color: var(--clr-nav);
  text-decoration: none;
}

.menu-button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--clr-nav);
  border-radius: 1px;
  transition: 
    transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1),
    opacity 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  transform-origin: center;
}

.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

nav { background: var(--clr-nav-background); }

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 520ms cubic-bezier(0.42, 0, 0.58, 1), opacity 260ms cubic-bezier(0.42, 0, 0.58, 1);
}

.menu.is-open {
  max-height: 80vh;
  opacity: 1;
}

.menu li + li { border-top: 2px solid rgba(255,255,255,0.45); }

.menu a {
  display: block;
  padding: 1rem;
  text-align: center;
  color: var(--clr-nav);
  text-decoration: none;
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--clr-nav-hover-bg);
  color: var(--clr-nav-hover);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .menu { transition: none; }
}

/* Figure and Image Styles */
figure {
  text-align: center;
  margin: 2rem auto;
}

figure img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 2rem;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-section .image-credit {
  position: relative;
  z-index: 2;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin: 0;
}

.hero-section .image-credit a {
  color: white;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 500px;
  }
}

.hero-img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  display: block;
  margin: 1rem auto;
}

.hero-img-wrapper {
  position: relative;
  display: block;
  max-width: 500px;
  margin: 1rem auto;
}

.image-credit {
  text-align: left;
  margin: 0.5rem 0 0 0;
}

/* Desktop layout */
@media (min-width: 1240px) {
  header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; }
  .topbar { display: contents; }
  .menu-button { display: none; }
  nav { background: transparent; }
  .menu {
    max-height: none;
    opacity: 1;
    overflow: visible;
    display: flex;
    gap: 0.5rem;
    transition: none;
  }
  .menu li + li { border-top: none; }
  .menu a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-align: center;
    transition: background 180ms cubic-bezier(0.25, 0.1, 0.25, 1), color 180ms cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  .menu a:hover,
  .menu a:focus-visible {
    background: var(--clr-nav-hover-bg);
    color: var(--clr-nav-hover);
  }
  
}

  /* ==========================
  Footer Styles
  ========================== */
  footer,
  .site-footer {
    background: #4D96FF;
    margin: 0;
    padding: 1rem;
    color: #1E1E1E;
    text-align: center;
  }

/* Match desktop header horizontal padding */
@media (min-width: 1240px) {
  footer,
  .site-footer { padding: 1rem 1.5rem; }
}

/* ==========================
About page: sticky footer
Only affects aboutme.html via .page-about
========================== */
.page-about {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-about main {
  flex: 1;
}
