/* 🙂 the regular website. Layout follows the sauce white paper:
   a sticky contents rail on the left, one reading column on the right,
   grotesk headings, a bookish serif for reading, mono for data. Accent is t3r amber. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

.nm {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --fg: #1b1f27;
  --muted: #5d6573;
  --rule: #dde1e8;
  --accent: #b45309;
  --accent-soft: #fdf0dc;
  --accent-strong: #92400e; /* amber text on accent-soft, ≈ 6.5:1 */
  --accent-ink: #ffffff; /* white on #b45309 ≈ 5:1 */
  --code-bg: #eef1f5;
  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="dark"] .nm {
  --bg: #12151b;
  --surface: #191d25;
  --fg: #e4e7ed;
  --muted: #9aa3b2;
  --rule: #2a303b;
  --accent: #fbbf24;
  --accent-soft: #3a2a10;
  --accent-strong: #fbbf24;
  --accent-ink: #12151b;
  --code-bg: #1d222b;
}

:root[data-mode="normie"] {
  color-scheme: light;
  scroll-padding-top: 16px;
}
:root[data-mode="normie"][data-theme="dark"] {
  color-scheme: dark;
}
:root[data-mode="normie"] body {
  background: #f6f7f9;
}
:root[data-mode="normie"][data-theme="dark"] body {
  background: #12151b;
}

.nm {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-text-size-adjust: 100%;
}
.nm ::selection {
  background: var(--accent-soft);
  color: var(--fg);
}
.nm a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.nm a:hover {
  text-decoration-thickness: 2px;
}
.nm :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.nm .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.nm-skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 20;
  background: var(--fg);
  color: var(--bg) !important;
  padding: 4px 10px;
  font-family: var(--font-display);
}
.nm-skip:focus {
  top: 8px;
}

/* ---------- layout ---------- */

.nm-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-block: 40px 120px;
}
.nm-body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  padding-top: 8px;
}
@media (max-width: 860px) {
  .nm-wrap {
    padding-block: 24px 112px;
  }
  .nm-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* the rail lists the sections of the open tab */
.nm-toc {
  position: sticky;
  top: 88px;
  align-self: start;
  padding-top: 36px;
  font-family: var(--font-display);
  font-size: 14px;
}
.nm-toc .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.nm-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  counter-reset: s;
}
.nm-toc li.d0 {
  counter-increment: s;
}
.nm-toc ol a {
  color: var(--muted);
  text-decoration: none;
  display: flex;
  gap: 8px;
}
.nm-toc li.d0 a::before {
  content: counter(s);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  width: 1.4em;
  flex: none;
  padding-top: 2px;
}
.nm-toc li.d1 a {
  padding-left: calc(1.4em + 8px);
  font-size: 13px;
}
.nm-toc ol a:hover,
.nm-toc ol a[aria-current="true"] {
  color: var(--fg);
}
@media (max-width: 860px) {
  .nm-toc {
    display: none;
  }
}

.nm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--fg) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.nm-btn:hover {
  border-color: var(--fg);
}
.nm-btn.primary {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg) !important;
}
.nm-btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink) !important;
}

/* ---------- masthead: who, and how to reach me ---------- */

.nm-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
  padding-bottom: 28px;
}
@media (max-width: 860px) {
  .nm-masthead {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}
.nm .prompt-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.nm .prompt-line b {
  color: var(--accent);
  font-weight: 600;
}
.nm h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 12px 0 12px;
  text-wrap: balance;
}
.nm .title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 14px;
}
.nm .title b {
  color: var(--fg);
}
.nm .lede {
  font-size: 21px;
  line-height: 1.5;
  max-width: 38ch;
  margin: 0;
  text-wrap: pretty;
}
.nm .contact {
  font-style: normal;
  display: grid;
  gap: 10px;
  justify-items: end;
}
.nm .contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.nm .contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 860px) {
  .nm .contact {
    justify-items: start;
  }
  .nm .contact-links {
    justify-content: flex-start;
  }
}

/* ---------- tabs ---------- */

.nm-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: 0 -16px;
  padding: 10px 16px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.nm-tabs [role="tab"] {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
}
.nm-tabs [role="tab"]:hover {
  color: var(--fg);
  background: var(--code-bg);
}
.nm-tabs [role="tab"][aria-selected="true"] {
  color: var(--fg);
}
.nm-tabs [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
@media (max-width: 480px) {
  .nm-tabs {
    gap: 0;
  }
  .nm-tabs [role="tab"] {
    padding: 0 9px;
    font-size: 15px;
  }
  .nm-tabs [role="tab"][aria-selected="true"]::after {
    left: 5px;
    right: 5px;
  }
}
.nm-tabs [role="tab"]:focus-visible {
  outline-offset: -2px;
}
.nm .panel:focus-visible {
  outline: none;
}
.nm .panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 36px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--muted);
}
.nm .intro {
  padding-top: 36px;
  font-size: 19px;
  max-width: 60ch;
}

