:root {
  --forest: #0d3b2e;
  --green: #1f7a4d;
  --sage: #8fb99d;
  --lime: #b7df4e;
  --teal: #0e7c7b;
  --ink: #13231d;
  --muted: #607268;
  --line: #dce7df;
  --paper: #ffffff;
  --soft: #f3f8f4;
  --mist: #e8f0eb;
  --shadow: 0 22px 60px rgba(16, 43, 33, .13);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin-top: 0; }
h1, h2 {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.04;
  letter-spacing: 0;
}
h1 { font-size: clamp(2.7rem, 7vw, 5.9rem); max-width: 980px; }
h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); }
h3 { font-size: 1.18rem; line-height: 1.25; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.sr-only, .skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link:focus {
  z-index: 1000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 14px;
  background: var(--paper);
  border: 2px solid var(--green);
}

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 54px);
  color: #fff;
  transition: background .25s ease, box-shadow .25s ease, height .25s ease;
}
.site-header.is-scrolled, .site-header:focus-within {
  height: 70px;
  color: var(--ink);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(18, 45, 34, .09);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-text { font-size: 1.18rem; letter-spacing: 0; }
.site-header .brand {
  min-width: 0;
  flex-shrink: 1;
}
.brand-copy {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
}
.brand-name-wrap {
  display: inline-grid;
  min-width: 82px;
  font-size: 1.18rem;
  line-height: 1;
  letter-spacing: 0;
}
.brand-name-expanded,
.brand-name-compact {
  grid-area: 1 / 1;
  transition: opacity .25s ease, transform .25s ease;
}
.brand-name-expanded {
  opacity: 1;
  transform: translateY(0);
  letter-spacing: .02em;
}
.brand-name-compact {
  opacity: 0;
  transform: translateY(6px);
}
.brand-separator {
  margin: 0 8px;
  color: rgba(255,255,255,.66);
  transition: opacity .25s ease, transform .25s ease, max-width .25s ease, margin .25s ease;
}
.brand-expansion {
  max-width: 620px;
  display: inline-flex;
  gap: 8px;
  overflow: hidden;
  color: rgba(255,255,255,.78);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
  transition: opacity .25s ease, transform .25s ease, max-width .28s ease;
}
.brand-expansion span {
  opacity: 0;
  transform: translateY(5px);
  animation: brandTextGlow 1.8s ease forwards;
}
.brand-expansion span:nth-child(1) { animation-delay: .12s; }
.brand-expansion span:nth-child(2) { animation-delay: .3s; }
.brand-expansion span:nth-child(3) { animation-delay: .48s; }
.brand-expansion span:nth-child(4) { animation-delay: .66s; }
.brand-expansion span:nth-child(5) { animation-delay: .84s; }
.site-header.is-scrolled .brand-name-expanded,
.site-header:focus-within .brand-name-expanded {
  opacity: 0;
  transform: translateY(-6px);
}
.site-header.is-scrolled .brand-name-compact,
.site-header:focus-within .brand-name-compact {
  opacity: 1;
  transform: translateY(0);
}
.site-header.is-scrolled .brand-separator,
.site-header:focus-within .brand-separator,
.site-header.is-scrolled .brand-expansion,
.site-header:focus-within .brand-expansion {
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
}
.site-header.is-scrolled .brand-separator,
.site-header:focus-within .brand-separator {
  margin: 0;
}
.site-header.is-scrolled .brand-expansion,
.site-header:focus-within .brand-expansion {
  pointer-events: none;
}
.site-header.is-scrolled .brand-separator,
.site-header:focus-within .brand-separator {
  color: rgba(19,35,29,.38);
}
@keyframes brandTextGlow {
  0% {
    opacity: 0;
    transform: translateY(5px);
    color: rgba(255,255,255,.56);
    text-shadow: none;
  }
  38% {
    opacity: 1;
    transform: translateY(0);
    color: var(--lime);
    text-shadow: 0 0 16px rgba(183, 223, 78, .34);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    color: inherit;
    text-shadow: none;
  }
}
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { background: rgba(183, 223, 78, .18); }
.site-header.is-scrolled .site-nav a:hover, .site-header.is-scrolled .site-nav a.active { color: var(--forest); background: var(--soft); }
.nav-toggle { display: none; }

.home-hero { position: relative; min-height: 92vh; background: var(--forest); overflow: hidden; }
.hero-slider, .hero-slide { min-height: 92vh; }
.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: 112px 0 70px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .85s ease, transform 1.2s ease;
  background-image: linear-gradient(90deg, rgba(7, 34, 25, .86), rgba(7, 34, 25, .46), rgba(7, 34, 25, .16)), var(--hero-image);
  background-size: cover;
  background-position: center;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); z-index: 1; }
