:root {
  /* Palette drawn from the Research To Practice logo (#156082) */
  --navy: #0e3a50;
  --navy-deep: #0a2c3d;
  --teal: #156082;
  --teal-soft: #4f8fab;
  --sky: #bfe3f2;
  --sky-soft: #e3f2f9;
  --paper: #f4f9fc;
  --surface: #ffffff;
  --ink: #10293a;
  --text: #3d5566;
  --muted: #5a6f7f;
  --line: #d6e6ef;
  --logo-tone: #6b7f8c;
  --radius: 10px;
  --max: 1160px;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --caps: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Two voices: EB Garamond for everything people read, Montserrat caps for
     interface labels (nav, eyebrows, buttons, dates). One size per role. */
  --fs-label: .75rem;
  --fs-body: 1.25rem;
  --fs-lede: 1.5rem;
  --fs-h2: clamp(2rem, 3.4vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 5.2vw, 4.25rem);
  font-family: var(--serif);
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  /* subtle graph-paper grid, echoing the logo */
  background-image:
    linear-gradient(rgba(21, 96, 130, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 96, 130, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink); /* Garamond's fine strokes read lighter than Inter, so text uses the darker ink */
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-wrap: balance; /* wrapped headings split evenly, no one-word last line */
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: var(--fs-lede);
  line-height: 1.25;
  margin: 0 0 .85rem;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-family: var(--caps);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.eyebrow span { margin-right: .35rem; }
.eyebrow-center { text-align: center; }

/* Header */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(191, 227, 242, .12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-mark { width: 44px; height: 44px; color: var(--sky); flex: none; }
.brand-name {
  font-family: var(--caps);
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-family: var(--caps);
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-size: var(--fs-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--sky); }
.site-nav a:focus-visible, .brand:focus-visible { outline: 2px solid var(--sky); outline-offset: 4px; border-radius: 2px; }

/* Hero */
.hero {
  background: var(--navy);
  color: rgba(255, 255, 255, .82);
  padding: clamp(2.5rem, 5vw, 4rem) 0 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.hero-text { align-self: center; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero h1 { color: #f7f4ec; }
.hero-name {
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
}
/* Credentials and abbreviations: smaller capitals in the same colour (the
   Google-served EB Garamond has no true small caps, so don't use font-variant-caps) */
.cred { font-size: .6em; font-weight: 500; letter-spacing: .06em; }
.lead { font-size: var(--fs-lede); line-height: 1.45; color: rgba(247, 244, 236, .9); max-width: 34em; }
.hero-photo {
  align-self: start;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}
.hero-photo img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  box-shadow: 0 30px 60px -30px rgba(10, 44, 61, .7);
}
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.6rem;
  border-radius: 6px;
  background: var(--sky);
  color: var(--navy-deep);
  font-family: var(--caps);
  font-weight: 500;
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--sky);
  transition: background .15s, color .15s, border-color .15s;
}
.button:hover { background: #fff; border-color: #fff; color: var(--navy-deep); }

/* Resources of note */
.resources { padding: clamp(4rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 6rem); }
.resources h2 { margin-bottom: 2.75rem; }
.logo-grid {
  --cols: 3;
  --gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.logo-grid > li { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
.logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 100%;
  min-height: 168px;
  padding: 2.25rem 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--logo-tone);
  transition: border-color .2s, transform .2s, box-shadow .2s, color .2s;
}
a.logo-card:hover {
  color: var(--teal);
  border-color: var(--teal-soft);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -26px rgba(21, 96, 130, .55);
}
.logo-caption {
  font-family: var(--caps);
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
a.logo-card .logo-caption::after { content: "\00a0↗"; letter-spacing: 0; } /* non-breaking space keeps the arrow with the last word */
a.logo-card:hover .logo-caption { color: var(--teal); }

/* Logos are single-colour masks so every mark shares one tone */
.logo {
  display: block;
  height: var(--h, 40px);
  aspect-ratio: var(--ar, 3);
  max-width: 100%;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
  margin-block: auto;
}
.wordmark {
  font-family: var(--serif);
  font-size: var(--fs-lede);
  line-height: 1.05;
  text-align: center;
  margin-block: auto;
  color: inherit;
}

/* About */
.about {
  background: var(--surface);
  border-block: 1px solid var(--line);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.about-inner {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: clamp(2rem, 6vw, 5rem);
}
.section-head { align-self: start; position: sticky; top: 110px; }
.section-head h2 { margin-bottom: 0; }
.recent-experience {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}
.xp-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.xp-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: .25rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.xp-item:first-child { padding-top: .25rem; }
.xp-item p { margin: 0; }
.xp-years {
  font-family: var(--caps);
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  padding-top: .45rem;
  white-space: nowrap;
}
.xp-head { color: var(--ink); margin-bottom: .2rem !important; }
.xp-head strong { font-weight: 500; }
.xp-roles { list-style: none; margin: 0; padding: 0; }
.xp-roles li { margin: 0 0 .15rem; }
.pub-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .75rem;
  margin: 0;
  font-weight: 500;
}

/* Services */
.services { padding: clamp(4rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.services h2 { margin-bottom: 2.75rem; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
}
.service-card h3 { margin-bottom: 1rem; }
.service-card ul { margin: 0; padding-left: 1.15rem; }
.service-card li { margin: 0 0 .35rem; padding-left: .2rem; }
.service-card li::marker { color: var(--teal-soft); }
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 1rem;
  padding: 1.5rem 1.75rem;
  background: var(--sky-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cta-text {
  margin: 0;
  font-size: var(--fs-lede);
  color: var(--ink);
}
.cta .button { margin: 0; }
.button-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.button-teal:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Examples of recent work */
.recent-work {
  background: var(--surface);
  border-block: 1px solid var(--line);
  padding: clamp(4rem, 8vw, 6rem) 0;
}
.recent-work h2 { margin-bottom: 2.25rem; }
.work-group {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 1rem clamp(2rem, 6vw, 5rem);
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.work-group:last-child { padding-bottom: 0; }
.work-group h3 { margin: 0; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-group > .work-list { grid-column: 2; }
.work-item + .work-item { margin-top: 1.5rem; }
.work-title {
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  text-decoration-color: rgba(21, 96, 130, .35);
  text-decoration-thickness: 1px;
}
.work-title:hover { color: var(--teal); text-decoration-color: currentColor; }
.work-meta {
  margin: .4rem 0 .25rem;
  font-family: var(--caps);
  font-size: var(--fs-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-meta cite { font-style: normal; color: var(--teal); }
.work-desc { margin: 0; }

/* Experience */
.experience { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.experience .eyebrow { color: var(--teal); margin-bottom: 2.5rem; }
.logo-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem 3rem;
  color: var(--logo-tone);
}
.logo-row li { display: flex; align-items: center; }

/* Contact */
.contact { padding: 0 0 clamp(3.5rem, 8vw, 5.5rem); }
.contact-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 1rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  background: var(--navy);
  color: rgba(255, 255, 255, .8);
  border-radius: var(--radius);
  padding: clamp(2.25rem, 5vw, 3.75rem);
}
.contact .eyebrow { color: var(--sky); }
.contact h2 { color: #f7f4ec; margin: 0; }
.contact p:not(.eyebrow) { margin: 0; font-size: var(--fs-lede); }
.contact a { color: #fff; }
.contact a:hover { color: var(--sky); }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .6);
  padding: 1.75rem 0;
  font-family: var(--caps);
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer p { margin: 0; }
.footer-mark { width: 34px; height: 34px; color: var(--teal-soft); flex: none; }

/* 404 */
.notfound { padding: clamp(4rem, 12vw, 8rem) 0; text-align: center; }
.notfound .button { background: var(--teal); border-color: var(--teal); color: #fff; }
.notfound .button:hover { background: var(--navy); border-color: var(--navy); }

@media (max-width: 1080px) {
  .site-nav { gap: 1.4rem; }
  .site-nav a { letter-spacing: .12em; }
}
@media (max-width: 960px) {
  .logo-row { justify-content: center; }
}
@media (max-width: 920px) {
  /* Nav moves to its own scrollable row under the brand */
  html { scroll-padding-top: 120px; }
  .header-inner { flex-wrap: wrap; gap: 0; min-height: 0; padding-top: .7rem; }
  .site-nav {
    order: 2;
    width: 100%;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: .65rem 0 .8rem;
    margin-top: .55rem;
    border-top: 1px solid rgba(191, 227, 242, .14);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding-block: .15rem; }
  .section-head { position: static; }
}
@media (max-width: 860px) {
  .hero-inner, .about-inner, .contact-inner, .work-group { grid-template-columns: 1fr; }
  .work-group > .work-list { grid-column: auto; }
  .work-group h3 { margin-bottom: .5rem; }
  .hero-photo { order: -1; max-width: 300px; margin-bottom: 0; align-self: start; }
  .hero-text { padding-bottom: 3.5rem; }
  .resources { padding-top: 4rem; }
  .logo-grid { --cols: 2; }
  .service-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: .7rem; letter-spacing: .2em; }
  /* Sentence-case links so all five fit on one row on phones */
  .site-nav { gap: .5rem; justify-content: space-between; padding-block: .4rem .55rem; }
  .site-nav a {
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    padding-block: .35rem;
  }
  .logo-grid { --cols: 1; }
  .logo-card { min-height: 140px; }
  .logo-row { gap: 2rem 2.5rem; }
  .logo-row .logo { height: calc(var(--h) * .82); }
  .xp-item { grid-template-columns: 1fr; }
  .xp-years { padding-top: 0; }
  .service-card { padding: 1.5rem 1.35rem 1.25rem; }
  .cta { padding: 1.35rem; }
}
@media (max-width: 359px) {
  /* Very narrow screens: the row scrolls sideways; fade hints at more */
  .site-nav {
    justify-content: flex-start;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .site-nav a:last-child { padding-right: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