/* ---------- sections ---------- */

.nm section {
  padding-top: 52px;
  scroll-margin-top: 16px;
}
.nm h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.nm h2 .n {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
}
.nm h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin: 34px 0 10px;
}
.nm p,
.nm ul,
.nm ol.plain {
  max-width: 66ch;
}
.nm p {
  margin: 0 0 14px;
}
.nm code,
.nm .chip {
  font-family: var(--font-mono);
  font-size: 0.78em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.nm .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.nm .callout {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 22px 0 6px;
  max-width: 66ch;
  font-style: italic;
}
.nm .callout p {
  margin: 0;
}

/* stat cards */
.nm .stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 14px;
  margin: 22px 0 8px;
}
.nm .stat {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
}
.nm .stat .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.nm .stat .l {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-display);
  margin-top: 4px;
}

/* the four generations */
.nm ol.gens {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  max-width: 72ch;
  display: grid;
  gap: 0;
}
.nm ol.gens li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 4px 18px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.nm ol.gens li:last-child {
  border-bottom: 1px solid var(--rule);
}
.nm ol.gens .y {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 3px;
}
.nm ol.gens .g {
  font-family: var(--font-display);
  font-weight: 600;
}
.nm ol.gens li:last-child .g::after {
  content: "today";
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  vertical-align: 2px;
}
.nm ol.gens .t {
  grid-column: 2;
  font-size: 16px;
  margin: 0;
}

/* tables */
.nm .table-scroll {
  overflow-x: auto;
  margin: 10px 0 18px;
}
.nm table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  font-family: var(--font-display);
}
.nm th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 1px solid var(--fg);
  padding: 8px 14px 8px 0;
}
.nm td {
  border-bottom: 1px solid var(--rule);
  padding: 12px 14px 12px 0;
  vertical-align: top;
}
.nm td .sys {
  font-weight: 700;
  white-space: nowrap;
}
.nm td .what {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  margin-top: 4px;
  max-width: 52ch;
}
.nm td.delta {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.nm td.delta .from {
  display: block;
  color: var(--muted);
}
.nm td.delta .to {
  display: block;
  color: var(--fg);
  font-weight: 700;
}
.nm td.delta .to::before {
  content: "→ ";
  color: var(--accent);
}
@media (max-width: 640px) {
  .nm table.work,
  .nm table.work tbody,
  .nm table.work tr,
  .nm table.work td {
    display: block;
  }
  .nm table.work thead {
    display: none;
  }
  .nm table.work tr {
    border-bottom: 1px solid var(--rule);
    padding: 12px 0;
  }
  .nm table.work td {
    border: 0;
    padding: 0;
  }
  .nm table.work td.delta {
    display: flex;
    gap: 10px;
    margin-top: 8px;
  }
  .nm table.work td.delta span {
    display: inline;
  }
  .nm table.work td.chipcell {
    margin-top: 8px;
  }
}

/* experience */
.nm .job {
  padding: 22px 0 6px;
  border-top: 1px solid var(--rule);
  max-width: 72ch;
}
.nm .job:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.nm .job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  font-family: var(--font-display);
}
.nm .job-head .org {
  font-weight: 700;
  font-size: 19px;
}
.nm .job-head .role {
  color: var(--muted);
  font-weight: 600;
}
.nm .job-head .when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 3px;
}
.nm .job ul {
  padding-left: 20px;
  margin: 10px 0 14px;
}
.nm .job li {
  margin-bottom: 7px;
}
.nm .job li::marker {
  color: var(--accent);
}