.hero-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  color: #fff;
}
.hero-content p { max-width: 720px; font-size: 1.14rem; color: rgba(255,255,255,.88); }
.eyebrow {
  margin-bottom: 14px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.hero-content .eyebrow, .inner-hero .eyebrow, .cta-panel .eyebrow { color: var(--lime); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--forest); background: var(--lime); }
.btn-secondary { color: #fff; border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.08); }
.slider-controls {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 4vw, 54px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}
.slider-dot {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  cursor: pointer;
}
.slider-dot.is-active { background: var(--lime); }

.section { padding: clamp(76px, 9vw, 120px) 0; }
.soft-section { background: var(--soft); }
.pattern-bg {
  position: relative;
  background:
    radial-gradient(circle at 12px 12px, rgba(31,122,77,.15) 2px, transparent 3px) 0 0 / 58px 58px,
    linear-gradient(180deg, #fff, #f7fbf8);
}
.two-column {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 7vw, 86px);
  align-items: start;
}
.lead-stack p { font-size: 1.06rem; color: var(--muted); }
.lead-stack h3 {
  margin: 28px 0 10px;
  font-size: 1.28rem;
}
.lead-stack ul {
  margin: 0 0 18px;
  padding-left: 1.25rem;
  color: var(--muted);
}
.lead-stack li {
  margin-bottom: 10px;
}
.lead-stack li strong {
  color: var(--ink);
}
.section-heading { max-width: 760px; margin-bottom: 40px; }
.section-heading p { color: var(--muted); font-size: 1.04rem; }
.section-heading.split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.text-link, .mini-btn { color: var(--green); font-weight: 800; }
.card-grid, .project-grid, .portfolio-grid, .cert-grid, .team-grid, .profile-grid, .leadership-list {
  display: grid;
  gap: 22px;
}
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.project-grid, .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
.cert-grid { grid-template-columns: repeat(3, 1fr); }
.team-grid { grid-template-columns: repeat(4, 1fr); }
.profile-grid { grid-template-columns: repeat(2, 1fr); }
.feature-card, .project-card, .cert-card, .team-card, .profile-card, .leader-card, .contact-form, .contact-info {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(16, 43, 33, .06);
}
.feature-card { padding: 28px; min-height: 270px; }
.line-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  color: var(--forest);
  background: var(--soft);
  font-weight: 900;
}
.feature-card p, .project-card p, .cert-card p, .team-card p, .profile-card p { color: var(--muted); }
.stats-band {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(13,59,46,.96), rgba(14,124,123,.86)),
    radial-gradient(circle at 18% 22%, rgba(183,223,78,.18), transparent 28%);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item strong { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; }
.stat-item span { color: rgba(255,255,255,.78); font-weight: 700; }
.project-card { overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card img { width: 100%; height: 250px; object-fit: cover; }
.project-content { padding: 24px; }
.project-content span, .cert-card span, .role { color: var(--green); font-size: .84rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.cta-section { padding: 82px 0; background: var(--forest); }
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 78px);
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(circle at 80% 15%, rgba(183,223,78,.22), transparent 22%),
    linear-gradient(135deg, #0d3b2e, #12624a 60%, #0e7c7b);
}
.cta-panel p { max-width: 680px; color: rgba(255,255,255,.84); }
.cta-panel h2 { max-width: 780px; }

.inner-hero {
  min-height: 520px;
  display: grid;
  align-items: end;
  padding: 148px 0 78px;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(7,34,25,.86), rgba(7,34,25,.42)), var(--hero-image);
  background-size: cover;
  background-position: center;
}
.inner-hero p { max-width: 760px; color: rgba(255,255,255,.88); font-size: 1.16rem; }
.leader-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  padding: 24px;
  align-items: center;
}
.leader-card img {
  width: 220px;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
}
.leader-content h3 {
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}
.leader-content p:not(.role) {
  max-width: 840px;
  color: var(--muted);
}
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.profile-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--soft);
  font-size: .9rem;
  font-weight: 700;
}
.profile-meta a {
  color: var(--green);
  font-weight: 800;
}
.profile-card.featured { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 22px; align-items: center; }
.profile-card img { width: 180px; height: 220px; object-fit: cover; border-radius: var(--radius); }
.team-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.team-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; }
.team-card img {
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
}
.team-content {
  display: grid;
  align-content: start;
  padding: 20px;
}
.team-content h3 {
  margin-bottom: 10px;
}
.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.team-tags span {
  padding: 6px 9px;
  border-radius: var(--radius);
  color: var(--forest);
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 800;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover { color: #fff; border-color: var(--green); background: var(--green); }
.cert-card { padding: 28px; }
.publication-list {
  display: grid;
  gap: 18px;
}
.publication-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(16, 43, 33, .05);
}
.publication-year {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--forest);
  background: var(--soft);
  border: 1px solid var(--sage);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.34rem;
  font-weight: 800;
}
.publication-card span {
  color: var(--green);
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.publication-card h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}
.publication-card p {
  max-width: 840px;
  color: var(--muted);
}
.timeline { position: relative; display: grid; gap: 18px; }
.timeline article {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  padding: 22px;
  border-left: 3px solid var(--green);
  background: var(--soft);
  border-radius: var(--radius);
}
.timeline time { color: var(--forest); font-weight: 900; font-size: 1.2rem; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px; align-items: start; }
.contact-info, .contact-form { padding: clamp(24px, 4vw, 36px); }
.contact-list p { display: grid; gap: 3px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.contact-list span, .contact-list a { color: var(--muted); }
.map { width: 100%; height: 260px; border: 0; border-radius: var(--radius); margin-top: 22px; filter: saturate(.86); }
.contact-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-row.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; font-weight: 800; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgba(31,122,77,.18); border-color: var(--green); }
.has-error { border-color: #b42318; }
.error-message { min-height: 18px; display: block; margin-top: 5px; color: #b42318; font-size: .84rem; }
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--muted); }
.checkbox-label input { width: auto; margin-top: 5px; }
.form-status { margin: 12px 0 0; color: var(--green); font-weight: 800; }

