body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}

#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  background: #93251f;
  min-height: 65px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a,
.dropbtn {
  height: 65px;
  display: flex;
  align-items: center;
  padding: 0 14px;

  color: white;
  text-decoration: none;
  font-size: 20px;

  background: none;
  border: none;
  cursor: pointer;
}

.dropdown {
  position: relative;
  height: 65px;
  display: flex;
  align-items: center;
}

nav a:hover,
.dropbtn:hover {
  background: #ba2f28;
}

.logo {
  font-size: 21px;
  font-weight: bold;
  margin-right: auto;
}

/* Compact weekly menu: weeks 1-7 left, weeks 8-14 right. */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(7, 32px);
  grid-auto-flow: column;
  background: #ba2f28;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.dropdown-content a,
.dropdown-content .coming-soon {
  display: flex;
  align-items: center;
  height: 32px;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 8px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  line-height: 1.2;
  white-space: nowrap;
}

/* Single-width dividers between the two columns and seven rows. */
.dropdown-content > :nth-child(-n + 7) {
  border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.dropdown-content > :nth-child(7),
.dropdown-content > :nth-child(14) {
  border-bottom: none;
}

.dropdown-content .coming-soon {
  color: #f1d9d7;
  cursor: default;
}

.dropdown-content a:hover,
.dropdown-content a:focus-visible {
  background: #cc342c;
}

/* Support mouse and keyboard navigation. */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: grid;
}

main {
  max-width: 900px;
  margin: 70px auto;
  padding: 0 30px;
}

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


.image-caption {
  margin: -12px 0 24px;
  text-align: center;
  font-weight: bold;
  font-style: italic;
  color: #666;
}

.project-video {
  display: block;
  width: 650px;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

.site-footer {
  margin-top: 60px;
  padding: 16px 30px 24px;
  background: rgba(255, 255, 255, 0.20);
  color: inherit;
  font: inherit;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid #cfd0c7;
  padding-top: 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.footer-accessibility {
  justify-self: end;
}

.site-footer .footer-accessibility,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.site-footer a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    line-height: 1.5;
  }

  .footer-accessibility {
    justify-self: center;
  }
}

.final-page {
  background-image: url("images/AboutMe-BG.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.final-page main {
  background: rgba(255, 255, 255, 0.80);
  padding: 30px;
  border-radius: 12px;
}

.final-page main img {
  width: 650px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
}

.final-page main iframe,
.bg-page main iframe {
  display: block;
  max-width: 100%;
  margin: 24px auto;
}

.bg-page {
  background-image: url("images/mas-background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.bg-page main img {
  width: 650px;
  max-width: 100%;
  height: auto;
}

main img.keep-photo-size {
  width: 300px;
  max-width: 100%;
  height: auto;
}

/* Homepage assignment cards */
.home-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.home-page main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1140px;
}

.home-page .site-footer {
  margin-top: auto;
}

.weekly-section {
  margin: 48px 0 32px;
}

.weekly-section > h2,
.weekly-intro {
  text-align: center;
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.week-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d7cfca;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.home-page main .week-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0;
}

.week-card-text {
  padding: 18px;
}

.week-card h3 {
  margin: 0 0 10px;
  color: #93251f;
  font-size: 20px;
  line-height: 1.4;
}

.week-card p {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

.week-card:hover {
  border-color: #93251f;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.week-card:focus-visible {
  outline: 3px solid #93251f;
  outline-offset: 4px;
}

@media (max-width: 800px) {
  .weekly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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