/* side projects */
.nm .proj-index {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 10px;
  max-width: none;
}
.nm .proj-index a {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-display);
  transition: border-color 0.15s ease;
}
.nm .proj-index a:hover {
  border-color: var(--accent);
}
.nm .proj-index b {
  font-size: 16px;
}
.nm .proj-index span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.nm section.project {
  padding-top: 64px;
}
.nm section.project h2 {
  flex-wrap: wrap;
}
.nm .kind {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--code-bg);
  color: var(--muted);
  align-self: center;
}
.nm .kind.ml {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.nm .project .tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.4;
  margin: -4px 0 16px;
  max-width: 50ch;
}
.nm dl.hl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0 32px;
  margin: 4px 0 0;
  max-width: 80ch;
}
.nm dl.hl div {
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.nm dl.hl dt {
  font-family: var(--font-display);
  font-weight: 600;
}
.nm dl.hl dd {
  margin: 2px 0 0;
  font-size: 16px;
  color: var(--muted);
}
.nm .proj-foot {
  margin-top: 18px;
}
.nm .proj-foot .links {
  margin-top: 10px;
  font-family: var(--font-display);
}

/* figures inside projects */
.nm figure.fig {
  margin: 22px 0 8px;
  max-width: 100%;
}
.nm figure.fig figcaption {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.nm pre,
.nm code,
.nm .chip {
  font-variant-ligatures: none; /* code reads exactly as typed: ->> stays ->> */
}
.nm pre {
  margin: 0;
  background: var(--code-bg);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
}
.nm pre .r {
  color: var(--accent-strong);
  font-weight: 600;
}
.nm pre .c {
  color: var(--muted);
  font-style: italic;
}
.nm pre.term {
  background: #0e0e11;
  color: #e4e4e7;
  font-size: 12.5px;
  border: 1px solid var(--rule);
}
.nm pre.term .st-running {
  color: #4ade80;
}
.nm pre.term .st-restarting {
  color: #f59e0b;
}
.nm pre.term .st-failing {
  color: #f87171;
}
.nm pre.term .st-finished {
  color: #60a5fa;
}
.nm .grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px 20px;
}
.nm .ex {
  min-width: 0;
}
.nm .ex h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 6px;
}

/* "Try me" live demos */
.nm .tryme {
  margin: 24px 0 10px;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  max-width: 820px;
}
.nm .tryme-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
}
.nm .tryme-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  white-space: nowrap;
}
.nm .tryme-badge.sm {
  font-size: 10px;
  padding: 2px 7px;
  margin-left: 4px;
  vertical-align: 2px;
}
.nm .tryme-note {
  margin: 4px 0 14px;
  font-size: 15.5px;
  color: var(--muted);
}
.nm .ex-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.nm .ex-chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}
.nm .ex-chip:hover {
  border-color: var(--accent);
}
.nm .repl-src {
  display: block;
  width: 100%;
  min-height: 7.5em;
  resize: vertical;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px; /* 16px on phones, below, so iOS doesn't zoom */
  line-height: 1.6;
  font-variant-ligatures: none;
  tab-size: 2;
}
.nm .repl-src:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.nm .repl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 10px 0;
}
.nm .repl-bar kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
}
@media (pointer: coarse) {
  .nm .repl-bar kbd {
    display: none;
  }
}
.nm .repl-status {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
}
.nm pre.repl-out {
  min-height: 5.5em;
  max-height: 22em;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0e0e11;
  color: #e4e4e7;
  border: 1px solid var(--rule);
}
.nm pre.repl-out .p {
  color: #22d3ee;
  font-weight: 700;
}
.nm pre.repl-out .echo {
  color: #fafafa;
}
.nm pre.repl-out .o {
  color: #a1a1aa;
}
.nm pre.repl-out .r {
  color: #fbbf24;
  font-weight: 600;
  font-style: normal;
}
.nm pre.repl-out .e {
  color: #f87171;
}
.nm pre.repl-out .c {
  color: #a1a1aa;
  font-style: italic;
}
@media (max-width: 640px) {
  .nm .repl-src {
    font-size: 16px;
  }
  .nm .tryme {
    padding: 16px 14px;
  }
}

.nm .game-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgb(34 211 238 / 0.14), transparent 70%),
    #050507;
  border: 1px solid var(--rule);
}
@media (max-width: 640px) {
  .nm .game-frame {
    aspect-ratio: 3 / 4;
  }
}
.nm .game-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.nm .game-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  border: 0;
  background: none;
  color: #e4e4e7;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.nm .game-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a5f3fc 0 12%, #22d3ee 40%, #0e7490 100%);
  box-shadow: 0 0 28px rgb(34 211 238 / 0.55), 0 0 80px rgb(34 211 238 / 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nm .game-play:hover .game-orb,
.nm .game-play:focus-visible .game-orb {
  transform: scale(1.12);
}
.nm .game-play:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: -4px;
}
.nm .game-links {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .nm .game-orb {
    transition: none;
  }
}

