/* 0. VARIABLES */
:root {
  /* spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  /* colors */
  --color-bg: #fafafa;
  --color-text: #222;
  --color-border: #e0e0e0;
  --line-height: 1.6;
    --color-accent: #DA291C; /* Swiss red (matches CH-IQI page) */

}

/* 1. RESET & BASE */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 100%;
}
body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height);
  display: flex;
  flex-direction: column;
}

/* 2. CONTAINER GRID */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  flex: 1;
}

/* 3. HEADER */
/* 3a. Site header */
#site-header {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

/* 3b. Social links */
.social-links {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  font-size: 0.9rem;
}
.social-links a {
  color: #555;
  text-decoration: none;
  font-weight: 500;
}

.social-links a:hover {
  color: #000;
}

/* 3b. Nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 3c. Main nav */
.main-nav {
  margin-top: var(--space-sm);
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}
.main-nav a {
  padding: 0.25rem 0.5rem;
  color: #555;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
}
.main-nav a:hover,
.main-nav a.active {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.main-nav a.active::after {
  display: none;
}


/* 3d. Dropdown extended */
.main-nav ul li {
  position: relative;
}
.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-width: 240px;
  z-index: 10;
}
.main-nav .has-dropdown:hover .dropdown-menu {
  display: block;
}
.main-nav .dropdown-menu li {
  margin: 0;
}
.main-nav .dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.main-nav .dropdown-menu a:hover {
  background: #f0f0f0;
  color: #000;
}
.main-nav .dropdown-menu a .flagship-star {
  display: inline-flex;
  align-items: center;
  margin-left: 0.3rem;
  color: #5f5f5f;
  opacity: 0.75;
}
.main-nav .dropdown-menu a .flagship-star svg {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
}
.main-nav .has-dropdown > a .arrow {
  margin-left: 0.25rem;
  font-size: 0.8rem;
}

/* 4. MAIN CONTENT */
.content {
  padding: var(--space-lg) 0;
}
.content section {
  margin-bottom: var(--space-lg);
}
.content section:last-child {
  margin-bottom: 0;
}

/* 4a. Section headings */
.content h1,
.content h2 {
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: #111;
}
.content h1 {
  font-size: 2.5rem;
  text-align: center;
}
.content h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-top: var(--space-lg);
}

/* 4b. Intro paragraph */
.intro p {
  max-width: 600px;
  font-size: 1rem;
  color: #444;
  text-align: center;
  margin: 0 auto var(--space-md);
}

/* 4b2. Lists */
.content ul,
.content ol {
  padding-left: var(--space-md);
  margin: var(--space-sm) 0;
}

