/* ─────────────────────────────────────────────
       TOKEN SYSTEM — Literary / Classical palette
      ───────────────────────────────────────────── */
:root {
  /* Core palette */
  --cream: #f5f0e8; /* page background — aged paper     */
  --cream-dark: #ede6d8; /* slight deepening for contrast     */
  --ink: #1a1612; /* primary text — rich near-black    */
  --navy: rgb(27, 45, 74); /* headings, accents                 */
  --navy-mid: #2e4a6e; /* secondary navy                    */
  --rust: #8c3a1e; /* warm accent — ink-red             */
  --gold: #b5883a; /* secondary accent                  */
  --mid: #5a5040; /* body secondary text               */
  --faint: #d9d0be; /* borders, rules                    */
  --card-bg: #faf7f0; /* card surface                      */

  /* Functional */
  --border: rgba(26, 18, 12, 0.12);
  --border-sub: rgba(26, 18, 12, 0.07);
}

/* ─────────────────────────────────────────────
             RESET + BASE
            ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.04em;
}
.serif {
  font-family: "Playfair Display", "Times New Roman", serif;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--cream-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--faint);
  border-radius: 3px;
}

/* ─────────────────────────────────────────────
             NAV
            ───────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 54px;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--faint);
}

.nav-logo {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--navy);
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links li a,
.nav-links li button {
  font-family: "DM Mono", monospace;
  font-size: 0.74rem;
  font-weight: 200;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: black;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  position: relative;
  z-index: 2;
}
.nav-links li a:hover,
.nav-links li button:hover,
.nav-links li button.active {
  color: var(--rust);
}

/* The Mobile Menu Button (Hidden on Desktop) */
#mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--navy);
  cursor: pointer;
  position: relative;
  z-index: 1000; /* Keeps the button above the menu overlay */
}

/* ─────────────────────────────────────────────
             RESOURCES DROPDOWN
            ───────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown-caret {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.nav-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 200px;
  background: var(--cream);
  border: 1px solid var(--faint);
  box-shadow: 0 12px 32px rgba(26, 18, 12, 0.14);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 950;
}

/* Hover reveal on desktop … */
.nav-dropdown:hover .nav-dropdown-menu,
      /* … plus an explicit .open class toggled by JS so tap/click works too
           (and so it can be closed reliably on view switch / click-away). */
      .nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  display: block;
}

.nav-dropdown-menu li button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 1.2rem;
  font-size: 0.62rem !important;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.nav-dropdown-menu li button:hover {
  background: var(--cream-dark);
  color: var(--navy);
}

/* Submissions dropdown uses <a> links — match button styling */
.nav-dropdown-menu li a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 1.2rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu li a:hover {
  background: var(--cream-dark);
  color: var(--navy);
}

/* This applies the translucent image over the solid background */
#nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/boat.jpg");
  background-size: 180px auto;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.23; /* Only the image gets the opacity now! */
  pointer-events: none;
}

/* Push main content below nav + banner
            body > *:not(#nav):not(#ship-banner):not(#article-modal) {
              padding-top: 75px;
            } */

/* ─────────────────────────────────────────────
             MAIN VIEW ROUTING
            ───────────────────────────────────────────── */
/* Default view shown */
#view-home {
  display: block;
}
#view-archive {
  display: none;
}
#view-blog {
  display: none;
}
#view-interviews {
  display: none;
}
#view-news {
  display: none;
}
#view-bibliography {
  display: none;
}
#view-faqs {
  display: none;
}
/* About sub-views (Change #5) */
#view-team {
  display: none;
}
#view-advisors {
  display: none;
}
#view-contributors {
  display: none;
}
#view-acknowledgement {
  display: none;
}
/* Contact (Change #6) */
#view-contact {
  display: none;
}

/* ─────────────────────────────────────────────
             HERO / HOME VIEW
            ───────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
             GIF WATER BACKGROUND
            ───────────────────────────────────────────── */

.ocean-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden; /* Ensures the video doesn't bleed out of the hero section */
}

