/* Personal site palette: forest and brass. The chess site keeps its navy and blue;
     brass is the shared accent between the two. Chart colors: --c1 green, --c2 brass, --c3 blue. */
  :root {
    --forest: #1f3a2e; --ink: #1c211e; --muted: #56605a; --accent: #2a6b4c;
    --brass: #b08d57; --brass-text: #8a6a35; --brass-light: #cfb27e;
    --band: #f1f4f0; --line: #dde3dc; --white: #fcfcfa; --chess-navy: #13284a;
    --c1: #1e8458; --c2: #b8862f; --c3: #3d7cc4; --c1-soft: #a8cdb9;
    --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --wide: 960px;
    --gutter: max(24px, calc((100% - var(--wide)) / 2));
    --radius: 4px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
  h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--forest); line-height: 1.2; text-wrap: balance; }
  a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
  a:hover { color: var(--forest); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* Header */
  header { background: var(--forest); color: var(--white); padding: 88px var(--gutter) 72px; }
  .header-inner { display: grid; grid-template-columns: 1fr 240px; gap: 56px; align-items: center; }
  .label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 18px; }
  h1 { font-size: 3.25rem; color: var(--white); letter-spacing: -0.01em; line-height: 1.08; }
  h1 em { color: var(--brass-light); }
  .intro { color: rgba(255, 255, 255, 0.8); font-size: 1.15rem; margin-top: 18px; max-width: 52ch; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
  .btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background 0.2s, border-color 0.2s, color 0.2s; }
  .btn-primary { background: var(--white); color: var(--forest); border: 1px solid var(--white); }
  .btn-primary:hover { background: #ece7da; color: var(--forest); }
  .btn-ghost { color: var(--white); border: 1px solid rgba(255, 255, 255, 0.4); }
  .btn-ghost:hover { border-color: var(--white); color: var(--white); background: rgba(255, 255, 255, 0.08); }
  .btn-chess { background: var(--brass-light); color: var(--forest); border: 1px solid var(--brass-light); }
  .btn-chess:hover { background: #ddc79c; border-color: #ddc79c; color: var(--forest); }
  .portrait { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); display: block; background: #2a4a3b; }

  /* Sections */
  section { padding: 72px var(--gutter); }
  section.band { background: var(--band); }
  .section-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-text); margin-bottom: 8px; }
  h2 { font-size: 1.875rem; margin-bottom: 24px; }
  h3 { font-size: 1.2rem; margin: 36px 0 12px; }
  h3:first-of-type { margin-top: 0; }
  .prose p { color: var(--muted); max-width: 65ch; margin-bottom: 16px; }
  .prose p:last-child { margin-bottom: 0; }

  /* Experience rows */
  .rows { list-style: none; border-top: 1px solid var(--line); }
  .rows li { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .rows .org { font-weight: 600; color: var(--forest); }
  .rows .role { color: var(--muted); }
  .rows .when { color: var(--muted); font-size: 0.95rem; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
  .edu { margin-bottom: 40px; }

  /* Around the web */
  .links { list-style: none; border-top: 1px solid var(--line); margin-bottom: 8px; }
  .links li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .links a { font-weight: 600; text-decoration: none; }
  .links a:hover { text-decoration: underline; }
  .links .hs a { font-weight: 600; }
  .links .meta { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 2px; }

  /* Chess feature band */
  section.chess { background: var(--chess-navy); color: var(--white); }
  .chess .section-label { color: var(--brass-light); }
  .chess h2 { color: var(--white); margin-bottom: 12px; }
  .chess .lede { color: rgba(255, 255, 255, 0.78); max-width: 60ch; margin-bottom: 32px; }
  .chess-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
  .chess-card { display: block; padding: 20px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
  .chess-card:hover { border-color: var(--brass-light); background: rgba(255, 255, 255, 0.05); }
  .chess-card strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--white); margin-bottom: 6px; }
  .chess-card span { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; line-height: 1.5; }
  .role-desc { grid-column: 1 / -1; color: var(--muted); font-size: 0.95rem; max-width: 70ch; }

  footer a { color: rgba(255, 255, 255, 0.85); }
  footer { background: var(--forest); color: rgba(255, 255, 255, 0.55); text-align: center; padding: 24px; font-size: 0.875rem; }

  @media (max-width: 960px) and (min-width: 721px) { .chess-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 720px) {
    header { padding: 56px 20px 48px; }
    .header-inner { grid-template-columns: 1fr; gap: 32px; }
    .portrait { width: 180px; order: -1; }
    h1 { font-size: 2.4rem; }
    section { padding: 48px 20px; }
    .rows li { grid-template-columns: 1fr; }
    .rows .when { text-align: left; }
    .chess-grid { grid-template-columns: 1fr; }
  }
  /* Experience timeline */
  .rows.timeline { border-top: none; position: relative; }
  .rows.timeline::before { content: ''; position: absolute; left: 5px; top: 22px; bottom: 22px; width: 1px; background: #c9d3c8; }
  .rows.timeline li { position: relative; padding: 18px 0 18px 32px; border-bottom: none; }
  .rows.timeline li::before { content: ''; position: absolute; left: 0; top: 25px; width: 11px; height: 11px; border-radius: 50%; background: var(--white); border: 2px solid var(--accent); }
  .rows.timeline li:first-child::before { background: var(--accent); }
  .rows.timeline li + li { border-top: 1px solid var(--line); }
  .tag { display: inline-block; margin-top: 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-text); background: #f3ecdf; padding: 3px 8px; border-radius: 2px; }

  /* Projects */
  .section-lede { color: var(--muted); margin: -12px 0 32px; }
  .pj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .pj-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; background: var(--white); }
  .pj-vis { background: var(--band); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; min-height: 186px; display: flex; flex-direction: column; justify-content: center; }
  .pj-svg { width: 100%; height: auto; display: block; overflow: visible; }
  .pj-grid .pj-card h3 { font-size: 1.2rem; margin: 0 0 8px; }
  .pj-card h3 a { color: inherit; text-decoration: none; }
  .pj-card h3 a:hover { color: var(--accent); }
  .pj-card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 12px; }
  .pj-meta { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-text); margin-top: auto; }
  .pj-link { margin-top: 10px; font-weight: 600; font-size: 0.95rem; }
  .pj-svg .pj-gl { stroke: var(--line); }
  .pj-ax { font-family: var(--sans); font-size: 10px; fill: var(--muted); }
  .pj-axl { font-size: 12px; font-weight: 600; fill: var(--forest); }
  .pj-val { font-family: var(--sans); font-size: 12px; font-weight: 600; fill: var(--forest); }
  .pj-bar { fill: var(--c1); }
  .pj-soft { fill: var(--c1-soft); }
  .pj-dot { fill: var(--c2); stroke: var(--white); stroke-width: 1.5; }
  .pj-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.75rem; color: var(--muted); margin-top: 8px; }
  .pj-key span { display: inline-flex; align-items: center; gap: 6px; }
  .pj-k-bar { width: 10px; height: 10px; background: var(--c1); border-radius: 2px; display: inline-block; }
  .pj-k-dot { width: 8px; height: 8px; background: var(--c2); border-radius: 50%; display: inline-block; }
  .pj-statvis { align-items: center; text-align: center; }
  .pj-big { font-family: var(--serif); font-size: 3.4rem; color: var(--forest); line-height: 1; }
  .pj-big-l { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-text); margin-top: 10px; }
  .pj-mini { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
  .pj-spark svg { width: 100%; height: auto; display: block; overflow: visible; }
  .pj-spark .sp-line { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; }
  .pj-spark .sp-nm { stroke: var(--forest); stroke-dasharray: 3 3; }
  .pj-spark .sp-lab { font-family: var(--sans); font-size: 10px; fill: var(--muted); }
  .pj-spark .sp-end { fill: var(--forest); }

  @media (max-width: 720px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .pj-grid { grid-template-columns: 1fr; }
    .pj-card { padding: 18px; }
  }

  /* Top nav (all pages) */
  .topnav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); height: 64px; }
  .brand { font-family: var(--serif); font-size: 1.2rem; color: var(--forest); text-decoration: none; }
  .navlinks { display: flex; gap: 4px; }
  .navlinks a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 8px 12px; }
  .navlinks a:hover { color: var(--forest); }
  .navlinks a[aria-current="page"] { color: var(--forest); box-shadow: inset 0 -2px 0 var(--brass); }

  /* Sub-page header */
  .page-hero { background: var(--forest); color: var(--white); padding: 72px var(--gutter) 56px; }
  .page-hero h1 { font-size: 2.75rem; }
  .page-hero .lede { color: rgba(255, 255, 255, 0.8); max-width: 62ch; margin-top: 14px; font-size: 1.1rem; }
  .page-hero .actions { margin-top: 28px; }

  /* Home previews */
  .preview { list-style: none; border-top: 1px solid var(--line); margin-bottom: 24px; }
  .preview li { display: grid; grid-template-columns: 1fr auto; gap: 2px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
  .preview .org { font-weight: 600; color: var(--forest); }
  .preview .role { color: var(--muted); font-size: 0.97rem; }
  .preview .when { color: var(--muted); font-size: 0.95rem; white-space: nowrap; text-align: right; }
  .more { display: inline-block; font-weight: 600; text-decoration: none; margin-top: 8px; }
  .more:hover { text-decoration: underline; }
  .pj-card.compact p { margin-bottom: 14px; }
  .pj-thumb { height: 200px; width: 100%; display: block; }

  /* Projects page */
  .proj { padding: 72px var(--gutter); scroll-margin-top: 64px; }
  .proj:nth-of-type(even) { background: var(--band); }
  .proj .kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-text); margin-bottom: 8px; }
  .proj h2 { margin-bottom: 10px; }
  .proj .context { color: var(--muted); font-size: 0.95rem; margin-bottom: 28px; }
  .proj-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
  .proj-fig { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
  .proj:nth-of-type(odd) .proj-fig { background: var(--band); border-color: transparent; }
  .proj-fig figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
  .proj-text h3 { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest); margin: 0 0 6px; }
  .proj-text p { color: var(--muted); margin-bottom: 18px; }
  .proj-text p:last-child { margin-bottom: 0; }
  .results { list-style: none; border-top: 1px solid var(--line); margin: 6px 0 18px; }
  .results li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
  .results li b { color: var(--forest); font-weight: 600; font-variant-numeric: tabular-nums; }
  .results li.best b, .results li.best span { color: var(--accent); }
  .group-label { padding: 48px var(--gutter) 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
  .jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
  .jump a { color: var(--white); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 5px 12px; font-size: 0.875rem; text-decoration: none; }
  .jump a:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
  .mp-cbd { fill: var(--white); stroke: var(--forest); stroke-width: 2.5; }
  .mp-lab { font-family: var(--sans); font-size: 12px; font-weight: 600; fill: var(--forest); paint-order: stroke; stroke: var(--white); stroke-width: 3px; }
  .kt-u { fill: none; stroke: var(--c1-soft); stroke-width: 2.5; }
  .kt-a { fill: none; stroke: var(--c1); stroke-width: 2.5; }
  .kt-shock { stroke: var(--forest); stroke-dasharray: 4 4; }

  @media (max-width: 900px) { .proj-grid { grid-template-columns: 1fr; gap: 24px; } }
  @media (max-width: 720px) {
    .topnav { height: auto; padding: 10px 16px; flex-wrap: wrap; justify-content: center; }
    .navlinks a { padding: 6px 8px; font-size: 0.9rem; }
    .page-hero { padding: 48px 20px 40px; }
    .page-hero h1 { font-size: 2.2rem; }
    .preview li { grid-template-columns: 1fr; }
    .preview .when { text-align: left; }
    .proj { padding: 48px 20px; }
    .group-label { padding: 36px 20px 0; }
  }

  /* Brass details */
  header, .page-hero { border-bottom: 3px solid var(--brass); }
  section.chess { border-top: 3px solid var(--brass); }
  .chess .section-label { color: var(--brass-light); }
  .chess-card:hover { border-color: var(--brass-light); }
  h2::after { content: ''; display: block; width: 36px; height: 2px; background: var(--brass); margin-top: 12px; }
  .page-hero h1::after, header h1::after { content: none; }
  .pj-card { transition: border-color 0.2s; }
  .pj-card:hover { border-color: var(--brass); }
  ::selection { background: #eadcbf; }

  /* Project detail pages (/projects/<name>/) */
  .crumb { display: inline-block; color: var(--brass-light); text-decoration: none; font-size: 0.9rem; margin-bottom: 22px; }
  .crumb:hover { color: var(--white); }
  .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
  .facts dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 4px; }
  .facts dd { color: rgba(255, 255, 255, 0.86); font-size: 0.97rem; line-height: 1.45; }
  .dsec { padding: 64px var(--gutter); scroll-margin-top: 64px; }
  .dsec.band { background: var(--band); }
  .dsec .prose { max-width: 68ch; }
  .dsec .prose p { color: var(--ink); opacity: 1; }
  .dsec .prose p.sub { color: var(--muted); }
  .dsec .prose ul { margin: 0 0 16px 1.2em; color: var(--ink); }
  .dsec .prose li { margin-bottom: 6px; }
  .dsec .prose li ul { margin: 6px 0 0 1.2em; color: var(--muted); }
  .pull { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--forest); border-left: 3px solid var(--brass); padding: 4px 0 4px 20px; margin: 8px 0 24px; max-width: 30ch; line-height: 1.3; }
  .fig { margin: 32px 0 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; }
  .dsec.band .fig { border-color: transparent; }
  .fig-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .fig-title { font-weight: 600; color: var(--forest); }
  .fig-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; line-height: 1.5; max-width: 80ch; }
  .fig svg { width: 100%; height: auto; display: block; overflow: visible; }
  .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .seg button { font: inherit; font-size: 0.85rem; padding: 6px 12px; background: var(--white); color: var(--muted); border: 0; border-right: 1px solid var(--line); cursor: pointer; }
  .seg button:last-child { border-right: 0; }
  .seg button:hover { color: var(--forest); }
  .seg button[aria-pressed="true"] { background: var(--forest); color: var(--white); }
  .seg button:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }
  .key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.82rem; color: var(--muted); }
  .key span { display: inline-flex; align-items: center; gap: 6px; }
  .key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
  .key i.ln { height: 2px; width: 14px; border-radius: 0; }
  .key i.dot { border-radius: 50%; }
  .ax { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
  .ax-t { font-family: var(--sans); font-size: 11px; fill: var(--muted); font-weight: 600; }
  .gl { stroke: var(--line); stroke-width: 1; }
  .base { stroke: #b9c2b8; stroke-width: 1; }
  .dlab { font-family: var(--sans); font-size: 12px; fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--white); stroke-width: 3px; stroke-linejoin: round; }
  .tip { position: absolute; pointer-events: none; background: var(--forest); color: var(--white); font-size: 0.82rem; line-height: 1.4; padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; opacity: 0; transition: opacity 0.12s; z-index: 5; }
  .tip b { color: var(--brass-light); font-weight: 600; }
  .plot { position: relative; }
  .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 0; }
  .stat { background: var(--band); border-radius: var(--radius); padding: 14px 16px; }
  .dsec.band .stat { background: var(--white); }
  .stat .n { font-family: var(--serif); font-size: 1.7rem; color: var(--forest); line-height: 1.1; font-variant-numeric: tabular-nums; }
  .stat .l { font-size: 0.8rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
  .ptable { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 8px 0 0; }
  .ptable th, .ptable td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); }
  .ptable th:first-child, .ptable td:first-child { text-align: left; }
  .ptable thead th { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-text); font-weight: 600; vertical-align: bottom; }
  .ptable td { color: var(--muted); }
  .ptable td:first-child { color: var(--ink); }
  .ptable tr.hl td { color: var(--forest); font-weight: 600; }
  .tbl-wrap { overflow-x: auto; }
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 8px; counter-reset: st; }
  .steps > div { border-top: 2px solid var(--brass); padding-top: 14px; }
  .steps > div::before { counter-increment: st; content: counter(st); display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--brass-text); line-height: 1; margin-bottom: 8px; }
  .steps h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--forest); margin: 0 0 6px; }
  .steps p { color: var(--muted); font-size: 0.95rem; margin: 0; }
  .cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
  .cardx { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
  .dsec.band .cardx { border-color: transparent; }
  .cardx h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--forest); margin: 0 0 6px; }
  .cardx p { color: var(--muted); font-size: 0.95rem; margin: 0 0 8px; }
  .cardx p:last-child { margin-bottom: 0; }
  .cardx.feat { border: 1px solid var(--brass); }
  .deal-n { font-family: var(--serif); font-size: 2rem; color: var(--forest); line-height: 1.1; }
  .deal-l { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }
  .badge { display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-text); background: #f3ecdf; padding: 3px 8px; border-radius: 2px; margin-bottom: 10px; }
  .calc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
  .calc select { font: inherit; font-size: 0.95rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); }
  .calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .next { padding: 40px var(--gutter); background: var(--band); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
  .next a { text-decoration: none; font-weight: 600; }
  .next small { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-text); font-weight: 600; margin-bottom: 2px; }
  .next .r { text-align: right; margin-left: auto; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  @media (max-width: 900px) { .facts, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps { grid-template-columns: 1fr; } }
  @media (max-width: 720px) {
    .dsec { padding: 48px 20px; }
    .next { padding: 32px 20px; }
    .cards2, .calc-out { grid-template-columns: 1fr; }
    .fig { padding: 14px 12px 12px; }
    .pull { font-size: 1.3rem; }
  }
  .moments { list-style: none; counter-reset: mo; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 24px; margin-top: 24px; }
  .moments li { counter-increment: mo; display: grid; grid-template-columns: 24px 1fr; gap: 2px 8px; font-size: 0.93rem; color: var(--muted); line-height: 1.4; }
  .moments li::before { content: counter(mo); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--c2); color: #fff; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
  .moments b { color: var(--ink); font-weight: 600; }
  @media (max-width: 900px) { .moments { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 720px) { .moments { grid-template-columns: 1fr; } }
  .proj h2 a { color: inherit; text-decoration: none; }
  .proj h2 a:hover { color: var(--accent); }

  /* Projects dropdown (top nav) */
  .navdrop { position: relative; display: flex; align-items: center; }
  .navdrop > a { padding-right: 4px !important; }
  .navdrop-btn { background: none; border: 0; color: var(--muted); padding: 8px 8px 8px 2px; cursor: pointer; display: inline-flex; align-items: center; }
  .navdrop-btn:hover, .navdrop.open .navdrop-btn { color: var(--forest); }
  .navdrop-btn svg { transition: transform 0.15s; }
  .navdrop.open .navdrop-btn svg { transform: rotate(180deg); }
  .navdrop-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 300px; background: var(--white); border: 1px solid var(--line); border-top: 2px solid var(--brass); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 24px rgba(28, 33, 30, 0.1); padding: 8px 0; z-index: 60; }
  .navdrop-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
  .navdrop:hover .navdrop-menu, .navdrop:focus-within .navdrop-menu, .navdrop.open .navdrop-menu { display: block; }
  .navdrop-h { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-text); padding: 6px 16px 4px; }
  .navlinks .navdrop-menu a { display: block; padding: 8px 16px; color: var(--ink); font-size: 0.95rem; white-space: nowrap; }
  .navlinks .navdrop-menu a:hover { background: var(--band); color: var(--forest); }
  .navlinks .navdrop-menu a.navdrop-all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; color: var(--accent); font-weight: 600; }
  @media (max-width: 720px) { .navdrop-menu { right: 50%; transform: translateX(50%); min-width: 270px; } .navlinks .navdrop-menu a { white-space: normal; } }

  /* Projects page: full write-up markers */
  .jump-group { margin-top: 22px; }
  .jump-group + .jump-group { margin-top: 14px; }
  .jump-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 8px; }
  .jump-group .jump { margin-top: 0; }
  .jump a.full { border-color: var(--brass-light); color: var(--white); }
  .jump a.full:hover { background: rgba(207, 178, 126, 0.15); }
  .full-cta { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 28px; padding: 9px 16px; border-radius: var(--radius); background: var(--forest); color: var(--white); font-weight: 600; font-size: 0.95rem; text-decoration: none; border-bottom: 2px solid var(--brass); }
  .full-cta:hover { background: var(--accent); color: var(--white); }
  .kicker .fw { display: inline-block; margin-left: 8px; padding: 2px 7px; background: #f3ecdf; color: var(--brass-text); border-radius: 2px; letter-spacing: 0.1em; }
  .pj-card .pj-link { display: inline-block; margin: 0 0 14px; }
  /* Projects tab underline spans the label and arrow, with the same side padding as the other tabs */
  .navlinks .navdrop > a[aria-current="page"] { box-shadow: none; }
  .navdrop.is-current { box-shadow: inset 0 -2px 0 var(--brass); }
  .navdrop.is-current .navdrop-btn { color: var(--forest); }
  .navdrop-btn { padding: 8px 12px 8px 2px; }
