:root {
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-alt: #f4f7fc;
  --text: #1f2a3d;
  --muted: #5f6d82;
  --accent: #1c63cf;
  --accent-strong: #0f4fae;
  --accent-soft: #dde9ff;
  --line: #d0daea;
  --warm: #f05a3a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(22, 57, 110, 0.14);
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, #f8fafd 0%, transparent 44%),
    radial-gradient(circle at 100% 0, #e4ecfa 0%, transparent 37%),
    var(--bg);
  line-height: 1.6;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(208, 218, 234, 0.92);
  backdrop-filter: blur(10px);
  background-color: rgba(238, 242, 248, 0.92);
}

.nav-wrapper {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo,
.brand-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.brand-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.brand-text small {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c6d4ea;
  border-radius: 10px;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #264980;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: all 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.hero {
  padding: 4.6rem 0 1.25rem;
}

.hero-content {
  background:
    linear-gradient(120deg, rgba(244, 248, 255, 0.72), rgba(230, 239, 255, 0.66)),
    url("assets/hbackground.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid #b8cbed;
  border-radius: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  line-height: 1.15;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  margin: 1rem 0 0;
  max-width: 64ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-weight: 700;
  transition: transform 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #1c63cf 0%, #2f7aec 100%);
}

.btn-secondary {
  color: var(--accent-strong);
  background: #ffffff;
  border: 1px solid #c8d5ea;
}

.content-section {
  padding: 1.05rem 0;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.publication-filters {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1.8fr 0.8fr auto;
  gap: 0.75rem;
  align-items: end;
}

.publication-filters label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 700;
}

.publication-filters :is(input, select) {
  border: 1px solid #c9d6ea;
  background: #fff;
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  font: inherit;
  color: var(--text);
}

.publication-filters :is(input, select):focus {
  outline: 2px solid #c3d6fb;
  border-color: #6e99e2;
}

.publication-filters button {
  border: 1px solid #c7d4e8;
  border-radius: 10px;
  background: #ffffff;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  padding: 0.64rem 0.9rem;
  cursor: pointer;
}

.publication-hidden {
  display: none;
}

.publication-empty {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px dashed #c4d3ee;
  border-radius: 12px;
  background: #f2f7ff;
  color: #3f5e92;
}

.markdown-content {
  margin-top: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.6vw, 1.9rem);
}

.markdown-content :is(h2, h3, h4) {
  margin-top: 1.5rem;
  margin-bottom: 0.45rem;
}

.markdown-content :is(h2, h3, h4):first-child {
  margin-top: 0;
}

.markdown-content p,
.markdown-content li {
  color: #3d3b30;
}

.markdown-content ul {
  padding-left: 1.15rem;
}

.markdown-content a {
  color: var(--accent-strong);
  font-weight: 600;
}

.team-group + .team-group {
  margin-top: 1.8rem;
}

.team-group-title {
  margin: 0;
  font-size: 1.2rem;
}

.team-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.team-card {
  background: #ffffff;
  border: 1px solid #d2ddef;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 7px 20px rgba(31, 71, 129, 0.11);
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.team-card-body {
  flex: 1;
  min-width: 0;
}

.team-avatar {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(22, 68, 135, 0.22);
  background: #dde9ff;
}

.team-name {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.team-details {
  margin: 0;
  padding-left: 1rem;
}

.team-details li {
  margin-bottom: 0.25rem;
}

.team-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.contact {
  padding-bottom: 4rem;
}

.contact-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.contact-card h3 {
  margin: 0;
}

.contact-card p {
  color: var(--muted);
}

.contact-card form {
  display: grid;
  gap: 0.85rem;
}

.contact-card label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.contact-card :is(input, textarea) {
  border: 1px solid #c8d6ea;
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
}

.contact-card :is(input, textarea):focus {
  outline: 2px solid #bfd4fb;
  border-color: #6995de;
}

.contact-card button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(120deg, #1c63cf 0%, #2f7aec 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid #ccd8ea;
  background: #e8eef8;
  padding: 1.2rem 0;
  color: #2f456c;
}

.footer-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
  order: 2;
  margin-left: auto;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
  order: 1;
}

.site-footer span {
  color: var(--muted);
}

.loading,
.error {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
}

.loading {
  background: #e9f1ff;
  color: #2f66b1;
}

.error {
  background: #fff1ed;
  color: #b1492f;
}

@media (max-width: 1100px) {
  .nav-wrapper {
    gap: 0.8rem;
  }

  .brand-text small {
    max-width: 34ch;
  }
}

@media (max-width: 900px) {
  .nav-wrapper {
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    display: none;
    width: 100%;
    order: 3;
    margin-top: 0.65rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    border: 1px solid #c7d5eb;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.45rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    width: 100%;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
  }

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

  .hero {
    padding-top: 4.4rem;
  }

  .publication-filters {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 1.2rem, var(--container));
  }

  .brand-text small {
    display: none;
  }

  .brand-logo,
  .brand-fallback {
    width: 42px;
    height: 42px;
  }

  .hero {
    padding: 4.2rem 0 2.5rem;
  }

  .hero-content {
    padding: 1.2rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 1rem;
  }

  .footer-content {
    align-items: flex-start;
  }
}
