/* ===========================================================
   Self-hosted fonts — SIL Open Font License 1.1, all three.
   Licence texts ship beside the files in assets/fonts/.

   Generated from the Fontsource packages, latin + latin-ext only.
   Bricolage and Plex Sans are variable (the Bricolage build carries
   both the optical-size and weight axes, so headings keep their
   optical sizing). Plex Mono has no variable release, so three
   static weights are shipped: 400, 500, 600.
   =========================================================== */

/* bricolage-grotesque-latin-ext-opsz-normal.woff2 */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* bricolage-grotesque-latin-opsz-normal.woff2 */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-sans-latin-ext-wght-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url(fonts/ibm-plex-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-wght-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url(fonts/ibm-plex-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-mono-latin-ext-400-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2'), url(./files/ibm-plex-mono-latin-ext-400-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-400-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'), url(./files/ibm-plex-mono-latin-400-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-mono-latin-ext-500-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2'), url(./files/ibm-plex-mono-latin-ext-500-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-500-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'), url(./files/ibm-plex-mono-latin-500-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-mono-latin-ext-600-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-latin-ext-600-normal.woff2) format('woff2'), url(./files/ibm-plex-mono-latin-ext-600-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-600-normal.woff2 */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format('woff2'), url(./files/ibm-plex-mono-latin-600-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ===========================================================
   cryptography.lat — Terra
   Warm cream field, clay rules, moss band, cocoa blocks,
   teal reserved for logo / headings / primary button.
   =========================================================== */

:root {
  --bg:        #efe7db;  /* warm cream — page */
  --card:      #f7f3ec;  /* lighter cream — cards */
  --clay:      #c2a58c;  /* borders, ghost button */
  --moss:      #5f6f52;  /* labels, lower band */
  --teal:      #1f5c63;  /* logo, headings, primary button */
  --ink:       #4a3a32;  /* body text, large blocks */
  --ink-2:     #6f5b4f;  /* secondary text */
  --rule:      rgba(194, 165, 140, .4);
  --cream-up:  #f4efe6;  /* type on cocoa/moss */

  --sev-c-bg: #f0dad1; --sev-c: #97402a;
  --sev-h-bg: #f2e5c9; --sev-h: #85601a;
  --sev-m-bg: #e1e5d9; --sev-m: #4d5c42;

  --ok:   #5f6f52;
  --warn: #a5462f;

  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1200px;

  color-scheme: light;
}

* { box-sizing: border-box; }

/* A declared `display` outranks the user-agent's [hidden] rule, so any
   element we give display:grid/flex to would ignore the hidden attribute.
   This keeps `el.hidden = true` meaning what it says. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { font-family: "Bricolage Grotesque", "IBM Plex Sans", sans-serif; margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--cream-up);
  padding: 10px 16px; z-index: 50; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.sample-banner {
  margin: 0; padding: 9px var(--pad);
  background: var(--sev-h-bg); color: var(--sev-h);
  border-bottom: 1px solid var(--clay);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .02em; text-align: center;
}
.sample-banner code { font-size: 11.5px; }

/* ---------- nav ---------- */
.nav { border-bottom: 1px solid var(--rule); }
.nav-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px var(--pad);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.mark { width: 26px; height: 26px; flex: none; }
.brand-name {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 16px; color: var(--teal); letter-spacing: -.015em;
}
.nav-links {
  display: flex; flex-wrap: wrap;
  gap: 4px clamp(14px, 2.4vw, 26px);
  min-width: 0;
}
.nav-links a { font-size: 14px; font-weight: 500; text-decoration: none; padding-block: 4px; }
.nav-links a:hover { color: var(--teal); }
.nav-social { display: flex; gap: 14px; }
.nav-social a { font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.nav-social a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(38px, 7vw, 58px) var(--pad) clamp(30px, 5vw, 42px);
  display: grid; gap: clamp(28px, 5vw, 52px);
  grid-template-columns: 1fr;
  align-items: center;
}
.hero-text { display: grid; gap: 22px; justify-items: start; }

/* Portrait sits second in the source so the headline leads on a phone;
   on wide screens the grid puts it alongside. */
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
}

.portrait { margin: 0; max-width: 460px; width: 100%; justify-self: center; }
.portrait img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover;
  background: var(--card);
  border: 1px solid var(--clay);
  border-radius: 10px;
  box-shadow: 0 22px 44px -32px rgba(74, 58, 50, .7);
}
.portrait figcaption {
  margin-top: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--moss); text-align: right;
}
.role {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(11px, 1.6vw, 12px); letter-spacing: .13em; text-transform: uppercase;
  color: var(--moss); font-weight: 500;
}
.hero h1 {
  font-weight: 800; font-size: clamp(38px, 7.4vw, 62px); line-height: 1.02;
  letter-spacing: -.03em; color: var(--teal); text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--moss); }
