:root {
    --paper: #f1f3f6;
    --ink: #172033;
    --muted: #55607a;
    --line: #cdd3de;
    --signal: #2b3fd6;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0f1626;
      --ink: #e8ebf3;
      --muted: #9aa5c0;
      --line: #28324b;
      --signal: #8f9dff;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
      --paper: #0f1626;
      --ink: #e8ebf3;
      --muted: #9aa5c0;
      --line: #28324b;
      --signal: #8f9dff;
      color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  a:hover { color: var(--signal); }
  a:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

  .wrap { max-width: 1120px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

  header.top { padding: 22px 0; }
  header.top .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
  .mark { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; text-decoration: none; }
  nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.95rem; }
  nav a { text-decoration: none; color: var(--muted); }
  nav a:hover { color: var(--signal); }

  .hero { padding: 56px 0 72px; border-bottom: 1px solid var(--line); }
  .hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
  h1 {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(2.5rem, 6.2vw, 4.6rem);
    line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 24px;
  }
  .lede { font-size: 1.2rem; max-width: 34em; margin: 0 0 16px; }
  .role { color: var(--muted); margin: 0 0 28px; }
  .links { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn { display: inline-block; padding: 10px 18px; border: 1.5px solid var(--ink); text-decoration: none; font-size: 0.95rem; border-radius: 3px; }
  .btn.primary { background: var(--signal); border-color: var(--signal); color: #fff; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0f1626; } }
  :root[data-theme="dark"] .btn.primary { color: #0f1626; }
  .btn:hover { border-color: var(--signal); color: var(--signal); }
  .btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

  .orbit { width: 100%; height: auto; display: block; }
  .orbit .ring { fill: none; stroke: var(--line); stroke-width: 1.2; }
  .orbit .ring.live { stroke: var(--signal); stroke-width: 1.6; stroke-dasharray: 2 7; stroke-linecap: round; }
  .orbit .core { fill: var(--ink); }
  .orbit .sat { fill: var(--signal); }
  .orbit text { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
  @media (prefers-reduced-motion: no-preference) {
    .spin { transform-origin: 250px 250px; animation: spin 90s linear infinite; }
    .spin.slow { animation-duration: 140s; animation-direction: reverse; }
    @keyframes spin { to { transform: rotate(360deg); } }
  }

  section.block { padding: 64px 0; border-bottom: 1px solid var(--line); }
  section.block .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
  h2 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin: 0; line-height: 1.25; }
  h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; }
  .content { max-width: 44em; }
  .content p { margin: 0 0 1.1em; }
  .sub { margin-top: 2.4em; }
  .sub:first-child { margin-top: 0; }
  .muted { color: var(--muted); }

  .rows { list-style: none; margin: 0; padding: 0; }
  .rows li { display: grid; grid-template-columns: 8em 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
  .rows li:first-child { border-top: 0; padding-top: 0; }
  .rows .when { color: var(--muted); font-size: 0.95rem; }

  .plain { list-style: none; margin: 0; padding: 0; }
  .plain li { padding: 12px 0; border-top: 1px solid var(--line); }
  .plain li:first-child { border-top: 0; padding-top: 0; }
  .plain .title { font-family: var(--serif); font-size: 1.08rem; }
  .plain .meta { color: var(--muted); font-size: 0.95rem; display: block; }

  .tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
  .tags li { border: 1px solid var(--line); border-radius: 3px; padding: 3px 10px; font-size: 0.92rem; }

  footer { padding: 40px 0 56px; color: var(--muted); font-size: 0.9rem; }
  footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

  @media (max-width: 820px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .orbit { max-width: 340px; margin: 0 auto; }
    section.block .wrap { grid-template-columns: 1fr; gap: 20px; }
    .rows li { grid-template-columns: 1fr; gap: 2px; }
  }

  nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .pagehead { padding: 40px 0 48px; border-bottom: 1px solid var(--line); }
  .pagehead h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 16px; }
  .pagehead .lede { margin: 0; color: var(--ink); }

  .hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.1; }
  .photos { padding: 40px 0 8px; }
  .photos .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
  .photos.single figure { max-width: 640px; }
  .photos figure { margin: 0; min-width: 0; }
  .photos img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 3px; }
  .photos figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
  .portrait { width: 100%; max-width: 400px; height: auto; display: block; justify-self: end; border-radius: 3px; }
  @media (max-width: 820px) { .portrait { justify-self: start; max-width: 320px; } }