/* This makes the video stretch and crop perfectly */
.ocean-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Acts exactly like background-size: cover */
}
.ocean-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: blue;
  opacity: 0.5;
  z-index: 1;
  mix-blend-mode: luminosity;
}

#globe-wrap {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  height: calc(100vh - 54px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero-copy {
  position: absolute;
  left: 2%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  max-width: clamp(180px, 29vw, 380px);
  pointer-events: none;
  /* Frosted Glass Effect */
  background: rgba(10, 25, 47, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem 2.5rem; /* Standard edge spacing */
  min-height: 350px; /* Force the box to be at least this tall */
  /* Use Flexbox to perfectly center the text vertically inside the new tall box */
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: greenyellow;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease both;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s ease both;
  z-index: 4;
}

.hero-title em {
  font-style: italic;
  color: yellow;
}

/* This forces the new box safely to the right side of the screen */
.hero-instruction {
  position: absolute;
  right: 2%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10; /* High z-index ensures the globe cannot hide it */
  max-width: clamp(180px, 29vw, 380px);
  pointer-events: none;
  text-align: right;
  /* Frosted Glass Effect */
  background: rgba(10, 25, 47, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem 2.5rem; /* Standard edge spacing */
  min-height: 200px; /* Force the box to be at least this tall */
  /* Use Flexbox to perfectly center the text vertically inside the new tall box */
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* This makes the text light and visible */
.hero-instruction p {
  font-family: "Libre Baskerville", serif;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--cream);
  line-height: 1.85;
  animation: fadeUp 0.8s 0.7s ease both;
}

.hero-body {
  font-family: "Libre Baskerville", serif;
  font-size: 0.84rem;
  color: var(--mid);
  line-height: 1.85;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s ease both;
}

/* Globe loading */
#globe-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: none;
}

.ring {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--faint);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

#globe-loading p {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─────────────────────────────────────────────
             INFO PANEL (globe sidebar)
            ───────────────────────────────────────────── */
#info-panel {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%) translateX(calc(100% + 3rem));
  z-index: 200;
  width: min(360px, 88vw);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: rgba(245, 240, 232, 0.96);
  backdrop-filter: blur(24px);
  border: 1px solid var(--faint);
  box-shadow: 0 4px 32px rgba(26, 18, 12, 0.1);
  /* Ruled-line texture */
  background-image: linear-gradient(
      rgba(245, 240, 232, 0.97),
      rgba(245, 240, 232, 0.97)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 26px,
      rgba(26, 18, 12, 0.04) 26px,
      rgba(26, 18, 12, 0.04) 27px
    );
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  pointer-events: none;
}

#info-panel.open {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: all;
}

.panel-header {
  padding: 1.4rem 1.4rem 1rem;
  border-bottom: 1px solid var(--border-sub);
  flex-shrink: 0;
}

.panel-ocean {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.2;
  padding-right: 1.5rem;
}

.panel-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--navy);
  border: 1px solid var(--faint);
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
}

.panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 0.6rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

.panel-x {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mid);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.2rem;
  transition: color 0.15s;
}
.panel-x:hover {
  color: var(--ink);
}

.log-entry {
  padding: 0.75rem 1.4rem;
  border-bottom: 1px solid var(--border-sub);
  transition: background 0.15s;
  cursor: default;
}
.log-entry:last-child {
  border-bottom: none;
}
.log-entry:hover {
  background: var(--cream-dark);
}

.log-title {
  font-family: "Playfair Display", serif;
  font-size: 0.96rem;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.log-author {
  font-size: 0.74rem;
  color: var(--rust);
  margin-bottom: 0.35rem;
}

.log-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.log-tag {
  font-family: "DM Mono", monospace;
  font-size: 0.57rem;
  letter-spacing: 0.06em;
  color: var(--mid);
  background: var(--cream-dark);
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
}

.empty {
  padding: 2.5rem 1.4rem;
  text-align: center;
  color: var(--mid);
}
.empty svg {
  margin-bottom: 1rem;
  opacity: 0.35;
}
.empty p {
  font-size: 0.8rem;
  line-height: 1.75;
}

/* ─────────────────────────────────────────────
             ABOUT (home page inline section)
            ───────────────────────────────────────────── */
#about {
  position: relative;
  z-index: 1;
  padding: 5rem 2.5rem 5rem;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 5rem;
  align-items: start;
  scroll-margin-top: 20px;
}