.lede { margin: 0; max-width: 56ch; font-size: clamp(15px, 2vw, 17px); color: var(--ink-2); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 6px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: var(--cream-up); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border: 1px solid var(--clay); color: var(--ink); }
.btn-ghost:hover { background: var(--card); }

/* ---------- CVE ticker ---------- */
.ticker {
  display: flex; align-items: stretch;
  background: var(--card);
  border-block: 1px solid var(--clay);
}
.ticker-tag {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 12px clamp(14px, 3vw, 20px);
  background: var(--teal); color: var(--cream-up);
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  font-weight: 600; letter-spacing: .1em;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

.ticker-rail { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track {
  display: flex; align-items: center; gap: 34px;
  padding: 12px 20px; white-space: nowrap; width: max-content;
  animation: scroll 68s linear infinite;
}
.ticker-rail:hover .ticker-track,
.ticker-track:focus-within { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0) } to { transform: translateX(-50%) } }

.cve {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
  color: var(--ink-2); text-decoration: none;
}
.cve:hover .cve-id { text-decoration: underline; text-underline-offset: 3px; }
.cve-id { color: var(--ink); font-weight: 600; }
.sev {
  padding: 2px 7px; border-radius: 3px;
  /* 600, not 700: Plex Mono ships here as three static weights and 700
     would be synthesised into a faux-bold. */
  font-size: 10.5px; font-weight: 600; letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}
.sev-critical { background: var(--sev-c-bg); color: var(--sev-c); }
.sev-high     { background: var(--sev-h-bg); color: var(--sev-h); }
.sev-medium,
.sev-low,
.sev-none     { background: var(--sev-m-bg); color: var(--sev-m); }
.cve-loading { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--ink-2); }

