@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap");

:root {
  --bg: #f5f1e8;
  --bg-glow: #f5f1e8;
  --surface: #ffffff;
  --surface-soft: #f5f1e8;
  --text: #12203a;
  --text-muted: #5b6b80;
  --brand: #1b4c8c;
  --brand-strong: #0f2a4d;
  --accent: #c23b2b;
  --accent-strong: #9e2f21;
  --line: #ded6c3;
  --shadow-soft: none;
  --shadow-card: none;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --font-mono: "JetBrains Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.72;
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 2rem auto 0;
  padding-bottom: 2rem;
}

main > section {
  margin-top: 2rem;
}

main > section:first-of-type {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-weight: 600;
  line-height: 1.25;
}

h1.page-title,
h2 {
  font-size: clamp(1.45rem, 2vw, 1.95rem);
}

h3 {
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand);
  text-decoration-color: rgba(30, 94, 168, 0.34);
  text-underline-offset: 0.17em;
  text-decoration-thickness: 0.09em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
  color: var(--brand-strong);
  text-decoration-color: rgba(22, 73, 129, 0.52);
}

/* Two-tone ring: visible on both light and navy backgrounds (WCAG 2.4.7 / 1.4.11) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #ffffff;
  border-radius: 10px;
}

input:focus-visible,
select:focus-visible {
  border-color: var(--brand);
}

#about-content,
#news,
#news-article,
#Sponsor,
.registration-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(1.2rem, 2.5vw, 2rem);
  box-shadow: var(--shadow-soft);
  position: relative;
}


#about-content h1,
#about-content h2,
#about-content h3,
#news-article h1,
#news-article h2,
#news-article h3,
.registration-panel h2 {
  margin-top: 1.3rem;
}

#about-content h1:first-child,
#about-content h2:first-child,
#about-content h3:first-child,
#news-article h1:first-child,
#news-article h2:first-child,
#news-article h3:first-child,
.registration-panel h2:first-child {
  margin-top: 0;
}

#about-content p,
#news-article p,
.registration-panel p {
  color: var(--text);
}

#about-content ul,
#about-content ol,
#news-article ul,
#news-article ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.3rem;
}

#about-content li,
#news-article li {
  margin: 0.25rem 0;
}

#about-content blockquote,
#news-article blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--bg);
  color: var(--text);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.registration-panel {
  overflow: hidden;
  background: var(--brand-strong);
  border: none;
}

.registration-panel::before {
  display: none;
}

.registration-panel h2 {
  color: #ffffff;
}

.registration-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.registration-intro {
  max-width: 760px;
  margin-bottom: 1.35rem;
}

.registration-kicker {
  color: #e8967c !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.registration-cta {
  margin-top: 0.4rem;
}

.registration-panel--secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}

.registration-panel--secondary h2 {
  color: var(--text);
}

.registration-panel--secondary p {
  color: var(--text-muted);
}

.registration-panel--secondary .registration-kicker {
  color: var(--accent) !important;
}

.registration-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.registration-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.registration-main #about-content {
  background: transparent;
  border: none;
  padding: 0;
}

.registration-main #about-content::before {
  display: none;
}

@media (min-width: 900px) {
  .registration-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: start;
  }

  .registration-sidebar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1.25rem;
  }

  .registration-main {
    grid-column: 1;
    grid-row: 1;
  }
}

#about-content table,
#news-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.35rem;
  font-size: 0.96rem;
}

@media (max-width: 640px) {
  #about-content table,
  #news-article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

#about-content th,
#about-content td,
#news-article th,
#news-article td {
  border: 1px solid var(--line);
  padding: 0.62rem 0.7rem;
  text-align: left;
}

#about-content th,
#news-article th {
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-weight: 600;
}

#about-content img,
#news-article img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.news-lead-photo {
  width: min(100%, 700px);
  margin: 0.4rem auto 0.55rem;
}

.news-lead-photo img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.news-lead-photo-caption {
  text-align: center;
  color: var(--text-muted);
  margin-top: 0;
}

.news-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin: 1.2rem 0 1.4rem;
}

.news-photo-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.news-photo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 220ms ease;
}

.news-photo-card:hover img {
  transform: scale(1.03);
}

.news-photo-grid + em {
  display: block;
  margin-top: -0.6rem;
}

#about-content iframe,
#news-article iframe {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
}

#news-header {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.01em;
}

#news .news-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.2rem;
  margin-top: 1rem;
}

#news .news-grid .news-card {
  width: 100%;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: transform 220ms ease, border-color 220ms ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.news-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 0.9rem;
}

.news-card h3 {
  margin-bottom: 0.7rem;
  color: var(--text);
}

.news-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.news-card a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.44rem 0.72rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.news-card a::after {
  content: "->";
  font-size: 0.86rem;
}

.news-card a:hover {
  background: var(--surface);
  border-color: var(--brand);
}

.news-card:focus-within,
.team-member:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 76, 140, 0.16);
}

footer {
  margin-top: 3.2rem;
  background: var(--brand-strong);
  border-top: 1px solid var(--brand-strong);
  color: #e6eef8;
  text-align: center;
  padding: 1.8rem 1rem 2rem;
}

footer p {
  margin: 0.2rem 0;
}

footer a {
  color: #9dc4ea;
  font-weight: 600;
}

footer a:hover {
  color: #c5def5;
}

@media (max-width: 900px) {
  main {
    width: min(1120px, calc(100% - 1.35rem));
    margin-top: 1.4rem;
  }

  #about-content,
  #news,
  #news-article,
  #Sponsor,
  .registration-panel {
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.64;
  }

  .news-photo-grid {
    grid-template-columns: 1fr;
  }

  .news-photo-card img {
    height: 200px;
  }

  main {
    width: calc(100% - 1rem);
  }

  #about-content,
  #news,
  #news-article,
  #Sponsor,
  .registration-panel {
    padding: 1rem;
  }

  #news .news-grid {
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Homepage layout ===== */
.home-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 0;
  display: grid;
  gap: 1.4rem;
}