.section-eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1rem;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 1.6rem;
}

.body-text {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.95;
  margin-bottom: 1.2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--faint);
  gap: 1px;
  background: var(--faint);
  margin-top: 4.5rem;
}

.stat-cell {
  background: var(--card-bg);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-num {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ─────────────────────────────────────────────
             ARCHIVE TAB VIEW
            ───────────────────────────────────────────── */
#view-archive {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.archive-hero {
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1.5px solid var(--faint);
}

.archive-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 2.4rem);
  font-weight: 500;
  font-style: italic;
  color: var(--navy);
  line-height: 1.12;
  margin-bottom: 0.2rem;
}

.archive-hero p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.8;
  max-width: 600px;
}

/* Search + Filter toolbar */
/* Search + Filter toolbar */
.filter-bar {
  display: flex;
  flex-direction: column; /* Stacks everything vertically */
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.search-wrap {
  position: relative;
  width: 100%; /* Forces search to fill the container */
}

.search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.4;
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.25rem;
  font-family: "Libre Baskerville", serif;
  font-size: 0.84rem;
  background: var(--card-bg);
  border: 1px solid var(--faint);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

#search-input::placeholder {
  color: var(--mid);
  opacity: 0.7;
}

#search-input:focus {
  border-color: var(--navy-mid);
}

/* Creates the 50/50 split line for Type and Year */
.filter-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.filter-label {
  min-width: 85px; /* Ensures all the dropdown boxes align vertically */
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
}

.filter-select {
  flex: 1; /* MAGIC: Tells the dropdown to stretch and fill all remaining space */
  width: 100%;
  padding: 0.5rem 1.8rem 0.5rem 0.65rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  background: var(--card-bg);
  border: 1px solid var(--faint);
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6H0z' fill='%235a5040'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stop the reset button from stretching */
.filter-reset {
  align-self: flex-start;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  background: none;
  border: 1px solid var(--faint);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

/* Results summary */
.results-count {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-bottom: 1.5rem;
}
.results-count span {
  color: var(--navy);
}

/* Works grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.work-card {
  background: var(--card-bg);
  border: 1px solid var(--faint);
  padding: 1.5rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

/* Left accent rule */
.work-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: transparent;
  transition: background 0.25s;
}
.work-card:hover {
  border-color: var(--navy-mid);
  box-shadow: 0 2px 16px rgba(26, 18, 12, 0.07);
}
.work-card:hover::before {
  background: var(--navy-mid);
}

.wc-water {
  font-family: "DM Mono", monospace;
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.7rem;
}

.wc-title {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.wc-author {
  font-size: 0.78rem;
  color: var(--mid);
  margin-bottom: 0.8rem;
}

.wc-theme {
  font-size: 0.78rem;
  color: rgba(90, 80, 64, 0.8);
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-sub);
}

.wc-year {
  font-family: "DM Mono", monospace;
  font-size: 0.63rem;
  color: var(--mid);
}

.wc-genre {
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  background: var(--cream-dark);
  padding: 0.14rem 0.5rem;
  border-radius: 2px;
}

/* Empty state for archive */
.archive-empty {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--mid);
}
.archive-empty p {
  font-size: 0.9rem;
  line-height: 1.8;
}
.archive-empty strong {
  color: var(--navy);
}

/* Load More (archive pagination) */
.archive-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.load-more-btn {
  font-family: "DM Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid var(--navy);
  padding: 0.75rem 1.8rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.load-more-btn:hover {
  background: var(--navy);
  color: var(--cream);
}
.load-more-btn:active {
  opacity: 0.85;
}
.load-more-count {
  color: var(--mid);
  opacity: 0.75;
  margin-left: 0.3rem;
}
.load-more-btn:hover .load-more-count {
  color: var(--cream);
  opacity: 0.75;
}

/* ─────────────────────────────────────────────
             BLOG TAB VIEW
            ───────────────────────────────────────────── */
#view-blog {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

#view-interviews {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-hero {
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1.5px solid var(--faint);
}