/* ---------- panels ---------- */
.panels {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(26px, 4vw, 38px) var(--pad) 0;
  display: grid; gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .panels { grid-template-columns: 1fr 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid var(--clay);
  border-radius: 10px;
  padding: 22px clamp(18px, 3vw, 26px) 20px;
  display: flex; flex-direction: column;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.panel-title { font-size: 15px; font-weight: 700; color: var(--teal); }
.panel-meta {
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--ink-2);
}
.panel-meta a { color: inherit; }

/* the featured block — cocoa */
.panel-feat {
  background: var(--ink); border-color: var(--ink); color: #ece4d8;
}
.panel-feat .panel-title { color: var(--cream-up); }
.panel-feat .panel-meta  { color: rgba(236, 228, 216, .62); }

.rows, .papers, .foot-list { list-style: none; margin: 0; padding: 0; }

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.panel-feat .row { border-bottom-color: rgba(236, 228, 216, .16); }
.row:last-child { border-bottom: none; }

.svc { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.svc-name { text-decoration: none; }
.svc-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 111, 82, .15);
}
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(165, 70, 47, .15); }
.dot.unknown { background: transparent; box-shadow: inset 0 0 0 2px currentColor; opacity: .55; }
.panel-feat .dot { background: #a8c49a; box-shadow: 0 0 0 3px rgba(168, 196, 154, .18); }
.panel-feat .dot.warn { background: #e0a878; box-shadow: 0 0 0 3px rgba(224, 168, 120, .18); }
.panel-feat .dot.unknown { background: transparent; box-shadow: inset 0 0 0 2px #ece4d8; opacity: .5; }

.state {
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  color: var(--ink-2); text-align: right; white-space: nowrap;
}
.panel-feat .state { color: rgba(236, 228, 216, .62); }

.dd-link {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: inherit; opacity: .6; text-decoration: none; flex: none;
}
.dd-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

.panel-foot {
  margin: 14px 0 0; padding-top: 12px;
  border-top: 1px solid rgba(236, 228, 216, .16);
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: rgba(236, 228, 216, .62);
}
.panel-foot a { color: inherit; }

.paper { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.paper:last-child { border-bottom: none; }
.paper-id {
  display: block; margin-bottom: 3px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: .05em; color: var(--ink-2);
}
.paper a { font-size: 14.5px; line-height: 1.4; text-decoration: none; }
.paper a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--teal); }
.row-empty {
  padding: 10px 0; font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px; opacity: .7;
}

/* ---------- moss band ---------- */
.band { background: var(--moss); margin-top: clamp(30px, 5vw, 44px); }
.band-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 4vw, 36px) var(--pad) clamp(34px, 5vw, 48px);
}
.band-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.band-title { font-size: 17px; font-weight: 700; color: var(--cream-up); }
.band-sub {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(244, 239, 230, .66);
}
.props {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.prop { background: var(--card); border-radius: 8px; padding: 15px 16px 18px; }
.prop-n {
  display: block; margin-bottom: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  letter-spacing: .1em; color: var(--teal);
}
.prop h3 { font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.prop p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }

/* ---------- work ---------- */
.work {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(36px, 5vw, 54px) var(--pad) clamp(20px, 3vw, 30px);
}
.section-title {
  font-size: clamp(22px, 3.4vw, 28px); font-weight: 700;
  color: var(--teal); letter-spacing: -.02em; margin-bottom: 22px;
}
.work-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.work-card {
  background: var(--card); border: 1px solid var(--clay);
  border-radius: 10px; padding: 22px 22px 24px;
}
.work-card h3 { font-size: 16px; font-weight: 700; color: var(--teal); margin-bottom: 8px; }
.work-card p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); margin-top: clamp(30px, 5vw, 46px); }
.foot-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(30px, 4vw, 44px) var(--pad) 22px;
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.foot-title { font-size: 17px; font-weight: 700; color: var(--teal); }
.foot-role {
  margin: 6px 0 0;
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--moss);
}
.foot-h {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--moss); margin-bottom: 10px;
}
.foot-list li { margin-bottom: 7px; }
.foot-list a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.foot-list a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.foot-fine {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad) 34px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; width: auto; }
  .pulse { animation: none; }
  * { transition: none !important; }
}

/* ===========================================================
   Research page
   =========================================================== */

.page-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(34px, 5vw, 50px) var(--pad) clamp(22px, 3vw, 30px);
  display: grid; gap: 18px; justify-items: start;
}
.page-head h1 {
  font-weight: 800; font-size: clamp(34px, 6vw, 52px); line-height: 1.02;
  letter-spacing: -.03em; color: var(--teal);
}

/* identity chips — ORCID / dblp / Scholar */
.ids { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.id-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 7px 13px; border: 1px solid var(--clay); border-radius: 999px;
  background: var(--card); text-decoration: none;
}
.id-chip:hover { border-color: var(--teal); }
.id-k {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--moss);
}
.id-v {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}

.figures {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: .04em; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- filters ---------- */
.pubs { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--clay); background: transparent; color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif; font-size: 13px; font-weight: 500;
}
.chip:hover { background: var(--card); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--cream-up); }
.chip-n {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px;
  opacity: .7; font-variant-numeric: tabular-nums;
}

