:root {
  --ink: #20252b;
  --muted: #5b6570;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --line: #ded8ca;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --brick: #b23a2f;
  --gold: #c69a32;
  --sky: #dbeafe;
  --shadow: 0 20px 50px rgba(30, 37, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid rgba(32, 37, 43, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark,
.profile-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--teal-dark);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #3d4650;
  font-weight: 650;
  font-size: 14px;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: #ffffff;
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: min(720px, calc(100vh - 72px));
  overflow: hidden;
  background: #151a1f;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 17, 21, 0.88), rgba(13, 17, 21, 0.48) 52%, rgba(13, 17, 21, 0.18)),
    url("https://images.unsplash.com/photo-1589994965851-a8f479c573a9?auto=format&fit=crop&w=2200&q=85") center / cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: clamp(74px, 11vw, 148px) clamp(20px, 7vw, 92px) 150px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brick);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd66b;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 600px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  color: #ffffff;
  background: var(--teal);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--teal-dark);
}

.button.ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
  position: absolute;
  right: clamp(20px, 5vw, 72px);
  bottom: 30px;
  z-index: 2;
  width: min(360px, calc(100% - 40px));
  padding: 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.hero-panel span,
.hero-panel p {
  color: rgba(255, 255, 255, 0.76);
}

.hero-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
}

.hero-panel p {
  margin: 12px 0 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.stats div {
  min-height: 126px;
  padding: 28px clamp(20px, 5vw, 54px);
  background: #ffffff;
}

.stats strong {
  display: block;
  color: var(--brick);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section {
  padding: clamp(64px, 9vw, 108px) clamp(20px, 5vw, 64px);
}

.section-head {
  width: min(780px, 100%);
  margin-bottom: 34px;
}

.service-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-card,
.news-card,
.form-box,
.profile-preview,
.contact-info {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(32, 37, 43, 0.06);
}

.service-card {
  min-height: 230px;
  padding: 24px;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  color: var(--teal-dark);
  background: var(--sky);
  border-radius: 8px;
  font-weight: 900;
}

.service-card p,
.timeline p,
.news-card p,
.profile-preview p,
.contact-info p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1.25fr);
  gap: clamp(28px, 6vw, 72px);
  background: #ffffff;
}

.timeline {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #ffffff;
  background: var(--brick);
  border-radius: 8px;
  font-weight: 900;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.date-card {
  min-height: 170px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(32, 37, 43, 0.06);
}

.date-card time {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--brick);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.date-card p,
.about-text p {
  margin: 0;
  color: var(--muted);
}

.news-section {
  background: #f1f7f6;
}

.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.chip {
  min-height: 40px;
  padding: 9px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}

.chip.active {
  color: #ffffff;
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
  overflow: hidden;
}

.news-card.is-hidden {
  display: none;
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-card div {
  padding: 20px;
}

.news-card time {
  display: block;
  margin-bottom: 10px;
  color: var(--brick);
  font-size: 13px;
  font-weight: 850;
}

.account-section {
  background: #fffaf0;
}

.contact-section {
  background: #ffffff;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(280px, 0.7fr);
  gap: 22px;
  align-items: stretch;
}

.form-box,
.profile-preview,
.contact-info {
  padding: clamp(20px, 3vw, 30px);
}

.form-box {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #303740;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfc7b6;
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 650;
}

.check-line input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 750;
}

.form-status.error {
  color: var(--brick);
}

.profile-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
}

.profile-preview .profile-avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  background: var(--brick);
}

.contact-info {
  display: grid;
  align-content: start;
  gap: 14px;
  background: var(--ink);
  color: #ffffff;
}

.contact-info p {
  color: rgba(255, 255, 255, 0.78);
}

.office-hours {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.qr-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 156px;
  height: 156px;
  margin-bottom: 18px;
  padding: 14px;
  background: #ffffff;
  border-radius: 8px;
}

.qr-card span {
  min-width: 0;
  min-height: 0;
  background: #151a1f;
  border-radius: 3px;
}

.qr-card span:nth-child(2),
.qr-card span:nth-child(5),
.qr-card span:nth-child(8),
.qr-card span:nth-child(10),
.qr-card span:nth-child(13),
.qr-card span:nth-child(15) {
  background: #ffffff;
}

.about-text {
  display: grid;
  gap: 18px;
  max-width: 900px;
  padding: clamp(22px, 3vw, 34px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(32, 37, 43, 0.06);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 64px);
  color: rgba(255, 255, 255, 0.72);
  background: #151a1f;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .main-nav {
    position: absolute;
    top: 72px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .nav-toggle {
    display: block;
  }

  .service-grid,
  .news-grid,
  .form-layout,
  .split,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .site-header {
    min-height: 68px;
    padding-inline: 16px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(13, 17, 21, 0.86), rgba(13, 17, 21, 0.52) 62%, rgba(13, 17, 21, 0.9)),
      url("https://images.unsplash.com/photo-1589994965851-a8f479c573a9?auto=format&fit=crop&w=1200&q=80") center / cover;
  }

  .hero-content {
    padding: 58px 18px 230px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-panel {
    right: 18px;
    bottom: 18px;
    width: calc(100% - 36px);
  }

  .stats,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .section {
    padding-inline: 18px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Publications and full-size document attachments */
[hidden] { display: none !important; }
.read-more { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--teal-dark); font-weight: 750; }
.news-card h3 a:hover { color: var(--teal); text-decoration: underline; }
.news-card .document-cover { object-fit: contain; background: #eaece7; }
.news-grid { align-items: start; }
.article-page { max-width: 900px; margin: 0 auto; padding: 65px 24px 90px; }
.article-page h1 { max-width: none; font-size: clamp(36px, 6vw, 64px); line-height: 1.08; }
.article-body { margin-top: 34px; font-size: 19px; line-height: 1.85; }
.article-body p { margin: 0 0 22px; }
.article-figure { margin: 40px 0 0; }
.article-figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.article-figure figcaption { color: var(--muted); margin-top: 12px; font-size: 13px; }
.article-figure figcaption a { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.news-card>a { display: block; }
@media (max-width: 680px) { .article-page { padding: 38px 18px 60px; } .article-body { font-size: 17px; } }