/* 4d. EduPace page */
.edupace-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-xl);
}
.edupace-hero__content h1 {
  text-align: left;
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  margin-bottom: var(--space-sm);
}
.edupace-title img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
}
.edupace-hero__content .lead {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: var(--space-md);
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #777;
  margin-bottom: var(--space-sm);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.hero-note {
  margin: 0 0 var(--space-md);
  font-size: 0.95rem;
  color: #5a5a5a;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button.primary {
  background: #111;
  color: #fff;
}
.button.secondary {
  background: #fff;
  color: #111;
  border-color: #d5d5d5;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.edupace-hero__visual {
  display: grid;
  gap: var(--space-md);
}
.hero-image {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}
.hero-image img {
  width: 100%;
  aspect-ratio: 16 / 9;         /* forces consistent hero framing */
  height: auto;
  object-fit: cover;            /* no letterboxing */
  border-radius: 22px;
  border: 1px solid var(--color-border);
  background: #fff;
  display: block;
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}
.hero-image figcaption {
 font-size: 0.9rem;
  color: #555;
  padding: 0 0.2rem;
}
.hero-partners {
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: #f7f7f7;
  padding: var(--space-sm);
  text-align: center;
}
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-sm);
}
.logo-row img {
  max-height: 70px;
  max-width: 200px;
  height: auto;
  width: auto;
}
.edupace-gallery__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: var(--space-md);
}
.edupace-gallery__item {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}
.edupace-gallery__item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f6f6f6;
  display: block;
}
.edupace-gallery__item figcaption {
  padding: var(--space-sm);
  font-size: 0.85rem;
  color: #555;
}
.edupace-gallery__item--wide {
  grid-column: span 2;
}
.edupace-gallery__item--wide img {
  height: 220px;
}
.edupace-section {
  margin-bottom: calc(var(--space-xl) + var(--space-sm));
}
@media (min-width: 900px) {
  .edupace-gallery__item img {
    height: 200px;
  }
  .edupace-gallery__item--wide img {
    height: 240px;
  }
}
.section-heading {
  display: grid;
  gap: var(--space-sm);
  max-width: 780px;
}
.overview-section .section-heading {
  max-width: none;
}
.overview-section .overview-intro {
  display: grid;
  gap: var(--space-md);
  align-items: start;
}
.overview-section .overview-copy {
  display: grid;
  gap: var(--space-sm);
}
.overview-section .overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  align-items: start;
  margin-top: var(--space-md);
}
.overview-section .overview-text {
  display: grid;
  gap: var(--space-sm);
}
.overview-section .overview-cards {
  display: grid;
  gap: var(--space-md);
}
@media (min-width: 900px) {
  .overview-section .overview-intro {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}
.system-components {
  display: grid;
  gap: var(--space-lg);
}
.system-block {
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(135deg, #f8f9fb, #ffffff);
  border: 1px solid #e6e6e6;
  display: grid;
  gap: var(--space-lg);
}
.system-block__intro h3 {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-sm);
}
.system-block__content {
  margin-top: 0;
}
.system-block__secondary {
  padding-top: var(--space-md);
  border-top: 1px solid #e6e6e6;
}
.system-block h4 {
  margin-bottom: 0.5rem;
}
.edupace-timeline {
  display: grid;
  gap: var(--space-lg);
}
.timeline-step {
  position: relative;
  padding-left: var(--space-md);
  border-left: 2px solid #e5e7eb;
  display: grid;
  gap: var(--space-md);
}
.timeline-step::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 4px #fff;
}
.timeline-step__header h3 {
  margin-bottom: 0.35rem;
}
.timeline-step__tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #111;
  color: #fff;
  margin-bottom: 0.6rem;
}
.timeline-step__content {
  display: grid;
  gap: var(--space-md);
}
.timeline-step__content--split {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.timeline-step__content--stacked {
  grid-template-columns: 1fr;
}
.timeline-step--casing .timeline-step__content--split {
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(140deg, #ffffff 0%, #f8fafc 100%);
  padding: var(--space-md);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}
.timeline-step--casing .photo-card {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.timeline-step--final .timeline-step__content--split {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.timeline-step--final .photo-card {
  padding: var(--space-md);
}
.photo-card--final img {
  width: 100%;
  height: clamp(240px, 35vw, 360px);
  object-fit: cover;
}
.ecg-widget {
  border-radius: 20px;
  padding: var(--space-md);
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.35);
  display: grid;
  gap: var(--space-md);
}
.ecg-widget__header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  align-items: center;
}
.ecg-widget__header h4 {
  margin: 0 0 0.25rem;
  color: #f8fafc;
}
.ecg-widget__header p {
  margin: 0;
  color: #cbd5f5;
  font-size: 0.95rem;
}
.ecg-widget__select {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}
.ecg-widget__scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ecg-scenario {
  border-radius: 999px;
  border: 1px solid #334155;
  background: #111827;
  color: #e2e8f0;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.ecg-scenario.is-active {
  background: #22d3ee;
  border-color: #22d3ee;
  color: #0f172a;
}
.ecg-widget__body {
  display: grid;
  gap: var(--space-md);
}
.ecg-widget canvas {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #0b1120, #111827);
  border-radius: 16px;
  border: 1px solid #1f2937;
}
.ecg-widget__controls {
  display: grid;
  gap: var(--space-sm);
}
.ecg-control {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}
.ecg-control__buttons {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
}
.ecg-step {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0b1120;
  color: #f8fafc;
  font-size: 1.1rem;
  cursor: pointer;
}
.ecg-step:hover {
  border-color: #22d3ee;
}
.ecg-value {
  font-weight: 600;
  color: #f8fafc;
}
.overview-grid,
.steps-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.overview-card,
.step-card,
.team-card {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-md);
  background: #fff;
}
.overview-card h3,
.step-card h3,
.team-card h3 {
  margin-bottom: 0.5rem;
}
.split-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  align-items: start;
}
.feature-list {
  list-style: none;
  padding-left: 0;
}
.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.75rem;
}
.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}
.split-visual {
  display: grid;
  gap: var(--space-sm);
}
.photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.photo-card {
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: #fff;
  padding: var(--space-sm);
  display: grid;
  gap: 0.5rem;
  position: relative;
}
.photo-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.photo-card__header .eyebrow {
  margin: 0;
}
.photo-card__header h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #111;
}
.photo-card__header p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}
.photo-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.photo-toggle__image {
  will-change: transform, opacity;
}
.photo-toggle__image.is-sliding {
  animation: photo-toggle-slide 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes photo-toggle-slide {
  from {
    opacity: 0.2;
    transform: translateX(14%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-toggle__image.is-sliding {
    animation: none;
  }
}
.photo-card--wide img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #fff;
}
.photo-card figcaption {
  font-size: 0.9rem;
  color: #555;
}
.photo-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.photo-toggle__button {
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: #111;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.photo-toggle__button.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}
.photo-toggle__button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.photo-toggle__nav {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  gap: 0.4rem;
}
.photo-toggle__nav-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.photo-toggle__nav-button:hover {
  border-color: #111;
}
.photo-card--compact {
  max-width: 340px;
}
.photo-card__placeholder {
  display: grid;
  place-items: center;
  min-height: 200px;
  border-radius: 12px;
  border: 2px dashed #d0d7e2;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 1rem;
}
.edupace-gallery__placeholder {
  min-height: 220px;
}
.edupace-slideshow {
  display: grid;
  gap: var(--space-sm);
}
.edupace-slideshow__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}
.edupace-slideshow__slide {
  scroll-snap-align: start;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: #fff;
  padding: var(--space-sm);
  display: grid;
  gap: 0.5rem;
}
.edupace-slideshow__note {
  font-size: 0.9rem;
  color: #555;
}
.stacked-card {
  border-radius: 20px;
  padding: var(--space-md);
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.5rem;
}
.stacked-card h3 {
  margin: 0;
}
.stacked-card p {
  margin: 0;
  color: #475569;
}
.tag {
  display: inline-flex;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.12);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f172a;
}
.step-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  display: inline-block;
}
.code-block {
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: #0f0f0f;
  color: #f5f5f5;
  padding: var(--space-md);
  margin-top: var(--space-sm);
  overflow-x: auto;
}
.code-block pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}
.muted-note {
  margin-top: var(--space-sm);
  color: #666;
  font-size: 0.9rem;
}
.disclaimer-card {
  border-radius: 16px;
  border: 1px solid #f0d7d5;
  background: #fff6f5;
  padding: var(--space-sm) var(--space-md);
}
.disclaimer-card h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