.home-highlights-card {
  width: 100%;
  max-width: 360px;
  align-self: start;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.95rem;
}

.home-highlights-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-family: "Sora", sans-serif;
}

.home-about-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 170ms ease, transform 170ms ease;
}

.home-about-action:hover {
  transform: translateY(-1px);
  background: var(--surface);
  border-color: var(--brand);
}

.home-about-action.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.home-about-action.primary:hover {
  background: var(--accent-strong);
}

.home-next-event {
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.home-next-event-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.home-next-event-label {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.home-next-event-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--text);
  font-size: 0.98rem;
}

.home-next-event-date {
  margin: 0.12rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.home-hero {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.home-hero-copy {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.home-hero-kicker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-hero-intro {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 32rem;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.home-hero-cta {
  display: inline-flex;
  align-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: var(--accent);
  border-radius: 10px;
  padding: 0.85rem 1.4rem;
  text-decoration: none;
  transition: background-color 170ms ease;
}

.home-hero-cta:hover {
  background: var(--accent-strong);
}

.home-hero-secondary {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
}

.home-hero-secondary:hover {
  color: var(--accent);
}

.home-hero-media {
  position: relative;
  flex: 1 1 420px;
  border-radius: 14px;
  overflow: hidden;
  max-width: 560px;
  aspect-ratio: 4 / 3;
  background: var(--line);
}

.home-hero-media img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
}

.home-hero-media img.is-active {
  opacity: 1;
}

.home-hero-slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 2;
}

.home-hero-slider-dots button {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.home-hero-slider-dots button::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(15, 42, 77, 0.45);
  transition: background-color 160ms ease, transform 160ms ease;
}

.home-hero-slider-dots button:hover::before {
  background: rgba(255, 255, 255, 0.85);
}

.home-hero-slider-dots button.is-active::before {
  background: #ffffff;
  transform: scale(1.3);
}

.home-hero-slider-toggle {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(15, 42, 77, 0.78);
  color: #ffffff;
  cursor: pointer;
}

.home-hero-slider-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.home-hero-slider-toggle .icon-play { display: none; }
.home-hero-slider-toggle.is-paused .icon-play { display: block; }
.home-hero-slider-toggle.is-paused .icon-pause { display: none; }

.home-keydates-label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
}

.home-keydates-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1100px) {
  .home-keydates-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-collab {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.7rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.home-collab-label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-collab a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.home-collab a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.home-keydate-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem;
}

.home-keydate-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
}

.home-keydate-label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-keydate-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.home-keydate-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.home-keydate-card--final {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.home-keydate-card--final .home-keydate-num {
  color: #ffffff;
  font-size: 1.1rem;
}

.home-keydate-card--final .home-keydate-label {
  color: rgba(255, 255, 255, 0.6);
}

.home-keydate-card--final .home-keydate-title {
  color: #ffffff;
}

.home-keydate-card--final .home-keydate-note {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 900px) {
  .home-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero-copy,
  .home-hero-media {
    flex: 0 0 auto;
  }

  .home-hero-media {
    max-width: none;
    order: -1;
  }

  .home-keydates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .home-keydates-grid {
    grid-template-columns: 1fr;
  }
}

.home-news {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1rem, 2vw, 1.45rem);
}

.home-news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.home-news-head #news-header {
  margin: 0;
}

.news-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.news-more:hover {
  text-decoration: underline;
}