.site-footer { color: #d7e8df; background: #092a21; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr .7fr; gap: 34px; padding: 56px 0; }
.footer-grid h2 { margin-bottom: 14px; color: #fff; font-family: Inter, sans-serif; font-size: 1rem; }
.footer-grid a { display: block; margin-bottom: 8px; color: #d7e8df; }
.footer-brand {
  display: inline-flex;
  margin-bottom: 18px;
  color: #fff;
}
.footer-logo-strip {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 12px;
  margin-top: 20px;
}
.footer-logo-slot {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  color: rgba(215,232,223,.72);
  background: rgba(255,255,255,.96);
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.footer-logo-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 5px;
}
.footer-bottom { padding: 18px 20px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; color: #aac6b8; }
.footer-bottom p { margin: 0; }
.error-layout { min-height: 100vh; display: grid; place-content: center; width: min(760px, calc(100% - 40px)); margin: 0 auto; text-align: center; }

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: var(--radius);
    background: rgba(255,255,255,.08);
  }
  .brand-name-expanded,
  .brand-separator,
  .brand-expansion {
    display: none;
  }
  .brand-name-wrap {
    min-width: 74px;
  }
  .brand-name-compact {
    opacity: 1;
    transform: none;
  }
  .site-header.is-scrolled .nav-toggle { border-color: var(--line); background: #fff; }
  .nav-toggle span:not(.sr-only) { width: 22px; height: 2px; background: currentColor; }
  .site-nav {
    position: fixed;
    inset: 70px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .two-column, .contact-grid { grid-template-columns: 1fr; }
  .card-grid.four, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid, .portfolio-grid, .cert-grid, .profile-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .leader-card { grid-template-columns: 180px 1fr; }
  .leader-card img { width: 180px; height: 230px; }
  .publication-card { grid-template-columns: 90px 1fr; }
  .section-heading.split { display: block; }
  .filters { margin-top: 18px; }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .brand-separator,
  .brand-expansion {
    display: none;
  }
  .brand-name-wrap {
    min-width: 92px;
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .site-header { height: 70px; padding: 0 14px; }
  .home-hero, .hero-slider, .hero-slide { min-height: 88vh; }
  .hero-slide { padding-top: 96px; }
  .hero-content p, .inner-hero p { font-size: 1rem; }
  .hero-actions, .filters { flex-direction: column; align-items: stretch; }
  .btn, .filter-btn { width: 100%; }
  .slider-controls { left: 14px; right: auto; }
  .card-grid.four, .team-grid, .project-grid, .portfolio-grid, .cert-grid, .profile-grid, .stats-grid, .contact-form { grid-template-columns: 1fr; }
  .publication-card { grid-template-columns: 1fr; }
  .leader-card { grid-template-columns: 1fr; }
  .leader-card img { width: 100%; height: 280px; }
  .profile-card.featured { grid-template-columns: 1fr; }
  .profile-card img { width: 100%; height: 260px; }
  .project-card img { height: 220px; }
  .timeline article { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-logo-strip {
    grid-template-columns: repeat(3, minmax(64px, 76px));
    max-width: 252px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .brand-expansion span {
    opacity: 1;
    transform: none;
  }
}