/* 4c. Projects */
.project h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.project p,
.project-card p {
  color: #555;
  font-size: 0.9rem;
}
.project a,
.project-card a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  color: #000;
  border-bottom: 1px solid transparent;
}
.project a:hover,
.project-card a:hover {
  border-color: #000;
}

/* call‑to‑action links reused outside .project */
.cta-link,
.project a,
.project-card a {                 /* keeps the existing .project style */
  display:inline-block;
  margin-top:0.5rem;
  font-weight:500;
  text-decoration:none;
  color:#000;
  border-bottom:1px solid transparent;
}
.cta-link:hover,
.project a:hover,
.project-card a:hover {
  border-color:#000;
}

/* group of call-to-action buttons */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
}

/* reduce whitespace after the About section */
#about {
  margin-bottom: var(--space-md);
}


/* 5. CONTACT FORM */
.contact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: #333;
}
.contact-form .full-width {
  grid-column: 1 / -1;
}
.contact-form input,
.contact-form textarea {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
}
.contact-form button {
  grid-column: 1 / -1;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 500;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
  justify-self: start;
}
.contact-form button:hover {
  opacity: 0.85;
}

/* contact page links */
.contact-links {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
}
.contact-links a {
  text-decoration: none;
  font-weight: 500;
  color: #000;
  border-bottom: 1px solid transparent;
}
.contact-links a:hover {
  border-color: #000;
}
.contact-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  color: #444;
}