.home-news #news {
  margin-top: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.home-news #news::before {
  display: none;
}

.home-news #news .news-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.8rem;
  margin-top: 0;
}

.home-news #news .news-grid .news-card {
  width: 100% !important;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 0;
}

.home-news #news .news-grid .news-card p {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.home-news #news .news-grid .news-card a {
  grid-column: 2;
  justify-self: end;
}

.home-news #news .news-grid .news-card.has-image {
  grid-template-columns: 88px 1fr auto;
}

.home-news #news .news-grid .news-card.has-image img {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0;
}

.home-news #news .news-grid .news-card.has-image h3 {
  grid-column: 2;
}

.home-news #news .news-grid .news-card.has-image p {
  grid-column: 2;
}

.home-news #news .news-grid .news-card.has-image a {
  grid-column: 3;
  grid-row: 1 / 3;
}

.home-platform {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(1.2rem, 2.5vw, 2rem);
}

.home-platform-copy {
  flex: 1 1 320px;
}

.home-platform-kicker {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.home-platform-heading {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.home-platform-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 34rem;
}

.home-platform-cta {
  display: inline-flex;
}

.home-platform-media {
  flex: 1 1 320px;
  max-width: 420px;
}

.home-platform-media svg,
.home-platform-media img {
  display: block;
  width: 100%;
  height: auto;
}

.home-platform-media img {
  border: 1px solid var(--line);
  border-radius: 16px;
}

@media (max-width: 800px) {
  .home-platform {
    flex-direction: column;
    align-items: stretch;
  }

  .home-platform-media {
    max-width: none;
    order: -1;
  }
}

.home-academy.home-platform {
  background: var(--bg);
}

@media (min-width: 801px) {
  .home-academy.home-platform {
    flex-direction: row-reverse;
  }
}

.home-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-radius: 14px;
  border: 1px solid var(--brand-strong);
  background: var(--brand-strong);
  padding: clamp(1.2rem, 2.5vw, 1.75rem);
}

.home-newsletter-copy h2 {
  margin: 0 0 0.35rem;
  color: #ffffff;
  font-size: 1.35rem;
}

.home-newsletter-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
}

.home-newsletter .home-about-action {
  flex: 0 0 auto;
}

.home-sponsors-shell {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(1rem, 2vw, 1.35rem);
}

.home-sponsors-shell #Sponsor {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-sponsors-shell #Sponsor::before {
  display: none;
}

/* ===== All-news page ===== */
.all-news-page #news .news-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.2rem;
}

.all-news-page #news .news-grid .news-card {
  width: 100% !important;
}

/* ===== Team page ===== */
.team-section {
  width: min(1140px, calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 0 0 2rem;
}

.team-section h1,
.team-section h2 {
  text-align: center;
  margin-bottom: 0.85rem;
}

.team-section p.intro {
  text-align: left;
  max-width: 760px;
  margin: 0 auto 2.2rem;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3rem;
}

.team-member {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem 1.15rem;
  text-align: center;
  transition: transform 200ms ease, border-color 200ms ease;
}

.team-member:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.team-member img {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.85rem;
  border: 3px solid var(--line);
}

/* Ahmad's portrait sits high in frame — retain the top of his head. */
.team-member img[alt="Ahmad Hemmati"] {
  object-position: center top;
}

/* Compact team roster used inside news articles (e.g. IOAI team announcement) */
.ioai-team {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  margin: 0.5rem 0 1.3rem;
}

.ioai-team figure {
  margin: 0;
  width: 92px;
  text-align: center;
}

#news-article .ioai-team img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  margin: 0;
}

/* Aleksandra's portrait sits high in frame — reveal her head */
#news-article .ioai-team img[alt="Aleksandra Streltsova"] {
  object-position: center 12%;
}

.ioai-team figcaption {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.team-member h3 {
  margin: 0.25rem 0 0.3rem;
  font-size: 1.2rem;
  color: var(--text);
}

.team-member .email {
  margin: 0.25rem 0;
  font-size: 0.94rem;
}

.team-member .email a {
  color: var(--brand);
  text-decoration: none;
  word-break: break-word;
}

.team-member .email a:hover {
  text-decoration: underline;
}

.team-member .role {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.52rem;
}

.team-member p {
  font-size: 0.95rem;
  color: var(--text);
}

@media (max-width: 640px) {
  .home-main {
    width: calc(100% - 1rem);
    margin-top: 1.2rem;
  }

  .home-highlights-card {
    max-width: 100%;
  }

  .home-news #news .news-grid .news-card {
    grid-template-columns: 1fr;
  }

  .home-news #news .news-grid .news-card a {
    grid-column: 1;
    justify-self: start;
  }

  .team-section {
    width: calc(100% - 1rem);
    margin-top: 1.2rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}