/* ---------- publications ---------- */
.year-group { display: grid; grid-template-columns: 1fr; gap: 2px; padding-top: 24px; }
@media (min-width: 760px) {
  .year-group { grid-template-columns: 96px minmax(0, 1fr); gap: 0 24px; }
}
.year {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px; font-weight: 500; letter-spacing: .06em;
  color: var(--moss); padding-top: 14px;
  font-variant-numeric: tabular-nums;
}
.pub-list { list-style: none; margin: 0; padding: 0; }

.pub { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.pub:last-child { border-bottom: none; }

.pub-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pub-title {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: clamp(15px, 2vw, 17px); line-height: 1.3;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
a.pub-title:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.pub-type {
  flex: none; padding: 2px 8px; border-radius: 3px;
  background: var(--card); border: 1px solid var(--clay);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--moss);
}

.pub-authors { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.pub-authors .me { color: var(--ink); font-weight: 600; }

.pub-meta {
  margin: 5px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; color: var(--ink-2);
  display: flex; gap: 7px; flex-wrap: wrap; align-items: baseline;
}
.pub-venue { color: var(--teal); }
.pub-doi { color: inherit; text-decoration: none; word-break: break-all; }
.pub-doi:hover { text-decoration: underline; text-underline-offset: 3px; }
.sep { opacity: .45; }

.pub-src { margin: 7px 0 0; display: flex; gap: 6px; }
.src-tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); opacity: .62;
  border: 1px solid var(--rule); border-radius: 3px; padding: 1px 6px;
}

.srcnote {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(34px, 5vw, 52px) var(--pad) clamp(20px, 3vw, 30px);
}
.srcnote .work-card em { font-style: italic; }

/* ---------- expander ---------- */
.pub-head { align-items: flex-start; flex-wrap: nowrap; }
.pub-titlewrap {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-right: auto; min-width: 0;
}
.expander {
  flex: none; width: 30px; height: 30px; margin-top: -2px;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--clay); border-radius: 50%;
  color: var(--moss);
}
.expander:hover { background: var(--card); border-color: var(--teal); color: var(--teal); }
.chev { width: 14px; height: 14px; transition: transform .16s ease; }
.pub.open .expander .chev { transform: rotate(180deg); }
.chip-ghost { margin-left: auto; color: var(--ink-2); }
.chip-ghost .chev { width: 12px; height: 12px; }
.chip-ghost[aria-pressed] { background: transparent; }

.more-n { color: var(--moss); font-variant-numeric: tabular-nums; }

