@font-face {
  font-family: "DM Sans";
  src: url("dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #10152b;
  --body: #41454f;
  --muted: #585c67;
  --line: #e2e3e7;
  --white: #fff;
  --gutter: clamp(1.25rem, 5.75vw, 5.5rem);
  --header-height: 4.75rem;
  --section-space: clamp(3.5rem, 5.8vw, 5.75rem);
}

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

html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 1rem/1.6 "DM Sans", system-ui, sans-serif;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, dl, dd, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-weight: 590;
  line-height: 1.1;
  letter-spacing: -.045em;
}

h2 { font-size: clamp(2.5rem, 4.3vw, 4rem); }
h3 { font-size: clamp(1.8rem, 2.55vw, 2.55rem); }
h4 { font-size: clamp(1.25rem, 1.75vw, 1.6rem); }

:focus-visible {
  outline: 2px solid #4d5f80;
  outline-offset: 4px;
}

[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

.wrap {
  width: min(75rem, calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 3;
  inset: .5rem auto auto .5rem;
  padding: .65rem 1rem;
  transform: translateY(-160%);
  background: var(--white);
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.header-inner, .primary-nav, .hero-actions, .footer-inner {
  display: flex;
  align-items: center;
}

.header-inner {
  position: relative;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.wordmark img { width: 7.1rem; height: auto; }

.primary-nav {
  gap: clamp(1.5rem, 3vw, 2.75rem);
  font-size: 1rem;
  font-weight: 550;
}

.primary-nav a, .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.primary-nav a:not(.button):hover, .site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: .3em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: .2rem;
  font-size: .98rem;
  font-weight: 620;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: color .16s, background-color .16s, border-color .16s;
}

.nav-contact { margin-left: .3rem; }
.nav-contact:hover, .button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: #292e40; border-color: #292e40; }
.menu-toggle { display: none; }

.text-link, .retailers a, .contact-details a, .paper-link {
  text-decoration-line: underline;
  text-decoration-color: #9b9da6;
  text-decoration-thickness: 1px;
  text-underline-offset: .26em;
}

.text-link:hover, .retailers a:hover,
.contact-details a:hover, .paper-link:hover { text-decoration-color: var(--ink); }

.hero-inner {
  display: grid;
  grid-template:
    "copy portrait" auto
    "facts portrait" auto / minmax(0, 1.09fr) minmax(0, .91fr);
  align-items: center;
  gap: clamp(1.65rem, 2.7vw, 2.65rem) clamp(2.5rem, 6.4vw, 6.5rem);
  padding-block: clamp(3rem, 5vw, 5rem);
}

.hero-copy { grid-area: copy; align-self: end; }

.byline {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: clamp(1.05rem, 1.7vw, 1.65rem);
  font-size: clamp(1rem, 1.24vw, 1.16rem);
  font-weight: 620;
}

.byline::before {
  content: "";
  width: 2.25rem;
  height: 2px;
  background: var(--ink);
}

h1 {
  font-size: clamp(3rem, 5.65vw, 5.35rem);
  font-weight: 575;
  letter-spacing: -.042em;
  line-height: .99;
}

h1 span { display: block; }

.hero-deck {
  max-width: 33ch;
  margin-top: clamp(1.2rem, 1.9vw, 1.7rem);
  color: var(--body);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.42;
  text-wrap: pretty;
}

.hero-actions {
  margin-top: clamp(1.25rem, 2.15vw, 2rem);
}

.hero-portrait {
  grid-area: portrait;
  justify-self: end;
  width: min(100%, 29rem);
  height: auto;
}

.practice-facts {
  grid-area: facts;
  align-self: start;
  display: flex;
  gap: clamp(2rem, 4.2vw, 4rem);
  width: fit-content;
  max-width: 100%;
  padding-top: .95rem;
  border-top: 1px solid var(--line);
}

.practice-facts dt, .contact-details dt {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 550;
}

.practice-facts dd {
  margin-top: .13rem;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  font-weight: 590;
  line-height: 1.25;
  letter-spacing: -.035em;
}

.section > .wrap {
  padding-block: var(--section-space);
  border-top: 1px solid #c8cad1;
}

.about-intro, .capabilities {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  column-gap: clamp(2rem, 6.5vw, 6.5rem);
}

.about-intro {
  grid-template-areas: "title prose" "quote prose";
  grid-template-rows: auto 1fr;
  row-gap: clamp(1.6rem, 3vw, 2.75rem);
}

.about-heading { grid-area: title; }

.section-label {
  margin-bottom: .85rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.about-heading h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 3.6vw, 3.45rem);
  line-height: 1.07;
  text-wrap: balance;
}

.about-intro blockquote {
  grid-area: quote;
  align-self: start;
  max-width: 30ch;
  padding-left: 1rem;
  border-left: 2px solid var(--ink);
  color: var(--body);
  font-size: clamp(1.1rem, 1.46vw, 1.35rem);
  line-height: 1.48;
  letter-spacing: -.018em;
}

.about-prose { grid-area: prose; }

.about-prose, .capabilities-intro p, .capability-list p {
  max-width: 64ch;
  color: var(--body);
  font-size: clamp(1rem, 1.12vw, 1.1rem);
  line-height: 1.7;
}

.about-prose p + p { margin-top: 1.1em; }
.about-prose strong { color: var(--ink); font-weight: 650; }

.capabilities {
  align-items: start;
  margin-top: var(--section-space);
}

.capabilities-intro h3 { max-width: 15ch; }
.capabilities-intro p { max-width: 38ch; margin-top: 1rem; }
.capabilities-intro a { color: var(--ink); font-weight: 600; }

.capability-list { border-top: 2px solid var(--ink); }

.capability-list li, .book-card .reading-note {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

/* A CSS disclosure mark stays legible when the system overrides colors. */
summary::after {
  content: "";
  flex: none;
  width: .55rem;
  height: .55rem;
  margin: 0 .3rem .23rem 0;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

details[open] > summary::after {
  margin-bottom: -.25rem;
  transform: rotate(225deg);
}

.capability-list summary { min-height: 4rem; padding-block: 1rem; }
.capability-list summary:hover h4, .reading-note summary:hover { color: var(--muted); }
.capability-list h4 { font-size: clamp(1.15rem, 1.5vw, 1.4rem); letter-spacing: -.025em; }

.capability-list p {
  padding: 0 1.75rem 1.25rem 0;
  line-height: 1.58;
}

.publications-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem 2rem;
  margin-bottom: clamp(2rem, 4.2vw, 3.6rem);
}

.publication-jump {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 550;
}

.publication-group + .publication-group { margin-top: clamp(3rem, 5.6vw, 5rem); }

.group-title {
  padding-bottom: .9rem;
  border-bottom: 2px solid var(--ink);
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  letter-spacing: -.035em;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(1.5rem, 2.8vw, 2.5rem);
}

.book-card {
  display: grid;
  grid-template-columns: minmax(0, .58fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem clamp(1rem, 2.2vw, 2rem);
}

.book-art {
  width: auto;
  height: auto;
  max-height: 17.5rem;
  box-shadow: .16rem .26rem .5rem #10152b22;
}

.book-copy h4, .paper-copy h4 {
  margin-bottom: .55rem;
  line-height: 1.15;
  text-wrap: pretty;
}

.book-copy p, .paper-copy p, .reading-note p {
  color: var(--body);
  font-size: 1rem;
  line-height: 1.6;
}

.retailers {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .95rem;
  margin-top: .85rem;
}

.retailers a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  font-size: .94rem;
  font-weight: 570;
}

.book-card .reading-note { grid-column: 1 / -1; border-top: 1px solid var(--line); }

.reading-note summary {
  min-height: 2.8rem;
  font-size: .95rem;
  font-weight: 600;
}

.reading-note p { max-width: 68ch; padding: .2rem 0 1.2rem; }

.paper-card {
  display: grid;
  grid-template:
    "cover copy link" auto
    "cover abstract abstract" auto / 4.15rem minmax(0, 1fr) auto;
  align-items: start;
  column-gap: clamp(1.2rem, 2.6vw, 2.1rem);
  padding-block: clamp(1.4rem, 2.45vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.paper-cover { grid-area: cover; width: 100%; height: auto; }
.paper-copy { grid-area: copy; }
.paper-copy p { max-width: 64ch; }
.paper-card .reading-note { grid-area: abstract; }

.paper-card .reading-note summary {
  justify-content: start;
  gap: .55rem;
  width: fit-content;
}

.paper-card .reading-note p { padding-bottom: .45rem; }

.paper-link {
  grid-area: link;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  font-weight: 600;
}

.file-type { color: var(--muted); font-size: .8rem; letter-spacing: .04em; }

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.contact-details { margin-top: clamp(1.25rem, 2.6vw, 2.2rem); font-style: normal; }
.contact-details dl > div + div { margin-top: 1.2rem; }
.contact-details dd {
  margin-top: .14rem;
  overflow-wrap: anywhere;
  font-size: clamp(1.04rem, 1.45vw, 1.3rem);
  font-weight: 550;
  letter-spacing: -.018em;
}

.contact-details a { display: inline-block; min-height: 2rem; }
.contact-note { color: var(--muted); font-size: .875rem; }

.linkedin-card {
  container-type: inline-size;
  display: grid;
  gap: clamp(1.2rem, 2vw, 1.75rem);
  padding: clamp(1.35rem, 3.3vw, 3rem);
  border: 1px solid #c8cad1;
  border-top: .23rem solid var(--ink);
}

.linkedin-person {
  display: grid;
  grid-template:
    "photo brand" auto
    "photo identity" auto / clamp(5rem, 7.6vw, 7rem) minmax(0, 1fr);
  gap: .55rem clamp(1rem, 2vw, 1.7rem);
}

.linkedin-brand {
  grid-area: brand;
  align-self: end;
  display: flex;
  align-items: baseline;
  width: fit-content;
  color: #0a66c2;
  font-size: 1.2rem;
  font-weight: 780;
  letter-spacing: -.065em;
  line-height: 1;
}

.linkedin-icon {
  margin-left: .07em;
  padding: 0 .08em .04em;
  border-radius: .08em;
  background: #0a66c2;
  color: var(--white);
}

.profile-photo {
  grid-area: photo;
  align-self: center;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.linkedin-identity { grid-area: identity; }
.linkedin-identity h3 { font-size: clamp(1.55rem, 2.45vw, 2.25rem); }
.linkedin-identity p { margin-top: .35rem; color: var(--body); line-height: 1.4; }

.linkedin-bio {
  max-width: 58ch;
  color: var(--body);
  font-size: clamp(1rem, 1.17vw, 1.1rem);
  line-height: 1.6;
}

.linkedin-bio strong { color: var(--ink); font-weight: 650; }

.linkedin-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: .95rem 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.linkedin-highlights dt { margin-bottom: .22rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
.linkedin-highlights dd { line-height: 1.45; }
.linkedin-card > .button { justify-self: start; }

@container (max-width: 20rem) {
  .linkedin-person {
    grid-template: "photo brand" auto "identity identity" auto / 4.5rem minmax(0, 1fr);
    row-gap: .85rem;
  }
  .linkedin-brand { align-self: center; justify-self: end; }
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .925rem;
}

.footer-inner { justify-content: space-between; gap: 1rem; min-height: 4.65rem; }
.site-footer a { color: var(--ink); font-weight: 550; }

@media (min-width: 52.01rem) {
  .book-grid { align-items: stretch; row-gap: 1.25rem; }
  .book-card { grid-row: span 2; grid-template-rows: subgrid; }
}

@media (max-width: 52rem) {
  .book-grid { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: minmax(5.75rem, 9rem) minmax(0, 1fr); }
  .book-art { max-height: 14rem; }
  .book-card .reading-note { grid-column: 2; }
  .book-art { grid-row: 1 / 3; }
}

@media (max-width: 45rem) {
  :root { --header-height: 4.1rem; }
  .header-inner { flex-wrap: wrap; gap: 0; }
  .wordmark img { width: 6.5rem; }

  .menu-toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 2.75rem;
    padding: .45rem .15rem .45rem .8rem;
    border: 0;
    background: none;
    color: var(--ink);
    font: 600 1rem/1.2 "DM Sans", system-ui, sans-serif;
    cursor: pointer;
  }

  .menu-lines { position: relative; width: 1.05rem; height: .65rem; }

  .menu-lines::before, .menu-lines::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
  }

  .menu-lines::before { top: 0; }
  .menu-lines::after { bottom: 0; }

  .menu-toggle[aria-expanded="true"] .menu-lines::before { top: 45%; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-lines::after { bottom: auto; top: 45%; transform: rotate(-45deg); }

  .primary-nav {
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: .15rem 1rem;
    padding: .35rem 0 .65rem;
  }

  .site-header:has(.menu-toggle[hidden]) { position: static; }
  .primary-nav .nav-contact { margin-left: 0; }

  .menu-toggle:not([hidden]) + .primary-nav {
    position: absolute;
    inset: 100% calc(0rem - var(--gutter)) auto;
    display: grid;
    gap: 0;
    max-height: calc(100dvh - var(--header-height));
    overflow: auto;
    padding: .35rem var(--gutter) 1rem;
    border-block: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 .5rem 1rem #10152b0b;
  }

  .menu-toggle[aria-expanded="false"]:not([hidden]) + .primary-nav { display: none; }
  .menu-toggle:not([hidden]) + .primary-nav a:not(.button) { min-height: 3rem; border-bottom: 1px solid var(--line); }
  .menu-toggle:not([hidden]) + .primary-nav .nav-contact { justify-self: start; margin-top: .7rem; }

  .hero-inner {
    grid-template:
      "copy" auto
      "portrait" auto
      "facts" auto / minmax(0, 1fr);
    gap: 1.65rem;
    padding-block: clamp(2.25rem, 7vw, 3.3rem);
  }

  h1 { font-size: clamp(2.55rem, 12.1vw, 4.1rem); }
  .hero-deck { max-width: 35ch; }
  .hero-portrait {
    justify-self: center;
    width: min(100%, 25rem);
  }

  .practice-facts { width: 100%; gap: clamp(2rem, 9vw, 4rem); padding-top: 0; border-top: 0; }

  .about-intro, .capabilities, .contact-inner { grid-template-columns: minmax(0, 1fr); }
  .about-intro { grid-template-areas: "title" "prose" "quote"; grid-template-rows: auto; gap: 1.5rem; }
  .about-heading h2 { max-width: 20ch; }
  .about-intro blockquote { max-width: 42ch; }
  .capabilities, .contact-inner { row-gap: 1.75rem; }
  .capabilities-intro h3 { max-width: none; }
  .capabilities-intro p { max-width: 60ch; }
  .linkedin-card { max-width: 37rem; }
}

@media (max-width: 34rem) {
  :root { --section-space: 3.15rem; }
  .publications-header { display: block; margin-bottom: 1.7rem; }
  .publication-jump { margin-top: .3rem; }
  .hero-actions .button { padding-inline: 1rem; }
  .book-card { grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); gap: 1rem; }
  .book-art { grid-row: auto; }
  .book-card .reading-note { grid-column: 1 / -1; }
  .paper-card {
    grid-template:
      "cover copy" auto
      "link link" auto
      "abstract abstract" auto / 3.45rem minmax(0, 1fr);
    column-gap: 1rem;
  }
  .paper-link { margin-top: .35rem; justify-self: start; }
  .paper-card .reading-note summary { min-height: 2.75rem; }
  .footer-inner { min-height: 4rem; }
}

@media (max-width: 22rem) {
  :root { --gutter: 1rem; }
  h1 { font-size: clamp(2.05rem, 12.4vw, 2.6rem); }
}

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

/* Mobile polish: 44px touch targets, no iOS font inflation, notch safe areas */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
a, button, summary { -webkit-tap-highlight-color: rgba(0, 0, 0, .08); touch-action: manipulation; }
@media (max-width: 52rem), (pointer: coarse) {
  .retailers a, .contact-details a, .paper-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
  .retailers { gap: .15rem 1.1rem; }
}
