/* --- Palette ----------------------------------------------------------
   Brand set (exact): orange #F1A104 · green #00743F · teal #25B396
   cyan #70CED0 · blue #1E65A7 · navy #192E5B.
   Green and orange carry the site; blue, navy, teal, and cyan are kept as
   tokens for charts, figures, and future use. Each brand color has a ±5%
   lightness companion (HSL) for hover and depth. Neutrals are faint green
   Page ground is linen (#FAF0E6); dark green is used as a panel color with
   canvas-colored text. Every text-on-background pair clears WCAG AA. */
:root {
  color-scheme: light;
  --orange: #F1A104;  --orange-deep: #D89004;
  --green:  #00743F;  --green-deep:  #005B31;
  --teal:   #25B396;  --teal-bright: #29C8A8;
  --cyan:   #70CED0;  --cyan-bright: #83D5D6;
  --blue:   #1E65A7;  --blue-deep:   #1A5891;
  --navy:   #192E5B;  --navy-deep:   #142447;

  --paper: #FAF0E6;        /* page ground: linen */
  --surface: #F1E4D4;      /* banded sections */
  --mist: #E3D3BF;         /* rules */
  --box: var(--green);     /* dark green panels */
  --on-box: #FAF0E6;       /* text on dark green */
  --ink: #122B20;          /* body text: green-black */
  --link: var(--green);    /* links, meta, stat numbers */
  --link-hover: var(--green-deep);
  --accent: var(--orange); /* buttons, top bar, highlights */
  --accent-deep: var(--orange-deep);
  --on-accent: var(--ink); /* text on orange, both themes */
  --rule: var(--orange);   /* decorative 3px rules */
  --emph: var(--green);    /* hover borders */
  --max: 68rem;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "JetBrains Mono", "JetBrainsMono Nerd Font", ui-monospace, "Cascadia Mono", monospace;
  line-height: 1.6;
  border-top: 5px solid var(--accent);
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
a:hover { color: var(--link-hover); }
h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: 1.35rem; margin-top: 2.5rem; }
p, li { max-width: 38em; }
code { background: var(--mist); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.9em; }

.site-head, .foot-inner, main { width: min(var(--max), 100% - 3rem); margin-inline: auto; }
.site-head { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; }
nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
main { padding: 2rem 0 2rem; }
/* Footer: the live oak as a full-width banner with the LLC name and contact. */
.site-foot { position: relative; margin-top: 3rem; color: var(--on-box); isolation: isolate; }
.foot-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%; z-index: -2; display: block;
}
.site-foot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 91, 49, 0.55), rgba(0, 61, 33, 0.92));
}
/* Two columns on the oak band, on every page: the invitation on the left, the
   company details on the right. They stack on narrow screens. */
