/* =============================================
   CSS Custom Properties
   ============================================= */
:root {
  --navy:        #1a3a5c;
  --navy-dark:   #0f2235;
  --teal:        #0d7c6e;
  --teal-bg:     #e8f5f3;
  --white:       #ffffff;
  --bg:          #ffffff;
  --bg-alt:      #f5f7fa;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;
  --border:      #e2e8f0;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container:   1100px;
  --nav-h:       68px;
  --section-y:   88px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.06);

  --radius:    14px;
  --radius-sm: 8px;
}

/* =============================================
   Reset
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--teal);
  transition: color .15s;
}
a:hover { color: var(--navy); }

/* Visible keyboard focus. :focus-visible keeps the ring off mouse clicks
   while still showing it for tab navigation. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}

/* On the dark contact panel the teal ring has too little contrast. */
.contact-section a:focus-visible {
  outline-color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =============================================
   Layout
   ============================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: var(--section-y) 0; }
.section--alt { background-color: var(--bg-alt); }

/* =============================================
   Navigation
   ============================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}

.nav--scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--teal); text-decoration: none; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color .15s, background-color .15s;
  display: block;
}
.nav-links a:hover {
  color: var(--navy);
  background-color: var(--bg-alt);
  text-decoration: none;
}

.nav-cta {
  background-color: var(--navy) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  margin-left: 6px;
}
.nav-cta:hover {
  background-color: var(--teal) !important;
  color: var(--white) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--bg-alt); }

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
  transform-origin: center;
}
.nav-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   Hero
   ============================================= */
.hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 88px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 72px;
}

.hero-text { flex: 1; min-width: 0; }

.eyebrow {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.text-teal { color: var(--teal); }

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 36px;
}

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

.hero-photo { flex-shrink: 0; }

.photo-clip {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 5px solid var(--white);
  outline: 1px solid var(--border);
}

.photo-clip img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(-10%);
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background-color .15s, color .15s, border-color .15s,
              box-shadow .15s, transform .15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.btn-primary { background-color: var(--navy); color: var(--white); }
.btn-primary:hover { background-color: var(--teal); color: var(--white); }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background-color: var(--navy); color: var(--white); }

.btn-light { background-color: var(--white); color: var(--navy); }
.btn-light:hover { background-color: var(--teal-bg); color: var(--teal); }

.btn-light-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-light-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--white);
  color: var(--white);
}

/* =============================================
   Section Headers
   ============================================= */
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.025em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-title--light { color: var(--white); }

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.7;
}
.section-sub a { color: var(--teal); }

/* =============================================
   About
   ============================================= */
.about-body p {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: 16px;
}
.about-body p:last-of-type { margin-bottom: 48px; }

.stat-row {
  display: flex;
  gap: 52px;
  flex-wrap: wrap;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.04em;
  line-height: 1;
}

.stat-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: 6px;
}

/* =============================================
   Expertise Cards
   ============================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: var(--teal-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--teal);
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}

.card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =============================================
   Services
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 56px;
}

.service-item {
  border-left: 3px solid var(--teal);
  padding-left: 18px;
}

.service-item h4 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.service-item p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =============================================
   Publications
   ============================================= */
.pub-list {
  list-style: none;
  counter-reset: pub;
}

.pub-item {
  counter-increment: pub;
  padding: 22px 0 22px 36px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.pub-item:first-child { border-top: 1px solid var(--border); }

.pub-item::before {
  content: counter(pub);
  position: absolute;
  left: 0;
  top: 26px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-light);
  width: 20px;
  text-align: right;
}

.pub-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 5px;
}

.pub-authors {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.5;
}
.pub-authors strong { color: var(--navy); font-weight: 600; }

.pub-journal {
  font-size: .82rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pub-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-bg);
  padding: 2px 9px;
  border-radius: 100px;
}

.pub-badge--prep {
  color: #7c5a0d;
  background: #fef3cd;
}

/* =============================================
   Writing
   ============================================= */
.writing-featured {
  display: flex;
  gap: 44px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
}

.writing-featured-img {
  flex-shrink: 0;
  width: 160px;
}

.writing-featured-img img {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.writing-featured-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.writing-featured-text h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
}

