
:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #60716e;
  --line: #d8e0dc;
  --paper: #fbfcfb;
  --band: #eef5f1;
  --accent: #006d75;
  --warm: #a04f2a;
  --mark: #f3c969;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.58;
}
a { color: var(--accent); text-decoration-thickness: 0.08em; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.94);
  backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.site-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}
nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}
nav a.active, nav a:hover { color: var(--ink); }
.hero, .section {
  padding: clamp(36px, 7vw, 86px) clamp(18px, 5vw, 64px);
}
.hero {
  min-height: 48vh;
  display: grid;
  align-content: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(0,109,117,0.12), transparent 42%),
    linear-gradient(300deg, rgba(160,79,42,0.14), transparent 45%),
    var(--band);
}
.hero-inner, .section-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}
.hero-copy {
  min-width: 0;
}
.hero-portrait {
  width: min(280px, 54vw);
  aspect-ratio: 1;
  justify-self: end;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(23, 33, 31, 0.16);
  box-shadow: 0 18px 48px rgba(23, 33, 31, 0.16);
  background: #fff;
}
.eyebrow {
  color: var(--warm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}
h1 {
  max-width: 920px;
  margin: 10px 0 16px;
  font-size: clamp(2.3rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}
h2 {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  letter-spacing: 0;
}
h3 { margin: 0 0 8px; letter-spacing: 0; }
.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}
.contact-row, .tag-row, .link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; text-decoration: none; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.item {
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.item-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: -4px 0 14px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.portal {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  text-decoration: none;
}
.portal strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.portal:hover { border-color: var(--accent); }
.compact-list {
  display: grid;
  gap: 10px;
}
.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.compact-row:hover .compact-title { color: var(--accent); }
.compact-title { font-weight: 700; }
.compact-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
}
.item p { color: var(--muted); margin: 0.35rem 0 0; }
.meta { color: var(--muted); font-size: 0.93rem; }
.prose {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(18px, 5vw, 64px);
}
.detail {
  width: min(920px, 100%);
}
.detail h2 {
  margin-top: 34px;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}
.evidence-list {
  display: grid;
  gap: 14px;
}
.evidence-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.evidence-item h3 {
  margin-top: 4px;
}
.prose img { max-width: 100%; border-radius: 8px; }
.blog-header {
  margin-bottom: 26px;
}
.blog-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 24px 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}
.media-block {
  margin: 28px 0;
}
.media-video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101816;
}
.media-embed {
  border: 0;
}
.media-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}
.mermaid-static {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}
.mermaid-static-node rect {
  fill: #ffffff;
  stroke: #7aa79b;
  stroke-width: 1.5;
}
.mermaid-static-node text {
  fill: var(--ink);
  font: 600 15px system-ui, sans-serif;
}
.mermaid-static-edge {
  fill: none;
  stroke: #426c62;
  stroke-width: 2;
}
.mermaid-static marker path {
  fill: #426c62;
}
.prose pre { overflow: auto; padding: 16px; background: #10201e; color: #eef5f1; }
.prose pre.mermaid,
.prose .mermaid {
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f7;
  color: var(--ink);
}
.prose .mermaid svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.prose code { font-size: 0.95em; }
.prose mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}
footer {
  padding: 28px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
@media (max-width: 720px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .compact-row { align-items: flex-start; flex-direction: column; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait {
    justify-self: start;
    width: min(220px, 62vw);
    order: -1;
  }
}
