/* ======= Base Styles ======= */
body {
  background-color: #fdfaf3; /* soft parchment tone */
  color: #222;
  font-family: Verdana, sans-serif;
}

/* ======= Header and Navbar ======= */
.navbar {
  display: flex;
  align-items: center;t
  gap: 15px;
  background-color: #f6eedf; /* parchment accent */
  padding: 10px 20px;
  border-bottom: 1px solid #d4c8b4;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.site-logo {
  height: 120px;
  width: auto;
}

.title-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 10px;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.micro-subtitle {
  font-size: 0.9rem;
  color: #777;
  margin: 0;
}

/* Hidden main title for accessibility and SEO */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ======= Hamburger Menu Button ======= */
.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  color: #333;
}

/* ======= Navigation Links (Tab Style) ======= */
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.nav-links li a {
  display: block;
  padding: 8px 14px;
  background-color: #ece5d8;
  color: #333;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover Effect */
.nav-links li a:hover {
  background-color: #0066cc;
  color: #fff;
}

/* ======= Shown Nav on Toggle (Always Available) ======= */
.nav-links.show {
  display: flex !important;
}

/* ======= Responsive Nav (Mobile) ======= */
@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-logo {
    height: 100px;
    margin-bottom: 10px;
  }

  .title-text {
    align-items: center;
    text-align: center;
    margin: 10px 0;
  }

  .hamburger {
    display: block;
    margin: 10px 0;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #f6eedf;
    width: 100%;
    padding: 10px 0;
  }

  .nav-links li {
    margin: 5px 0;
  }

  .nav-links li a {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
}

/* ======= Main and Footer ======= */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

footer {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.6;
  background-color: #f6eedf; /* parchment tone */
  color: #222;
  border-top: 1px solid #d4c8b4;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* ======= Section Styling ======= */
section {
  margin-bottom: 40px;
}

section h2 {
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.featured-resources {
  background-color: #fcfcfc;
  padding: 20px;
  border-radius: 8px;
}

/* ======= Link Hover Global ======= */
a:hover {
  text-decoration: underline;
  color: #0066cc;
}

/* ======= Typewriter Animation ======= */
#post-text {
  font-family: monospace;
  font-size: 1rem; /* restores default size */
  white-space: pre-wrap;
  border-right: 2px solid #333;
  animation: caret 0.75s steps(1) infinite;
  visibility: hidden;
}

@keyframes caret {
  50% {
    border-color: transparent;
  }
}

/* Fade-in effect for media elements as they appear */
#post-text img,
#post-text video,
#post-text iframe,
#post-text figure {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 600px;
  margin: 1em auto;
  opacity: 0;
  transition: opacity 1s ease;
  border-radius: 6px; /* optional: gives softer edges */
}

/* Ensure media shows instantly when animation is skipped */
#post-text.media-ready img,
#post-text.media-ready video,
#post-text.media-ready iframe,
#post-text.media-ready figure {
  opacity: 1;
}

/* Skip Animation Button Style */
#skip-animation {
  margin-bottom: 1em;
  padding: 0.5em 1.2em;
  font-size: 1rem;
  font-weight: bold;
  background-color: #ece5d8;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#skip-animation:hover {
  background-color: #d4c8b4;
}
