:root {
  --navy: #0f2d52;
  --navy-deep: #0a2140;
  --coral: #d9493f;
  --coral-soft: #f3d5d1;
  --ink: #1d2733;
  --muted: #56616e;
  --paper: #ffffff;
  --mist: #f4f6f9;
  --gridline: #d6dee8;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); }
a:hover { color: var(--coral); }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.15; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--gridline);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.wordmark { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; text-decoration: none; color: var(--navy); white-space: nowrap; }
.wordmark span { color: var(--muted); font-weight: 500; }
.nav-list { display: flex; gap: clamp(12px, 2.5vw, 28px); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a { text-decoration: none; color: var(--ink); font-size: 0.95rem; font-weight: 500; }
.nav-list a:hover { color: var(--coral); }
.nav-list .nav-cta { color: #fff; background: var(--navy); padding: 8px 14px; border-radius: 4px; }
.nav-list .nav-cta:hover { background: var(--coral); color: #fff; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 20px; border-radius: 4px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.button-primary { background: var(--coral); color: #fff; }
.button-primary:hover { background: var(--navy); color: #fff; }
.button-quiet { color: var(--navy); border-color: var(--navy); }
.button-quiet:hover { background: var(--navy); color: #fff; }
.button-light { background: #fff; color: var(--navy); }
.button-light:hover { background: var(--coral); color: #fff; }
.button-outline { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.button-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Hero: a structural grid sits behind the portrait, like a plan's column lines */
.hero { position: relative; background: var(--mist); overflow: hidden; border-bottom: 1px solid var(--gridline); }
.gridlines {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--gridline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--gridline) 1px, transparent 1px);
  background-size: 33.333% 100%, 100% 50%;
  background-position: 16.666% 0, 0 25%;
}
.axis {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid #9fb0c4; background: var(--mist);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 0.85rem; color: #6d8098;
}
.axis-a { left: calc(16.666% - 15px); top: 10px; }
.axis-b { left: calc(49.999% - 15px); top: 10px; }
.axis-c { left: calc(83.333% - 15px); top: 10px; }
.axis-1 { left: 10px; top: calc(25% - 15px); }
.axis-2 { left: 10px; top: calc(75% - 15px); }

.hero-inner {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end; gap: 24px; padding-top: clamp(48px, 8vw, 96px);
}
.hero-copy { padding-bottom: clamp(40px, 7vw, 88px); }
.hero h1 {
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.hero-role { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--ink); max-width: 30ch; margin: 20px 0 22px; line-height: 1.45; }
.credentials { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.credentials li {
  font-size: 0.88rem; font-weight: 500; color: var(--navy);
  border: 1px solid #b9c6d6; background: #fff; padding: 4px 10px; border-radius: 3px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-portrait { margin: 0; justify-self: center; max-width: 420px; }
.hero-portrait img { width: 100%; }

.stats {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 0; padding-top: 0; padding-bottom: 0;
}
.stats > div { padding: 22px 0 26px; border-top: 3px solid var(--navy); margin-right: 24px; background: var(--mist); }
.stats dt { font-size: 0.9rem; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: var(--navy); font-weight: 600; line-height: 1.2; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.bubble {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--coral); color: var(--coral);
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: start; }
.about-grid .section-head { grid-column: 1 / -1; margin-bottom: 8px; }
.about-text p { margin: 0 0 18px; max-width: 62ch; }
.about-text .lede { font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; color: var(--navy); }
.about-photo { margin: 0; position: relative; }
.about-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 2px solid var(--coral); border-radius: 4px; z-index: -1;
}
.about-photo img { border-radius: 4px; filter: grayscale(0.15); }
.about { position: relative; z-index: 0; }

.projects { background: var(--mist); border-top: 1px solid var(--gridline); border-bottom: 1px solid var(--gridline); }
.project {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px 56px; padding: 44px 0; border-top: 1px solid var(--gridline);
}
.project:first-of-type { border-top: 0; padding-top: 8px; }
.project-head h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin: 6px 0 6px; }
.project-dates { margin: 0; color: var(--coral); font-weight: 600; font-size: 0.95rem; }
.project-place { margin: 0; color: var(--muted); }
.project-body p { margin: 0 0 14px; max-width: 64ch; }
.scope-title { font-weight: 600; color: var(--navy); margin-top: 6px !important; }
.scope { margin: 0; padding-left: 20px; }
.scope li { margin-bottom: 8px; }
.project-gallery { grid-column: 1 / -1; display: grid; gap: 10px; }
.project-gallery img { width: 100%; height: 220px; object-fit: cover; border-radius: 3px; background: #dfe5ec; }
.gallery-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-2 img { height: 300px; }
.more-projects { margin: 12px 0 0; font-weight: 600; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding-top: 20px; border-top: 3px solid var(--navy); }
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; color: var(--ink); }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--navy); }
.quote figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.contact { background: var(--navy); color: #dbe4ef; padding: clamp(64px, 9vw, 104px) 0; }
.contact h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); max-width: 20ch; }
.contact p { font-size: 1.15rem; margin: 16px 0 28px; max-width: 60ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.site-footer { background: var(--navy-deep); color: #9fb0c4; font-size: 0.92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.site-footer p { margin: 0; }
.site-footer a { color: #dbe4ef; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-portrait { max-width: 300px; }
  .stats { grid-template-columns: 1fr; }
  .stats > div { margin-right: 0; padding: 16px 0; }
  .about-grid, .project { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; margin-right: 18px; }
  .quotes { grid-template-columns: 1fr; }
  .gallery-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-3 img:first-child { grid-column: 1 / -1; }
  .project-gallery img, .gallery-2 img { height: 200px; }
  .axis-1, .axis-2 { display: none; }
}

@media (max-width: 560px) {
  .nav-list li:not(:last-child) { display: none; }
  .gallery-2 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

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