.foot-inner { padding: 4rem 0 3rem; display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem 4rem; align-items: start; }
.foot-ask { max-width: 34em; }
.foot-info { border-left: 1px solid rgba(250, 240, 230, 0.35); padding-left: 2rem; }
@media (max-width: 720px) {
  .foot-inner { grid-template-columns: 1fr; }
  .foot-info { border-left: 0; padding-left: 0; border-top: 1px solid rgba(250, 240, 230, 0.35); padding-top: 2rem; }
}
.foot-ask p { max-width: none; }
.foot-ask-title { font-size: 1.9rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.foot-ask .button { margin: 1rem 0 0; color: var(--on-accent); }
.foot-ask .button:hover { color: var(--on-accent); text-decoration: none; }
.site-foot p { margin: 0 0 0.35rem; max-width: none; }
.site-foot a { color: inherit; text-decoration-color: rgba(250, 240, 230, 0.5); }
.site-foot a:hover { color: inherit; text-decoration-color: currentColor; }
.foot-name { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.foot-copy { margin-top: 1.5rem; font-size: 0.85rem; opacity: 0.8; }

.meta { color: var(--link); font-size: 0.95rem; margin: 0; }
.lede { font-size: 1.1rem; line-height: 1.55; }

.button {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  padding: 0.7rem 1.3rem; border-radius: 999px; text-decoration: none; margin-right: 1.25rem;
}
.button:hover { background: var(--accent-deep); color: var(--on-accent); }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

/* Home: the logo leads. */
.hero { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 2rem 3rem; align-items: center; margin: 2rem 0 4rem; }
.hero-logo { width: 100%; max-width: 380px; height: auto; grid-row: span 3; }
.hero h1 { grid-column: 2; }
.hero p { grid-column: 2; margin: 0; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-logo { grid-row: auto; max-width: 240px; }
  .hero h1, .hero p { grid-column: 1; }
}

.feature {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center;
  text-decoration: none; color: var(--ink);
  border-top: 1px solid var(--mist); padding: 1.25rem 0;
}
.feature-body { display: grid; gap: 0.25rem; }
/* Square photo thumbnails beside featured work and the research note. */
.thumb {
  width: 6.5rem; height: 6.5rem; object-fit: cover; border-radius: 10px;
  display: block; flex-shrink: 0; box-shadow: 0 1px 2px rgba(18, 43, 32, 0.15);
}
.feature:hover .thumb { box-shadow: 0 2px 6px rgba(18, 43, 32, 0.25); }
@media (max-width: 560px) {
  .thumb { width: 4.5rem; height: 4.5rem; border-radius: 8px; }
  .feature { gap: 0.9rem; }
}
.feature strong { font-size: 1.3rem; }
.feature:hover strong { color: var(--link-hover); }
.feature:hover { border-top-color: var(--emph); }

/* Projects page: each project is a card that expands in place. */
.project-list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.project-list > li { max-width: none; } /* cards span the page; the text inside keeps its measure */
.project-card {
  border: 1px solid var(--mist); border-radius: 12px; background: var(--paper);
  box-shadow: 0 1px 2px rgba(18, 43, 32, 0.08);
}
.project-card:hover, .project-card[open] { border-color: var(--accent); }
.project-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center;
  padding: 1.25rem 1.5rem; cursor: pointer; list-style: none;
}
.project-row::-webkit-details-marker { display: none; }
/* Chevron: points down when closed, up when open. */
.project-row::after {
  content: ""; width: 0.6rem; height: 0.6rem; margin-right: 0.3rem;
  border-right: 2px solid var(--link); border-bottom: 2px solid var(--link);
  transform: rotate(45deg); transition: transform 0.2s;
}
.project-card[open] .project-row::after { transform: rotate(-135deg); }
.project-row .thumb { display: block; }
.project-head { display: grid; gap: 0.25rem; }
.project-head strong { font-size: 1.3rem; }
.project-card:hover .project-head strong { color: var(--link-hover); }
.project-body { padding: 0 1.5rem 1.5rem; border-top: 1px solid var(--mist); max-width: none; }
.project-body > * { max-width: 38em; }
.project-body .tools { margin: 1.25rem 0 0.5rem; }
.project-body h3 { margin-top: 1.5rem; }
.project-body .project-links { margin-top: 1.75rem; }
@media (max-width: 560px) { .project-row { gap: 0.9rem; padding: 1rem; } .project-body { padding: 0 1rem 1rem; } }
img { max-width: 100%; }

/* --- Accessibility -------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.1rem; border-radius: 0 0 6px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }
nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

/* --- Home: what we do, layered over featured work ------------------ */
/* Each .offer stacks a green service panel over a project link. At rest the
   panel covers everything but the left half of the thumbnail; on hover or
   keyboard focus it slides to the right edge and the project text shows. */
.offers { --panel-w: 36%; --peek: 3.25rem; margin: 4rem 0; }
.offers h2 { margin-bottom: 0.5rem; }
/* Panel and project share one grid cell, so the row is as tall as the taller of
   the two and the panel never clips. */
.offer { display: grid; margin-top: 1.25rem; }
/* Each row steps in a little further than the one above it. */
.offer.tone-blue { margin-left: 3.75rem; }
.offer.tone-navy { margin-left: 7.5rem; }
.offer > * { grid-area: 1 / 1; }
.offer .feature { border-top: 0; padding: 0.75rem 0; padding-right: calc(var(--panel-w) + 1.5rem); }
.offer .panel {
  z-index: 1; box-sizing: border-box;
  margin-left: var(--peek); width: calc(100% - var(--peek) - var(--panel-w) - 1.5rem); /* ends at the text's right edge */
  background: var(--box); color: var(--on-box);
  border-top: 8px solid var(--accent); border-radius: 8px; padding: 1.1rem 1.4rem 1.25rem;
  /* Same height for all three; shorter copy is centered in the box. */
  min-height: 13rem; display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 2px 8px rgba(18, 43, 32, 0.2);
  pointer-events: none; /* the whole row stays clickable through to the project */
  transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.offer:hover .panel, .offer:focus-within .panel { margin-left: calc(100% - var(--panel-w)); width: var(--panel-w); }
.offer .panel h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.offer .panel p { margin: 0; opacity: 0.92; }
.offer .panel h3, .offer .panel p { max-width: 19rem; } /* fixed measure: no reflow while sliding */
/* One panel per band of the logo: green, blue, navy. All three use the same
   light text; orange was dropped because light text does not read on it. */
.tone-green .panel { background: var(--green); color: var(--paper); }
.tone-blue .panel { background: var(--blue); color: var(--paper); }
.tone-navy .panel { background: var(--navy); color: var(--paper); }
@media (max-width: 720px), (hover: none) {
  .offer, .offer.tone-blue, .offer.tone-navy { display: block; margin-left: 0; }
  .offer .panel { margin-left: 0; width: auto; min-height: 0; pointer-events: auto; transition: none; }
  .offer .feature { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .offer .panel { transition: none; } }

/* --- Projects ------------------------------------------------------- */
.tools {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0; margin: 1rem 0 2rem; max-width: none;
}
.tools li {
  background: var(--box); color: var(--on-box);
  padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.85rem; max-width: none;
}
.project-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }
.project-links .button { margin-right: 0.5rem; }
.back { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--mist); }
.project h2 { margin-top: 2rem; }
/* Project page header: text on the left, the project's square image on the right. */
.project-header { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2.5rem; align-items: start; margin-bottom: 1rem; }
.project-figure {
  width: 15rem; height: 15rem; object-fit: cover; border-radius: 12px; display: block;
  box-shadow: 0 1px 2px rgba(18, 43, 32, 0.15);
}
@media (max-width: 720px) {
  .project-header { grid-template-columns: 1fr; }
  .project-figure { width: 10rem; height: 10rem; }
}
.page-note { font-size: 0.95rem; opacity: 0.85; }

/* --- Motion and print ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .site-head nav, .skip-link, .cta, .back, .foot-photo { display: none; }
  .site-foot { color: #000; } .site-foot::before { display: none; }
  body { background: #fff; color: #000; border-top: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
}

/* --- Imagery ---------------------------------------------------------- */
.banner { margin: 3.5rem 0; }
.banner img { width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 10px; display: block; }
.banner figcaption {
  margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink);
  opacity: 0.7; font-style: italic;
}