.blog-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 2.4rem);
  font-weight: 500;
  font-style: italic;
  color: var(--navy);
  line-height: 1.12;
  margin-bottom: 0.2rem;
}

.blog-hero p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.8;
  max-width: 900px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--faint);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.blog-card:hover {
  border-color: var(--navy-mid);
  box-shadow: 0 4px 24px rgba(26, 18, 12, 0.08);
  transform: translateY(-3px);
}

.blog-body {
  padding: 1.6rem;
}

.blog-tag {
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  border: 1px solid var(--faint);
  padding: 0.14rem 0.55rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.blog-title {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 0.8rem;
}

.blog-excerpt {
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-meta {
  display: flex;
  gap: 0.8rem;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  align-items: center;
}

.blog-meta-sep {
  color: var(--faint);
}

/* ─────────────────────────────────────────────
             NEWS & UPDATES VIEW
            ───────────────────────────────────────────── */
#view-news {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.news-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--faint);
  background: var(--card-bg);
}

.news-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.news-table thead th {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  text-align: left;
  padding: 1rem 1.4rem;
  border-bottom: 1.5px solid var(--faint);
  background: var(--cream-dark);
}

.news-table tbody td {
  padding: 1.4rem;
  vertical-align: top;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--mid);
  border-bottom: 1px solid var(--border-sub);
}

.news-table tbody tr:last-child td {
  border-bottom: none;
}

.news-table tbody tr:nth-child(even) {
  background: rgba(217, 208, 190, 0.18);
}

.news-table tbody tr:hover {
  background: var(--cream-dark);
}

.news-link {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: rgba(140, 58, 30, 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.news-link:hover {
  text-decoration-color: var(--rust);
}

/* ─────────────────────────────────────────────
             BIBLIOGRAPHY VIEW
            ───────────────────────────────────────────── */
#view-bibliography {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.biblio-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "DM Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--navy);
  border: 1px solid var(--navy);
  padding: 0.75rem 1.8rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
}

.biblio-viewer-wrap {
  border: 1px solid var(--faint);
  background: var(--card-bg);
  min-height: 70vh;
}

.biblio-frame {
  width: 100%;
  height: 80vh;
  border: none;
  display: block;
}

.biblio-placeholder {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────
             FAQS VIEW
            ───────────────────────────────────────────── */
#view-faqs {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 820px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border-sub);
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-question {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 0.7rem;
}

.faq-answer {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.85;
}

/* ─────────────────────────────────────────────
             ARTICLE MODAL
            ───────────────────────────────────────────── */
#article-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 18, 12, 0.55);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#article-modal.open {
  opacity: 1;
  pointer-events: all;
}

.article-sheet {
  background: var(--cream);
  border: 1px solid var(--faint);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
  padding: 2.8rem;
  transform: translateY(16px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 8px 48px rgba(26, 18, 12, 0.15);
}
#article-modal.open .article-sheet {
  transform: translateY(0);
}

.article-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.btn-close {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: 1px solid var(--faint);
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-close:hover {
  color: var(--ink);
  border-color: var(--mid);
}

.art-tag {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.8rem;
  display: block;
}

.art-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 0.8rem;
}

.art-byline {
  font-family: "DM Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--mid);
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--faint);
  margin-bottom: 1.8rem;
}

.art-body {
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--ink);
}
.art-body p {
  margin-bottom: 1.4rem;
}
.art-body h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--navy);
  margin: 2rem 0 0.9rem;
}

.comments-wrap {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--faint);
}
.comments-head {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.4rem;
}
.comments-placeholder {
  background: var(--cream-dark);
  border: 1px solid var(--faint);
  padding: 1.8rem;
  text-align: center;
}
.comments-placeholder p {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.8;
}
.comments-placeholder code {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  color: var(--navy);
  background: rgba(27, 45, 74, 0.07);
  padding: 0.1rem 0.35rem;
}