/* ---------- expanded panel ---------- */
.pub-more {
  margin-top: 12px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px;
  display: grid; gap: 7px;
}
.d-row {
  display: grid; gap: 2px 14px;
  grid-template-columns: 1fr;
  font-size: 13.5px; line-height: 1.5;
}
@media (min-width: 620px) {
  .d-row { grid-template-columns: 92px minmax(0, 1fr); }
}
.d-k {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--moss); padding-top: 3px;
}
.d-v { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.d-v .me { color: var(--ink); font-weight: 600; }
.d-links { display: flex; gap: 8px; flex-wrap: wrap; }
.d-link {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px;
  color: var(--teal); text-decoration: none;
  border: 1px solid var(--clay); border-radius: 3px; padding: 2px 8px;
  background: var(--bg);
}
.d-link:hover { border-color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.withdrawn {
  margin: 0 0 4px; padding: 7px 10px; border-radius: 4px;
  background: var(--sev-c-bg); color: var(--sev-c);
  font-size: 12.5px;
}
.pub-more .pub-src { margin: 0; }

@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }

/* ---------- citation metrics ---------- */
.metrics {
  display: grid; gap: 14px; width: 100%;
  grid-template-columns: 1fr;
}
@media (min-width: 680px) {
  .metrics { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
.metric-col {
  background: var(--card); border: 1px solid var(--clay);
  border-radius: 10px; padding: 14px 16px 16px;
}
.metric-src {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--moss); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.metric-src-link { color: inherit; text-decoration: none; }
.metric-src-link:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.metric-stamp { color: var(--ink-2); opacity: .75; letter-spacing: .06em; text-transform: none; }

.metric-row { display: flex; gap: 22px; margin: 0; flex-wrap: wrap; }
.metric dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.metric dd {
  margin: 2px 0 0;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 26px; line-height: 1; color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.metric-note {
  margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-2);
}

/* per-work citation count */
.cites { color: var(--ink); font-variant-numeric: tabular-nums; }
.cites.stale { opacity: .6; }

.filter-tools { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.year-group.flat { grid-template-columns: 1fr; padding-top: 10px; }


/* ---------- source cards: four items, never an orphan row ---------- */
.srcnote .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) {
  .srcnote .work-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .srcnote .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- social marks ----------
   Monograms rather than the platforms' own logos: they sit in the Terra
   palette instead of fighting it with four brand colours, and they do not
   go stale when a company redraws its mark (this site would already have
   been carrying a bird). The accessible name and the tooltip carry the
   platform and the handle. */
.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;
}
.soc {
  width: 30px; height: 30px; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--clay); border-radius: 50%;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 13px; line-height: 1; color: var(--ink-2);
  text-decoration: none;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
a.soc:hover, a.soc:focus-visible {
  background: var(--teal); border-color: var(--teal); color: var(--cream-up);
}
.nav-social { gap: 8px; }

/* Brand marks (Simple Icons, CC0). currentColor is what makes them
   inherit the circle's colour, so the hover state needs no extra rules. */
.soc svg { width: 15px; height: 15px; display: block; fill: currentColor; }
.soc-sm svg { width: 11px; height: 11px; }

/* the same mark, smaller, as a bullet in the footer list */
.soc-sm {
  width: 22px; height: 22px; font-size: 11px;
  margin-right: 9px; vertical-align: middle;
}
.foot-list a { display: inline-flex; align-items: center; }
.foot-list a:hover .soc-sm { border-color: var(--teal); color: var(--teal); }

@media (prefers-reduced-motion: reduce) { .soc { transition: none; } }

/* ===========================================================
   Work page
   =========================================================== */

.services {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 4vw, 42px) var(--pad) 0;
}

/* Each service is a ruled band, not a card: they are read in sequence,
   and four boxed cards in a row would flatten them into a menu. */
.svc-block {
  display: grid; gap: 6px 36px;
  grid-template-columns: 1fr;
  padding: clamp(22px, 3vw, 30px) 0;
  border-top: 1px solid var(--rule);
}
.svc-block:first-of-type { border-top: 1px solid var(--clay); }
@media (min-width: 880px) {
  .svc-block { grid-template-columns: minmax(0, 7fr) minmax(0, 11fr); }
}
.svc-head h3 {
  font-size: clamp(19px, 2.6vw, 23px); font-weight: 700;
  color: var(--teal); letter-spacing: -.02em; line-height: 1.15;
}
.svc-kind {
  margin: 8px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; line-height: 1.5; letter-spacing: .04em;
  color: var(--moss);
}
.svc-body p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
.svc-list {
  margin: 16px 0 0; padding: 0; list-style: none;
  display: grid; gap: 7px;
}
.svc-list li {
  position: relative; padding-left: 20px;
  font-size: 14px; line-height: 1.5; color: var(--ink);
}
.svc-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 7px; height: 1px; background: var(--clay);
}

/* numbered phases — the numbers mean order here, so they stay */
.phases { counter-reset: none; }
.phases .prop { display: block; }

.deliver {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(36px, 5vw, 54px) var(--pad) clamp(10px, 2vw, 18px);
}

.engagements {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(30px, 4vw, 44px) var(--pad) 0;
}
.placeholder-note {
  margin: 0; padding: 18px 20px; max-width: 70ch;
  background: var(--card); border: 1px solid var(--clay);
  border-left: 3px solid var(--moss); border-radius: 0 8px 8px 0;
  font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
}
.placeholder-note strong { color: var(--ink); font-weight: 600; }

/* ---------- contact band ---------- */
.contact-band { background: var(--ink); margin-top: clamp(36px, 5vw, 56px); }
.contact-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(34px, 5vw, 52px) var(--pad);
  color: #ece4d8;
}
.contact-title {
  font-size: clamp(22px, 3.4vw, 30px); font-weight: 700;
  color: var(--cream-up); letter-spacing: -.02em; text-wrap: balance;
  max-width: 22ch;
}
.contact-lede {
  margin: 14px 0 0; max-width: 58ch;
  font-size: 15.5px; line-height: 1.6; color: rgba(236, 228, 216, .78);
}
.contact-list {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; gap: 12px;
}
.contact-list li {
  display: grid; gap: 2px 18px; grid-template-columns: 1fr;
  padding-top: 12px; border-top: 1px solid rgba(236, 228, 216, .16);
  font-size: 15px;
}
@media (min-width: 620px) {
  .contact-list li { grid-template-columns: 110px minmax(0, 1fr); align-items: baseline; }
}
.c-k {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(236, 228, 216, .6);
}
.contact-list a { color: #ece4d8; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-band .foot, .contact-band + .foot { margin-top: 0; }

.section-lede {
  margin: -8px 0 22px; max-width: 62ch;
  font-size: 15px; line-height: 1.6; color: var(--ink-2);
}
.section-lede a { color: var(--teal); text-underline-offset: 3px; }

/* four cards, never an orphan row — same rule as the source cards */
.deliver .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) {
  .deliver .work-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .deliver .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===========================================================
   Teaching page
   =========================================================== */

.page-nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px;
}
.page-nav a {
  padding: 6px 13px; border: 1px solid var(--clay); border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none;
  background: var(--card);
}
.page-nav a:hover { border-color: var(--teal); color: var(--teal); }