.writing-featured-text p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.writing-tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.img-credit {
  font-size: .7rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

.writing-pullquote {
  border-left: 3px solid var(--teal);
  padding-left: 16px;
  margin: 0;
  font-size: .875rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
}

.writing-pullquote cite {
  display: block;
  margin-top: 6px;
  font-size: .78rem;
  color: var(--text-light);
  font-style: normal;
}

.writing-tag--cover {
  color: #7c5a0d;
  background: #fef3cd;
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.writing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s, transform .2s;
}

.writing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.writing-card-img {
  width: calc(100% + 56px);
  margin: -28px -28px 16px -28px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.writing-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 75%;
}

.writing-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  align-self: flex-start;
}

.writing-tag--review {
  color: var(--navy);
  background: #e8eef5;
}

.writing-tag--comm {
  color: var(--teal);
  background: var(--teal-bg);
}

.writing-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.5;
}

.writing-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.writing-meta {
  font-size: .78rem;
  color: var(--text-light);
  font-weight: 500;
}

.writing-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-top: 4px;
}

.writing-link:hover {
  color: var(--navy);
  text-decoration: none;
}

/* Research Highlights */
.writing-highlights { margin-top: 48px; }

.writing-subhead {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 20px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.writing-tag--methods {
  color: #1e5f8e;
  background: #deeaf5;
}

.highlight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.highlight-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.highlight-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  position: relative;
}
.highlight-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.highlight-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.95) saturate(0.8);
}
.highlight-img img.no-filter {
  filter: none;
}
.highlight-img--contain {
  background: #0f1f35;
  position: relative;
}
.highlight-img--contain::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(15, 31, 53, 0.9) 100%),
    linear-gradient(to right, rgba(15, 31, 53, 0.8) 0%, transparent 15%, transparent 85%, rgba(15, 31, 53, 0.8) 100%);
  pointer-events: none;
  z-index: 1;
}
.highlight-img--contain img {
  object-fit: contain;
}

.highlight-triptych {
  display: flex;
  gap: 0;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: black;
}

.triptych-panel {
  flex: 1;
  overflow: hidden;
}

.triptych-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.highlight-img--placeholder {
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.highlight-img--placeholder span {
  font-size: .8rem;
  color: var(--text-light);
  font-style: italic;
}

.highlight-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.highlight-body h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.5;
}

.highlight-body p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.writing-tag--highlight {
  color: #5b3a8c;
  background: #f0eafa;
}

/* =============================================
   Contact
   ============================================= */
.contact-section { background: var(--navy); }

.contact-inner {
  text-align: center;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.contact-inner .section-title { margin-bottom: 16px; }

.contact-lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  max-width: 400px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* =============================================
   Footer
   ============================================= */
.footer {
  background: var(--navy-dark);
  padding: 28px 0;
  text-align: center;
}
.footer p {
  font-size: .78rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .01em;
}

/* =============================================
   Responsive — 960px
   ============================================= */
@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 40px;
  }

}

/* =============================================
   Responsive — 768px
   ============================================= */
@media (max-width: 768px) {
  :root { --section-y: 64px; }

  /* Nav */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 16px 16px;
    gap: 2px;
  }
  .nav-links--open { display: flex; }

  .nav-links a { padding: 10px 14px; font-size: .95rem; }

  .nav-cta {
    text-align: center;
    margin-left: 0 !important;
    margin-top: 6px;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 64px;
  }
  .hero-inner {
    flex-direction: column-reverse;
    gap: 36px;
    text-align: center;
  }
  .photo-clip {
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  /* Cards */
  .cards { grid-template-columns: 1fr 1fr; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Writing */
  .writing-featured { flex-direction: column; gap: 24px; }
  .writing-featured-img { width: 120px; }
  .writing-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }

  /* Stats */
  .stat-row { gap: 32px; }
}

/* =============================================
   Responsive — 520px
   ============================================= */
@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .cards { grid-template-columns: 1fr; }
  .photo-clip { width: 160px; height: 160px; }
  .stat-num { font-size: 1.8rem; }
  .btn { padding: 11px 20px; font-size: .85rem; }
}