/* 6. FOOTER */
#site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  text-align: center;
  font-size: 0.875rem;
  color: #666;
}

/* 7. EXTRA COMPONENTS */
/* 7a. PDF container */
.pdf-container {
  margin: var(--space-xl) 0;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-radius: 1rem;
  overflow: hidden;
}
.pdf-container iframe {
  width: 100%;
  height: 65vh;
  border: none;
  display: block;
}

/* 7b. Repo link */
.repo-link {
  margin-top: var(--space-sm);
}
.repo-link a {
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s, border-color 0.2s;
}
.repo-link a:hover {
  color: #0070f3;
  border-color: #0070f3;
}

/* 7c. Assignment layout */
.assignment-layout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}
.assignment-text {
  flex: 1 1 300px;
  max-width: 600px;
}
.assignment-pdf {
  flex: 1 1 320px;
  display: flex;
  justify-content: center;
}

/* HAI report: expand PDF and reduce spacing */
#report .pdf-container {
  margin: var(--space-sm) auto;  /* auto left/right centers block elements */
  max-width: 900px;              /* narrower width */
}

#report .pdf-container iframe {
  display: block;   /* makes centering cleaner */
  width: 100%;      /* fill container */
  height: 900px;    /* taller PDF frame */
  border: none;
}

/* 8. RESPONSIVE */
@media (max-width: 600px) {
  .social-links {
    justify-content: center;
    margin-bottom: var(--space-sm);
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    margin: 0 auto var(--space-sm);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
  }
  .main-nav {
    display: none;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
  .intro p,
  .content h1,
  .content h2 {
    padding: 0 var(--space-sm);
  }
}

/* === PROJECT LIST WITH LOGOS ====================== */
.project {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .project:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }
}

.project-logo {
  max-width: 150px;
  max-height: 80px;
  width: auto;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.project-details {
  min-width: 0;
}

.project-details h3 {
  margin-top: 0;
}
.project-details p {
  margin-top: 0.25rem;
}

/* grid layout for project lists */

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .project {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .project-logo {
    margin-bottom: var(--space-xs);
  }
  .project-details a {
    margin-left: 0;
  }
}

/* extra space below the subtitle */
.assignment-text .subtitle {
  margin-bottom: var(--space-md);
}

/* separate and pad the grade section */
.assignment-text .grade {
  margin-top: var(--space-lg);
}

.lang-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;                  /* wider gaps between pills */
  margin-top: var(--space-sm);/* a little breathing room above */
}
.lang-badges li {
  background: #f5f5f5;
  border-radius: 9999px;
  padding: 0.5rem 1.2rem;     /* extra vertical & horizontal padding */
  font-size: 1rem;            /* bump up base font size */
  line-height: 1.4;           /* loosen line height */
  display: flex;
  align-items: center;
}
.lang-badges small {
  font-size: 0.85rem;         /* slightly larger secondary text */
  margin-left: 0.6rem;
  color: #666;
}
@media (max-width: 600px) {
  .lang-badges {
    justify-content: center;
  }
}

/* Placeholder project cards on projects page */
.project-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.project-card {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(50% - var(--space-md));
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--space-md);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-card .project-logo {
  margin-bottom: var(--space-sm);
}

.project-card h3 {
  margin-top: 0;
}

@media (max-width: 600px) {
  .project-card {
    flex-basis: 100%;
  }
}