.teach {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(30px, 4vw, 44px) var(--pad) 0;
}
.teach .section-lede { margin-top: -10px; }

.entries { list-style: none; margin: 0; padding: 0; }

.entry {
  display: grid; gap: 4px 28px;
  grid-template-columns: 1fr;
  padding: 18px 0 20px;
  border-top: 1px solid var(--rule);
}
.entry:first-child { border-top: 1px solid var(--clay); }
@media (min-width: 760px) {
  .entry { grid-template-columns: 150px minmax(0, 1fr); }
}
.entry-when {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px; letter-spacing: .04em; color: var(--moss);
  padding-top: 3px; font-variant-numeric: tabular-nums;
}
.entry-body h3 {
  font-size: 17px; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.3;
}
.entry-meta {
  margin: 5px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; line-height: 1.5; color: var(--teal);
}
.entry-body p { margin: 9px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.entry-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px !important; }
.entry-links a {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px;
  color: var(--teal); text-decoration: none;
  border: 1px solid var(--clay); border-radius: 3px; padding: 2px 9px;
  background: var(--bg);
}
.entry-links a:hover { border-color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* Placeholders announce themselves, so an unfilled section still reads
   honestly rather than looking like a claim. */
.is-placeholder { opacity: .72; }
.is-placeholder .entry-body h3::after,
.work-card.is-placeholder h3::after {
  content: "PLACEHOLDER";
  display: inline-block; vertical-align: middle; margin-left: 9px;
  padding: 2px 7px; border-radius: 3px;
  background: var(--sev-h-bg); color: var(--sev-h);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px; font-weight: 600; letter-spacing: .1em;
}
.entry.is-placeholder .entry-links a,
.work-card.is-placeholder .entry-links a { pointer-events: none; opacity: .6; }