/* --- Team ------------------------------------------------------------- */
.team { display: grid; gap: 2.5rem; margin: 1.5rem 0 2rem; }
.person { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; align-items: start; }
.person img { border-radius: 50%; width: 120px; height: 120px; object-fit: cover; }
.person > div:only-child { grid-column: 1 / -1; } /* no photo: text spans the row */
.person h3 { margin-bottom: 0.15rem; font-size: 1.2rem; }
.person p { margin: 0.4rem 0 0; }
.person-links { font-size: 0.92rem; }
@media (max-width: 560px) {
  .person { grid-template-columns: 1fr; }
  .person img { width: 96px; height: 96px; }
}

/* --- Publications ----------------------------------------------------- */
.stats {
  display: flex; flex-wrap: wrap; gap: 1rem 3rem;
  margin: 2rem 0 0.5rem; padding: 1.25rem 1.5rem;
  background: var(--box); color: var(--on-box); border-radius: 10px;
}
.stats div { display: grid; gap: 0.1rem; }
.stats dt { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.stats dd { margin: 0; font-size: 1.9rem; line-height: 1.1; color: var(--on-box); font-weight: 600; }

.pubs { list-style: none; padding: 0; margin: 1.5rem 0 3rem; counter-reset: pub; }
.pub { border-top: 1px solid var(--mist); padding: 1.25rem 0; max-width: 46em; }
.pub p { max-width: none; margin: 0; }
.pub-title { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.pub-title a { color: var(--ink); text-decoration-color: var(--mist); }
.pub-title a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
.pub-authors { font-size: 0.92rem; opacity: 0.8; margin-top: 0.3rem; }
.pub .meta { margin-top: 0.3rem; font-size: 0.9rem; }
.pub-note { margin-top: 0.6rem; font-size: 0.97rem; border-left: 3px solid var(--rule); padding-left: 0.9rem; }
.pub-featured { border-top: 2px solid var(--accent); }
.pub-featured.has-thumb { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.pub-featured .pub-thumb { margin-top: 0.2rem; }
@media (max-width: 560px) { .pub-featured.has-thumb { gap: 0.9rem; } }

/* --- Home: research band ------------------------------------------- */
.research { margin: 4rem 0; background: var(--surface); border-radius: 12px; padding: 2.25rem 2.5rem; }
.research-row { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 2.5rem; align-items: center; }
.research-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 2px 6px rgba(18, 43, 32, 0.2); }
.research-body h2 { margin-top: 0; }
.research-body p { margin: 0; }
.research-stats { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 1.5rem 0; }
.research-stats div { display: grid; gap: 0.1rem; }
.research-stats dd { margin: 0; font-size: 2.6rem; line-height: 1; font-weight: 600; color: var(--link); }
.research-stats dt { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.research-note { font-size: 0.85rem; opacity: 0.75; margin-left: 0.75rem; }
@media (max-width: 720px) {
  .research { padding: 1.5rem 1.25rem; }
  .research-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .research-photo { max-width: 10rem; }
}
.pub-strip { list-style: none; padding: 0; margin: 1.25rem 0; }
.pub-strip li {
  display: grid; gap: 0.15rem; max-width: 46em;
  border-top: 1px solid var(--mist); padding: 0.9rem 0;
}
.pub-strip a { color: var(--ink); text-decoration-color: var(--mist); }
.pub-strip a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

/* --- Citation chart (publications) ------------------------------------ */
:root {
  --chart-bar: #CDBFA6;      /* sand: the bars are context */
  --chart-s1: var(--orange); /* line colors, fixed order */
  --chart-s2: var(--blue);
  --chart-s3: var(--teal);
}
.chart-section { margin: 2.5rem 0; }
.chart { margin: 1rem 0 0; max-width: 46em; }
.chart-plot { position: relative; }
.chart-controls { display: flex; gap: 0; margin-bottom: 0.75rem; }
.chart-toggle { position: relative; font-size: 0.9rem; }
.chart-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chart-toggle span {
  display: inline-block; padding: 0.3rem 0.9rem; border: 1px solid var(--mist);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.chart-toggle:first-child span { border-radius: 999px 0 0 999px; }
.chart-toggle:last-child span { border-radius: 0 999px 999px 0; border-left: 0; }
.chart-toggle input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chart-toggle input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; font-family: inherit; }
.chart-tick { font-size: 12px; fill: var(--ink); opacity: 0.7; }
.chart-label { font-size: 13px; font-weight: 600; fill: var(--ink); }
.chart-hit { outline: none; cursor: default; }
.chart-hit:focus-visible rect { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart-tip {
  position: absolute; transform: translate(12px, 0);
  background: var(--ink); color: var(--paper); font-size: 0.85rem; line-height: 1.35;
  padding: 0.5rem 0.7rem; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 2;
}
.chart-tip.is-left { transform: translate(calc(-100% - 12px), 0); }
.chart-tip-year { font-weight: 600; margin-bottom: 0.2rem; }
.chart-tip-row { display: flex; align-items: center; gap: 0.4rem; }
.chart-tip strong { color: inherit; min-width: 2.2em; text-align: right; }
.chart-tip-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.chart-tip-key-bar { height: 10px; width: 10px; background: var(--chart-bar); }
.chart-legend { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.92rem; }
.chart-legend li { display: flex; align-items: center; gap: 0.5rem; max-width: none; }
.chart-key { display: inline-block; flex-shrink: 0; }
.chart-key-bar { width: 12px; height: 12px; border-radius: 2px; background: var(--chart-bar); }
.chart-key-line { width: 18px; height: 3px; border-radius: 2px; }
.chart-table { margin-top: 0.75rem; font-size: 0.9rem; }
.chart-table summary { cursor: pointer; color: var(--link); }
.chart-table table { border-collapse: collapse; margin-top: 0.5rem; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: left; padding: 0.25rem 1.25rem 0.25rem 0; border-bottom: 1px solid var(--mist); }

/* --- Publication groups (dropdowns) ------------------------------------ */
.pub-groups { margin: 1.25rem 0 3rem; max-width: 46em; }
.pub-group { border-top: 1px solid var(--mist); }
.pub-group:last-child { border-bottom: 1px solid var(--mist); }
.pub-group summary {
  display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; align-items: baseline;
  padding: 1rem 0 1rem 1.6rem; cursor: pointer; list-style: none; position: relative;
}
.pub-group summary::-webkit-details-marker { display: none; }
.pub-group summary::before {
  content: ""; position: absolute; left: 0.2rem; top: 1.35rem; width: 0.55rem; height: 0.55rem;
  border-right: 2px solid var(--link); border-bottom: 2px solid var(--link);
  transform: rotate(-45deg); transition: transform 0.15s;
}
.pub-group[open] summary::before { transform: rotate(45deg); }
.pub-group-title { font-weight: 600; font-size: 1.1rem; }
.pub-group-meta { color: var(--link); font-size: 0.9rem; white-space: nowrap; }
.pub-group-blurb { grid-column: 1 / -1; font-size: 0.95rem; opacity: 0.8; }
.pub-group .pubs { margin: 0 0 1rem 1.6rem; }
.pub-group .pub:first-child { border-top: 0; padding-top: 0.5rem; }
.pub-group summary:hover .pub-group-title { color: var(--link); }
@media (max-width: 560px) { .pub-group summary { grid-template-columns: 1fr; } }

/* --- Contributors (About) ---------------------------------------------- */
.contributors { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; gap: 0.75rem; }
.contributors li { border-top: 1px solid var(--mist); padding: 0.75rem 0 0; max-width: 38em; }
.contributors li .meta { display: inline; margin-left: 0.5rem; }
.contributors li p { margin: 0.3rem 0 0; }
