:root {
  --red: #c70d12;
  --red-dark: #a7080d;
  --ink: #17202b;
  --muted: #5d6672;
  --line: #dde2e7;
  --soft: #f5f7f8;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(23, 32, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--white);
  letter-spacing: 0;
  min-width: 320px;
  overflow-x: hidden;
}

body.menu-open,
body.dialog-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: rgba(199, 13, 18, 0.18);
}

button,
a {
  touch-action: manipulation;
}

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

.section-shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  min-height: 80px;
  padding: 0 max(48px, env(safe-area-inset-right)) 0 max(48px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: clamp(190px, 20vw, 265px);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 38px;
}

.site-nav a,
.header-cta,
.text-link,
.eyebrow,
.filter {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.site-nav a {
  padding: 31px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover,
.text-link:hover {
  color: var(--red);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  background: var(--red);
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(199, 13, 18, 0.2);
  cursor: pointer;
}

.header-cta:hover,
.button:hover {
  background: var(--red-dark);
}

.menu-toggle {
  display: none;
  border-radius: 0;
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 550px) 1fr;
  align-items: center;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 66px 0 120px;
}

.eyebrow {
  margin: 0 0 32px;
  color: var(--red);
}

.hero h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1.1;
  font-weight: 950;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 560px;
  color: #26313f;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 46px;
  margin-top: 42px;
  flex-wrap: wrap;
}

.text-link {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: var(--ink);
}

.text-link::after,
.section-heading h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  background: var(--red);
}

.text-link::after {
  position: absolute;
  translate: 0 16px;
}

.hero-skyline {
  position: absolute;
  z-index: -1;
  right: calc((100vw - min(1160px, calc(100vw - 48px))) / -2);
  bottom: 0;
  width: min(920px, 82vw);
  max-height: 225px;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.74;
}

.content-section {
  padding: 34px 0 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1.3;
}

.section-heading h2::after {
  margin-top: 12px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.expertise-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.expertise-card,
.project-card,
.publication-list article,
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(23, 32, 43, 0.06);
}

.expertise-card {
  position: relative;
  min-height: 230px;
  padding: 30px 18px 42px;
}

.expertise-card h3,
.project-card h3,
.publication-list h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
}

.expertise-card p,
.project-card p,
.publication-list p,
.contact-band p,
.contact-details {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.arrow-card {
  position: absolute;
  right: 18px;
  bottom: 16px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 25px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.line-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border: 3px solid var(--red);
  position: relative;
}

.shield,
.lock {
  border: 0;
}

.shield::before,
.shield::after {
  content: "";
  position: absolute;
  clip-path: polygon(50% 0, 88% 16%, 80% 75%, 50% 100%, 20% 75%, 12% 16%);
}

.shield::before {
  inset: 2px 7px 0;
  background: var(--red);
}

.shield::after {
  inset: 8px 13px 9px;
  background: var(--white);
}

.laptop {
  border-radius: 2px;
}

.laptop::after {
  content: "";
  position: absolute;
  left: -9px;
  right: -9px;
  bottom: -10px;
  height: 3px;
  background: var(--red);
}

.people {
  border: 0;
}

.people::before,
.people::after {
  content: "";
  position: absolute;
  border: 3px solid var(--red);
  border-radius: 50%;
}

.people::before {
  width: 18px;
  height: 18px;
  left: 13px;
  top: 0;
}

.people::after {
  width: 40px;
  height: 20px;
  left: 1px;
  bottom: 0;
  border-radius: 20px 20px 0 0;
}

.building::before,
.building::after {
  content: "";
  position: absolute;
  background: var(--red);
}

.building::before {
  left: -7px;
  right: -7px;
  bottom: -8px;
  height: 3px;
}

.building::after {
  inset: 12px 9px 7px;
  background: repeating-linear-gradient(90deg, var(--red) 0 3px, transparent 3px 9px);
}

.lock::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 17px;
  left: 13px;
  top: 22px;
  border: 3px solid var(--red);
}

.lock::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 16px;
  left: 14px;
  top: 6px;
  border: 3px solid var(--red);
  border-bottom: 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0 12px;
  cursor: pointer;
  min-width: 44px;
}

.filter.is-active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.project-card {
  overflow: hidden;
  transition: transform 180ms ease, opacity 180ms ease;
}

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

.project-card:hover {
  transform: translateY(-3px);
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.48;
  object-fit: cover;
}

.project-card div {
  padding: 18px;
}

.project-card p {
  margin: 8px 0 0;
}

.publications {
  padding-bottom: 52px;
  padding-top: 44px;
}

.publication-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.publication-list article {
  padding: 24px;
}

.contact-band {
  background: var(--ink);
  color: var(--white);
  padding: 64px 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-band h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
}

.contact-band p,
.contact-details {
  color: #c8d0d8;
}

.contact-details {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.contact-details div {
  display: grid;
  gap: 4px;
}

.contact-details dt {
  color: var(--white);
  font-weight: 900;
}

.contact-details dd {
  margin: 0;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  color: var(--ink);
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px 14px;
  resize: vertical;
  border-radius: 0;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(199, 13, 18, 0.28);
  border-color: var(--red);
}

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

.topic-dialog {
  width: min(520px, calc(100% - 32px));
  border: 0;
  padding: 34px;
  box-shadow: var(--shadow);
  max-height: min(680px, calc(100dvh - 32px));
  overflow: auto;
}

.topic-dialog.is-open {
  display: block;
  position: fixed;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  z-index: 40;
}

.topic-dialog::backdrop {
  background: rgba(23, 32, 43, 0.42);
}

.topic-dialog h2 {
  margin: 0 0 12px;
}

.topic-dialog p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.75;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 24px;
  cursor: pointer;
  border-radius: 0;
}

.site-footer {
  border-top: 1px solid #2f3946;
  background: var(--ink);
  color: #c8d0d8;
}

.site-footer .section-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 1050px) {
  .site-header {
    padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
    grid-template-columns: auto auto;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    justify-self: end;
    display: grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid var(--line);
    background: var(--white);
  }

  .menu-toggle span:not(.sr-only) {
    width: 20px;
    height: 2px;
    background: var(--ink);
  }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 80px;
    display: none;
    padding: 18px 24px 28px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - 80px);
    overflow: auto;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  .menu-open .site-nav {
    display: grid;
    gap: 6px;
  }

  .site-nav a {
    padding: 14px 0;
  }

  .expertise-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 78px;
  }

  .section-shell {
    width: min(100% - 28px, 1160px);
  }

  .site-header {
    min-height: 72px;
  }

  .site-nav {
    top: 72px;
  }

  .brand {
    width: clamp(150px, 46vw, 190px);
  }

  .hero {
    min-height: min(640px, calc(100svh - 72px));
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 38px 0 138px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 41px);
    overflow-wrap: anywhere;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-skyline {
    width: 100vw;
    max-height: 160px;
    right: -14px;
  }

  .hero-actions,
  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .expertise-grid,
  .project-grid,
  .publication-list {
    grid-template-columns: 1fr;
  }

  .expertise-card {
    min-height: 190px;
  }

  .content-section {
    padding-top: 28px;
  }

  .contact-band {
    padding: 46px 0;
  }

  .contact-form {
    padding: 20px;
  }

  .button {
    width: 100%;
    min-height: 52px;
  }

  .text-link {
    min-height: 44px;
  }

  .topic-dialog {
    width: calc(100% - 28px);
    padding: 26px 20px;
  }

  .site-footer .section-shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }
}