/* ─────────────────────────────────────────────
             FOOTER
            ───────────────────────────────────────────── */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(245, 240, 232, 0.08);
  padding: 4rem 2.5rem 3rem;
  text-align: center;
}

.footer-logo {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.55);
  max-width: 380px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  list-style: none;
  margin-bottom: 2.5rem;
}

.footer-nav a,
.footer-nav button {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.footer-nav a:hover,
.footer-nav button:hover {
  color: var(--cream);
}

.footer-copy {
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 232, 0.25);
}

/* ─────────────────────────────────────────────
             ANIMATIONS
            ───────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────
             RESPONSIVE
            ───────────────────────────────────────────── */
@media (max-width: 900px) {
  #about {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 5rem 1.5rem 4rem;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    justify-content: space-between;
  }

  .stat-grid {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  #nav {
    padding: 0 1.25rem;
  }

  /* 1. Show the hamburger button */
  #mobile-menu-btn {
    display: block;
  }

  /* 2. Turn the links into a full-screen overlay */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(245, 240, 232, 0.98); /* Solid cream background */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-y: auto;
    padding: 4rem 3rem 4rem 3rem; /* top padding pushes links below the nav bar */
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* 4. Make the text massive and readable */
  .nav-links li a,
  .nav-links li button {
    font-size: 1.2rem;
    color: var(--navy);
  }

  /* ── Resources dropdown: becomes an inline expandable block
               within the full-screen mobile menu rather than a floating
               popover, since there's no "hover" on touch. ── */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-trigger {
    font-size: 1.2rem !important;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    width: 100%;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 1.25rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    /* Collapsed by default on mobile; only .open expands it */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, margin-top 0.25s ease;
  }

  .nav-dropdown:not(.open) .nav-dropdown-menu {
    max-height: 0;
    margin-top: 0;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 400px;
  }

  .nav-dropdown-menu li button {
    padding: 0.6rem 0;
    font-size: 0.95rem !important;
    color: var(--mid);
  }

  .nav-dropdown-menu li button:hover {
    background: none;
    color: var(--navy);
  }

  /* ── Hero: switch to a stacked column layout ── */
  #hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Text block: static flow at the top, below the nav */
  .hero-copy {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    padding: 5rem 1.5rem 1.25rem;
    text-align: center;
    width: 100%;
    max-width: 100%;
    pointer-events: auto;
    z-index: 10;
  }

  /* Instruction text: static, centered below the title */
  .hero-instruction {
    position: static;
    transform: none;
    right: auto;
    top: auto;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 1.5rem 1rem;
    pointer-events: auto;
  }

  .hero-instruction p {
    font-size: 0.78rem;
    color: var(--mid);
    line-height: 1.7;
    opacity: 1;
    animation: none;
  }

  /* Globe wrap: fill remaining space below the text */
  #globe-wrap {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    flex: 1;
    min-height: 52vw;
    max-height: 55vh;
  }

  /* ocean background still fills the whole hero */
  .ocean-bg {
    position: absolute;
    inset: 0;
  }

  .stat-grid {
    margin-top: 0;
  }

  #info-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 55vh;
    transform: translateY(100%);
    border-radius: 16px 16px 0 0;
    border-top: 2px solid var(--navy);
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  #info-panel.open {
    transform: translateY(0);
  }

  #view-archive,
  #view-blog {
    padding: 2rem 1.25rem 4rem;
  }
  .works-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .article-sheet {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─────────────────────────────────────────────
   NEW VIEWS: ABOUT (TEAM, ADVISORS, CONTRIBUTORS, ACK) & CONTACT
───────────────────────────────────────────── */
#view-team,
#view-advisors,
#view-contributors,
#view-acknowledgement,
#view-contact {
  min-height: calc(100vh - 106px);
  padding: 5rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-section {
  margin-bottom: 4rem;
}

.team-section-label {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 0.5rem;
}

/* Project Head Card */
.team-head-card {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--faint);
  padding: 2rem;
}
.team-role-label {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.5rem;
}

/* Team Image Placeholders */
.team-img-placeholder {
  background: var(--cream-dark);
  border: 1px solid var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.team-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}