/* career portfolio */
.nm .role-line {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  margin-top: -6px;
}
.nm .role-line .when,
.nm .pf-head .when {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  margin-left: 8px;
  white-space: nowrap;
}
.nm nav.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
  max-width: 80ch;
}
.nm nav.jump a {
  font-family: var(--font-display);
  font-size: 13px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}
.nm nav.jump a:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.nm article.pf {
  padding: 20px 0 8px;
  border-top: 1px solid var(--rule);
  max-width: 76ch;
  scroll-margin-top: 72px;
}
.nm article.pf:first-of-type {
  margin-top: 14px;
}
.nm .pf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
}
.nm .pf-head h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0;
}
.nm .pf-head .when {
  color: var(--muted);
}
.nm article.pf .blurb {
  margin: 6px 0 0;
  color: var(--muted);
  font-style: italic;
}
.nm article.pf ul {
  padding-left: 20px;
  margin: 10px 0 12px;
}
.nm article.pf li {
  margin-bottom: 7px;
}
.nm article.pf li::marker {
  color: var(--accent);
}
.nm .edu .note {
  margin: 4px 0 0;
  font-size: 16px;
  color: var(--muted);
}

/* who I am: at a glance */
.nm dl.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0 24px;
  margin: 26px 0 0;
  max-width: 76ch;
  font-family: var(--font-display);
}
.nm dl.glance div {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.nm dl.glance dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.nm dl.glance dd {
  margin: 2px 0 0;
  font-weight: 600;
}

@media (max-width: 640px) {
  .nm ol.gens li {
    grid-template-columns: minmax(0, 1fr);
  }
  .nm ol.gens .t {
    grid-column: 1;
  }
}

/* principles */
.nm ol.road {
  padding-left: 26px;
  max-width: 66ch;
  margin: 8px 0 0;
}
.nm ol.road li {
  margin-bottom: 12px;
}
.nm ol.road li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}
.nm ol.road b {
  font-family: var(--font-display);
  font-weight: 600;
}
.nm ol.road .d {
  display: block;
  color: var(--muted);
  font-size: 16px;
}
.nm ol.cols {
  columns: 2 280px;
  column-gap: 32px;
  padding-left: 26px;
  margin: 8px 0 0;
  max-width: 76ch;
  font-size: 16px;
}
.nm ol.cols li {
  break-inside: avoid;
  margin-bottom: 8px;
}
.nm ol.cols li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.nm .note-line {
  font-style: italic;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 62ch;
  margin: -2px 0 14px;
}

.nm .note-line.summary {
  font-style: normal;
  color: var(--fg);
  margin: 4px 0 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

/* education, contact */
.nm .edu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nm .edu li {
  margin-bottom: 10px;
}
.nm .edu b {
  font-family: var(--font-display);
}
.nm .edu .dim {
  color: var(--muted);
}
.nm .contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.nm footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-display);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ---------- the dock: 🤓 / 🙂 and theme ---------- */

.nm-dock {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 6px 24px rgb(15 20 30 / 0.12), 0 1px 3px rgb(15 20 30 / 0.08);
  font-family: var(--font-display);
}
.nm-dock button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.nm-dock button:hover {
  color: var(--fg);
}
.nm-dock .modeswitch {
  display: flex;
  gap: 2px;
}
.nm-dock .modeswitch button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}
.nm-dock .emoji {
  font-size: 17px;
  line-height: 1;
}
.nm-dock .sep {
  width: 1px;
  height: 22px;
  background: var(--rule);
  margin: 0 2px;
}
@media (max-width: 480px) {
  .nm-dock .lbl {
    display: none;
  }
  .nm-dock button {
    padding: 0 12px;
  }
}

.nm-noscript {
  max-width: 66ch;
  margin: 48px auto;
  padding: 0 16px;
  font-family: Georgia, serif;
}

/* ---------- print: the page as a resume ---------- */

@media print {
  .nm {
    --bg: #fff;
    --surface: #fff;
    --fg: #000;
    --muted: #444;
    --rule: #ccc;
    --accent: #000;
    --code-bg: #f1f1f1;
    font-size: 11pt;
    padding: 0;
  }
  .nm-toc,
  .nm-dock,
  .nm-tabs,
  .nm .contact-links,
  .nm .panel-actions,
  .nm-skip {
    display: none !important;
  }
  .nm .panel[hidden] {
    display: none !important;
  }
  .nm-wrap,
  .nm-body {
    display: block;
    padding: 0;
  }
  .nm section {
    padding-top: 20px;
    break-inside: auto;
  }
  .nm .job,
  .nm .proj {
    break-inside: avoid;
  }
}

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