:root {
  /* Light mode palette */
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #1e2430;
  --muted: #5b6578;
  --accent: #2b6be4;
  --border: #e4e8ee;

  /* Extras */
  --radius: 16px;
  --shadow: 0 6px 24px rgba(30, 36, 48, 0.08);
  --section-bg: color-mix(in srgb, var(--accent) 4%, #ffffff);

  --node-w: 170px; /* card width */
  --node-h: 260px; /* card height */
  --arrow-min: 6px;
  --arrow-max: 44px;
  --rail-gap: 8px;

  --header-h: 64px; /* adjust to match your header's actual height */
  --sticky-gap: 8px; /* breathing room under the header */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
}
html {
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}
a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px;
}

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.2) blur(6px);
  background: color-mix(in srgb, #ffffff 85%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}
.nav a.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

/* Main */
main {
  padding: 0; /* let hero fill width */
}

/* Hero */
.hero {
  background: url(Media/Photos/General/hero\ background.png) no-repeat center
    center;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* left align */
  padding: 42px;
  position: relative;
  color: white;
}

.hero .overlay {
  background: rgba(0, 0, 0, 0.5); /* semi-transparent dark overlay */
  padding: 40px;
  border-radius: var(--radius);
  max-width: 600px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2.5rem;
}
.hero p {
  margin: 0 0 16px;
  font-size: 1.2rem;
  line-height: 1.6;
}
.cta {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Sections / Cards */
.section {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.card {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: var(--shadow);
}
.card .kicker {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
}

/* Article-style content */
.article {
  max-width: 1400px;
  margin: 0 auto;
}
.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.media {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}
.media img,
.media video {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f0f2f7;
}

/* ==== Roadmap ==== */
.roadmap-diagram {
  border: 2px solid var(--border);
  background: color-mix(in srgb, var(--accent) 6%, var(--card) 94%);
  border-radius: var(--radius);
  padding-block: 20px;
  margin: 24px auto;
  padding-inline: 0;
  width: 100%;
}

.roadmap-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap !important;
  gap: var(--rail-gap);
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  background: #f5f9ff;
  overflow-x: auto;
}

.roadmap-node {
  flex: 1 1 clamp(140px, 18vw, 190px);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  padding: 12px 10px;
  box-shadow: var(--shadow);
}

.roadmap-node .phase,
.roadmap-node .desc {
  font-weight: 700;
  color: var(--text);
  font-size: 1.15rem;
  margin: 6px 0 4px;
  text-align: center;
}
.roadmap-node .phase {
  text-decoration: underline;
}
.roadmap-node .blurb,
.roadmap-node .target {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}
.roadmap-node .target {
  font-style: italic;
}

.roadmap-arrow {
  flex: 1 1 24px;
  min-width: 4px;

  color: #555;
  font-weight: bold;

  align-self: center;
  display: block;
}

.roadmap-arrow::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 10px solid #6b7280;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

@media (max-width: 980px) {
  .roadmap-rail {
    flex-wrap: wrap;
    row-gap: 16px;
  }
  .roadmap-arrow {
    display: none;
  }
}

@media (max-width: 1100px) {
  .roadmap-node {
    flex-basis: 170px;
    padding: 12px 10px;
  }
  .roadmap-arrow {
    width: 38px;
    height: 9px;
  }
  .roadmap-arrow::after {
    right: -10px;
    border-left-width: 10px;
  }
}

/* Anchor target highlight */
.update-section {
  scroll-margin-top: 84px;
}
.update-section:target {
  outline: 2px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px 24px;
  text-align: center;
}

/* Small screens */
@media (max-width: 600px) {
  .hero {
    padding: 28px;
    height: auto; /* let content size the hero */
  }
  .hero .overlay {
    padding: 24px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
}

/* Weekly Details blocks */
details.update-details {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
details.update-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-weight: 600;
  border-radius: 12px;
}
details.update-details > summary::-webkit-details-marker {
  display: none;
}
details.update-details[open] > summary {
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.update-details .details-body {
  padding: 14px;
  color: var(--text);
  line-height: 1.6;
}
.update-details .details-body .media {
  margin-top: 10px;
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.team-member {
  text-align: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 96%, var(--accent) 4%);
  box-shadow: var(--shadow);
}
.team-member img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin-bottom: 10px;
}
.team-member h4 {
  margin: 0;
  font-size: 1rem;
}
.team-member p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Discipline chips */
.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.chip.me {
  background: #e6f2ff;
  color: #0b63b6;
}
.chip.ee {
  background: #fff1e6;
  color: #b65a0b;
}
.chip.se {
  background: #eaf8ee;
  color: #1f7a3e;
}
.chip.pm {
  background: #f3e8ff;
  color: #6e2bb0;
}

.summary-by-discipline li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

/* Discipline blocks */
.disc-block {
  background: var(--section-bg);
  /*color: var(--text);*/
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.disc-header {
  background: var(--section-bg);
  margin: -0.5rem -0.5rem 0.5rem; /* pull to edges, so no white gap */
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem; /* soften edges */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.disc-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.subheading {
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}

/* Media grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.media-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
}
.media-grid img,
.media-grid video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #f0f2f7;
}
.media-grid figcaption {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Lists */
ul {
  list-style-type: disc;
  margin-left: 1.2rem;
  padding-left: 1rem;
}
ul ul {
  list-style-type: circle;
  margin-left: 1.2rem;
  padding-left: 1rem;
}
ul ul ul {
  list-style-type: square;
  margin-left: 1.2rem;
  padding-left: 1rem;
}

.media img.img-small {
  max-width: 300px; /* control width */
  height: auto;
  display: block;
  margin: 0 auto; /* centers the image */
}

.media figcaption {
  font-style: italic;
  text-align: center;
  font-size: 0.9rem; /* optional: slightly smaller */
  margin-top: 6px;
  color: var(--muted);
}

/* Centered, stacked figure variant for single images */
.media--stack {
  display: block; /* stop flex behavior */
  text-align: center; /* center caption fallback */
  margin: 16px auto; /* nice spacing */
  max-width: 520px; /* keep figure from going too wide */
}

.media--stack img.img-small {
  max-width: 320px; /* control image size */
  height: auto;
  display: block;
  margin: 0 auto; /* center the image */
  border-radius: 12px; /* optional, looks good with your style */
}

.media--stack figcaption {
  font-style: italic;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 6px;
  color: var(--muted);
}

/* --- RCC table (Objectives / Constraints / Criteria) --- */
.table-wrap {
  overflow-x: auto;
  padding: 0.25rem 0;
}
.rcc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.96rem;
}
.rcc-table thead th {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.rcc-table td {
  vertical-align: top;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.rcc-table tr:first-child td {
  border-top: none;
}
.rcc-table ul {
  margin: 0;
  padding-left: 1.2rem;
}
.rcc-table td:first-child,
.rcc-table th:first-child {
  width: 12rem; /* keeps the Need column readable */
  white-space: nowrap;
}
@media (max-width: 720px) {
  .rcc-table td:first-child,
  .rcc-table th:first-child {
    width: 9rem;
  }
}

/* Morphological chart images */
.morph-table .morph-img {
  display: block;
  width: 100%;
  max-width: 220px; /* prevents oversized images */
  height: auto;
  margin: 6px auto;
  object-fit: contain; /* preserves drawing proportions */
  border-radius: 8px;
}
.morph-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .morph-table .morph-img {
    max-width: 160px;
  }
}

.pdf-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}
.pdf-link:hover {
  text-decoration: underline;
}

/* Video and media layout control */
.media-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Apply consistent, responsive video sizing */
.media-grid video {
  width: 60%; /* adjust as needed: try 50–70% */
  max-width: 720px; /* ensures it never exceeds 720px */
  height: auto; /* maintain aspect ratio */
  border-radius: 12px; /* soft corners like your other cards */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
}

/* Optional: tweak how video behaves in small screens */
@media (max-width: 768px) {
  .media-grid video {
    width: 90%;
  }
}