.team-img-fallback {
  position: absolute;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  color: var(--mid);
  z-index: 1;
}

.team-head-card .team-img-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  flex-shrink: 0;
}

.team-name {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.team-title {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--mid);
}

/* Grids */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}
.team-member-card {
  background: var(--card-bg);
  border: 1px solid var(--faint);
  padding: 1.5rem;
  text-align: center;
}
.team-member-card .team-img-placeholder.sm {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 across on desktop */
  gap: 1.5rem;
}
.contributor-card {
  text-align: center;
}
.contributor-card .team-img-placeholder.xs {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}
.contributor-card .team-name {
  font-size: 0.9rem;
}
.contributor-card .team-title {
  font-size: 0.65rem;
}

/* Acknowledgement Text Block */
.acknowledgement-body {
  max-width: 800px;
  margin: 0 auto; /* This centers the box */
}
.acknowledgement-block {
  background: var(--card-bg);
  border: 1px solid var(--faint);
  padding: 2rem;
}
.ack-heading {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.ack-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--mid);
  margin-bottom: 1rem;
}
.ack-text:last-child {
  margin-bottom: 0;
}
/* Acknowledgement List Styling */
.ack-list {
  padding-left: 1.5rem;
  margin-top: 1rem;
}
.ack-list .ack-text {
  margin-bottom: 0.8rem;
  display: list-item;
}
.ack-list .ack-text:last-child {
  margin-bottom: 0;
}

/* Contact Us Grid */
.contact-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--faint);
  padding: 2rem;
}
.contact-label {
  font-size: 0.7rem;
  color: var(--rust);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.contact-desc {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.contact-email {
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-all;
}
.contact-email:hover {
  color: var(--rust);
}

/* ─────────────────────────────────────────────
   MOBILE FIXES (Overrides)
───────────────────────────────────────────── */
@media (max-width: 768px) {
  /* FIX 1: Prevent eyebrow text from disappearing under the fixed navbar
     We increase top padding to 5.5rem for ALL sub-views so they clear the 54px header. */
  #view-archive,
  #view-blog,
  #view-interviews,
  #view-news,
  #view-bibliography,
  #view-faqs,
  #view-team,
  #view-advisors,
  #view-contributors,
  #view-acknowledgement,
  #view-contact {
    padding: 5.5rem 1.25rem 4rem !important;
  }

  /* FIX 2: Transform table into stacked cards to prevent horizontal scroll */
  .news-table-wrap {
    border: none;
    background: transparent;
  }
  .news-table {
    min-width: 100% !important;
    display: block;
  }
  .news-table thead {
    display: none; /* Hide table headers on mobile */
  }
  .news-table tbody,
  .news-table tr,
  .news-table td {
    display: block;
    width: 100%;
  }
  .news-table tr {
    background: var(--card-bg) !important;
    border: 1px solid var(--faint);
    margin-bottom: 1rem;
    padding: 1rem;
  }
  .news-table td {
    padding: 0.25rem 0;
    border: none;
  }

  /* Add pseudo-labels so the stacked mobile data makes sense without headers */
  .news-table td:nth-child(1)::before {
    content: "Title:";
    display: block;
    font-size: 0.65rem;
    color: var(--rust);
    text-transform: uppercase;
    font-family: "DM Mono", monospace;
    margin-bottom: 0.2rem;
  }
  .news-table td:nth-child(2)::before {
    content: "Link:";
    display: block;
    font-size: 0.65rem;
    color: var(--rust);
    text-transform: uppercase;
    font-family: "DM Mono", monospace;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
  }
  .news-table td:nth-child(3)::before {
    content: "Information:";
    display: block;
    font-size: 0.65rem;
    color: var(--rust);
    text-transform: uppercase;
    font-family: "DM Mono", monospace;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
  }

  /* Responsive layout tweaks for About/Contact grids */
  .team-head-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .contributors-grid {
    grid-template-columns: repeat(
      2,
      1fr
    ); /* Drop from 5 columns to 2 on mobile */
  }
  .contact-body {
    grid-template-columns: 1fr; /* Stack contact cards */
  }
}
