/* ==========================================================================
   Marc Carrillos (markyy) — Patch Notes v2.3
   Engineer's notebook on warm paper. Zero frameworks, WCAG AA verified.
   ========================================================================== */

:root {
  --bg: #F4F1EA;
  --bg-subtle: #EAE5D9;
  --ink: #16150F;
  --muted: #6B675C;       /* 5.00:1 on #F4F1EA (AA) */
  --rule: #D9D3C5;
  --accent: #FF5B1F;      /* Vibrant signal orange for bar, dot, selection */
  --accent-text: #C23B08; /* 4.75:1 on #F4F1EA (AA for text & focus rings) */
  --selection: rgba(255, 91, 31, 0.25);

  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --margin-col: 188px;
  --content-col: 720px;
  --page-max: calc(var(--margin-col) + var(--content-col) + 48px);
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 58px;
}

[data-theme="dark"] {
  --bg: #15140F;
  --bg-subtle: #1E1C15;
  --ink: #EDE8DC;         /* 15.08:1 on #15140F */
  --muted: #9A9485;       /* 6.10:1 on #15140F */
  --rule: #2C2A22;
  --accent: #FF5B1F;
  --accent-text: #FF5B1F; /* 5.94:1 on #15140F (AA) */
  --selection: rgba(255, 91, 31, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.09375rem; /* 17.5px */
  line-height: 1.62;
  background: var(--bg);
  color: var(--ink);
  transition: background-color 220ms ease, color 220ms ease;
}

::selection {
  background: var(--selection);
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}

.serif { font-family: var(--font-serif); font-weight: 400; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

p { margin: 0 0 1em; max-width: 65ch; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.24em;
  text-decoration-thickness: 1px;
  transition: color 160ms ease, text-decoration-color 160ms ease, text-decoration-thickness 160ms ease;
}

a:hover {
  color: var(--accent-text);
  text-decoration-color: var(--accent-text);
  text-decoration-thickness: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: var(--bg); }

.xp-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}

.xp-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  will-change: width;
}

.xp-tag {
  position: fixed;
  top: 5px;
  left: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  background: var(--bg);
  padding: 0 4px;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 180ms ease;
  white-space: nowrap;
}

.xp-tag.is-visible { opacity: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  transition: background-color 220ms ease, border-color 220ms ease;
}

.header-inner {
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand-name { font-size: 1.45rem; letter-spacing: -0.015em; line-height: 1; }
.brand-handle { font-size: 0.78rem; color: var(--muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.version-pill {
  font-size: 0.75rem;
  color: var(--accent-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.version-date { color: var(--muted); }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.05rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0;
}
.nav-links a:hover { color: var(--ink); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.42rem 0.58rem;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.icon-btn:hover {
  border-color: var(--ink);
  color: var(--accent-text);
}

.theme-btn { padding: 0.36rem 0.46rem; }
.theme-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }

.menu-btn { display: none; }

.mobile-menu {
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.mobile-menu-inner {
  padding: 1rem var(--gutter) 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.mobile-version { font-size: 0.75rem; color: var(--accent-text); }
.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.mobile-nav-list a {
  display: block;
  padding: 0.35rem 0;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
}

.page {
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, var(--content-col));
  column-gap: 48px;
  padding: clamp(2.8rem, 6vw, 4.75rem) 0;
  border-bottom: 1px solid var(--rule);
  transition: border-color 220ms ease;
}

.section:last-of-type { border-bottom: none; }

.margin-col {
  padding-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.content-col { min-width: 0; }

.section-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 2rem;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 420ms ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-section { padding-top: clamp(3rem, 7vw, 5.5rem); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 1.65rem;
}
.hero-title em { font-style: italic; }

.hero-sub {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--ink);
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.fact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.fact-row li { display: inline-flex; align-items: center; gap: 0.75rem; }
.fact-row li:not(:last-child)::after { content: "·"; color: var(--rule); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.25rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.78rem 1.15rem;
  border-radius: 3px;
  border: 1px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-text);
  border-color: var(--accent-text);
  color: #F4F1EA;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--accent-text);
  text-decoration: none;
}

.hero-meta-strip {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.meta-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.meta-item-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.12rem;
}
.meta-item-value { color: var(--ink); }

.project {
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}
.project:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.14rem 0.42rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  line-height: 1.3;
}

.chip-live { border-color: var(--accent-text); color: var(--accent-text); }
.chip-beta { border-color: var(--ink); color: var(--ink); }
.chip-wip { color: var(--muted); }

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}

.project-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  line-height: 1.05;
  margin: 0;
}

.project-featured .project-title {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
}

.project-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

.project-oneliner {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  max-width: 60ch;
}

.case-blocks {
  display: grid;
  gap: 1.35rem;
  margin-bottom: 2rem;
}

.case-block-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.pipeline {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.78rem;
}
.pipeline-step { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.pipeline-arrow { color: var(--accent-text); }
.pipeline-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pipeline-target {
  padding: 0.18rem 0.48rem;
  border: 1px solid var(--rule);
  background: var(--bg-subtle);
  font-size: 0.74rem;
}

.device-row {
  display: grid;
  grid-template-columns: 0.85fr 1.25fr 1.65fr;
  gap: 1rem;
  align-items: end;
}

.device-frame {
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 6px;
  background: var(--bg);
}

.device-phone { border-radius: 14px; padding: 10px 6px; }
.device-tablet { border-radius: 10px; padding: 8px; }
.device-laptop { border-radius: 6px 6px 2px 2px; padding: 7px 7px 10px; }

.device-screen {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-phone .device-screen { aspect-ratio: 9 / 19; border-radius: 7px; }
.device-tablet .device-screen { aspect-ratio: 4 / 3; border-radius: 4px; }
.device-laptop .device-screen { aspect-ratio: 16 / 10; border-radius: 2px; }

.device-screen img,
.browser-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frame-caption {
  display: none;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.5rem;
}

.device-screen.is-empty img,
.browser-screen.is-empty img { display: none; }
.device-screen.is-empty .frame-caption,
.browser-screen.is-empty .frame-caption { display: block; }

.browser-frame {
  margin-top: 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.72rem;
  color: var(--muted);
}

.browser-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--muted);
}

.browser-url { margin-left: 0.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.browser-screen {
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-list {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  max-width: 64ch;
}
.detail-list li { margin-bottom: 0.55rem; }
.detail-list li:last-child { margin-bottom: 0; }

.stack-line {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.65rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.85rem;
}

.honest-note {
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 62ch;
}
.honest-note strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-right: 0.45rem;
}

.stat-callout {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0 1.1rem;
  margin-bottom: 1.1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  width: 100%;
}
.stat-num {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1;
  color: var(--accent-text);
  letter-spacing: -0.03em;
}
.stat-label { font-size: 0.84rem; color: var(--muted); }

.lab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.lab-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.96rem;
}
.lab-item strong { font-weight: 500; }

.side-quests {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}
.side-quests-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-right: 0.5rem;
}

.workflow-diagram {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin-bottom: 2.25rem;
  color: var(--ink);
}

.wf-box {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
}
.wf-box-accent { stroke: var(--accent-text); }

.wf-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  transition: stroke-dashoffset 600ms ease;
}

.workflow-diagram.is-drawn .wf-line { stroke-dashoffset: 0; }

.wf-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  fill: currentColor;
}
.wf-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--muted);
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.principle-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.principle-num { font-size: 0.8rem; color: var(--accent-text); }
.principle-text {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.22;
}

.changelog-list { display: grid; gap: 0; }

.cl-entry {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, var(--content-col));
  column-gap: 48px;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.cl-entry:first-child { border-top: none; padding-top: 0; }

.cl-date {
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.35rem;
}

.cl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.cl-ver { font-size: 0.85rem; color: var(--accent-text); font-weight: 500; }
.cl-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 0;
}

.cl-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.cl-bullet {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.96rem;
}

.cl-tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  text-align: center;
  line-height: 1.35;
}
.cl-tag-NEW { color: var(--ink); border-color: var(--ink); }
.cl-tag-IMPROVED { color: var(--accent-text); border-color: var(--accent-text); }

.cl-extra-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms ease;
}
.cl-entry.is-open .cl-extra-wrap { grid-template-rows: 1fr; }
.cl-extra-inner { overflow: hidden; }
.cl-extra-inner .cl-bullets { padding-top: 0.5rem; }

.cl-toggle {
  appearance: none;
  background: none;
  border: none;
  padding: 0.45rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.cl-toggle:hover { color: var(--accent-text); }

.changelog-section { display: block; }
.changelog-section-head {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, var(--content-col));
  column-gap: 48px;
  margin-bottom: 1rem;
}

.issues-intro {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.issue-row {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 156px;
  gap: 0.5rem 1rem;
  align-items: start;
}

.issue-id { font-size: 0.78rem; color: var(--accent-text); padding-top: 0.15rem; }

.issue-title { font-weight: 500; font-size: 1rem; line-height: 1.35; margin-bottom: 0.25rem; }
.issue-fix { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.issue-fix::before { content: "→ "; color: var(--accent-text); }

.issue-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.issue-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: flex-end;
}

.issue-track {
  width: 82px;
  height: 3px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.issue-fill {
  height: 100%;
  background: var(--accent);
}

.issue-pct { font-size: 0.74rem; color: var(--muted); min-width: 2.6ch; text-align: right; }

.triage-note {
  margin-top: 1rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.75rem;
}

.skill-col-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-bottom: 0.6rem;
  margin: 0 0 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.94rem;
}

.beyond-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.beyond-list li { max-width: 62ch; }
.beyond-list strong { font-weight: 500; }

.contact-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.8vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
}

.contact-note { color: var(--muted); margin-bottom: 1.75rem; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
}

.contact-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer {
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
}

.kbd {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.02rem 0.3rem;
  font-size: 0.7rem;
  color: var(--ink);
  margin-right: 0.2rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 250;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.78rem;
  padding: 0.55rem 0.85rem;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-shown { opacity: 1; transform: translateY(0); }

.noscript-bar {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid var(--rule);
  font-size: 0.9rem;
}

.print-only { display: none; }

@media (max-width: 960px) {
  .version-date { display: none; }
}

@media (max-width: 840px) {
  .section,
  .changelog-section-head,
  .cl-entry {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .margin-col { margin-bottom: 0.85rem; padding-top: 0; }
  .cl-date { margin-bottom: 0.2rem; padding-top: 0; }

  .nav-links,
  .version-pill { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (max-width: 680px) {
  .device-row { grid-template-columns: 1fr 1fr; }
  .device-laptop { grid-column: 1 / -1; }
  .skills-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .issue-row { grid-template-columns: 44px minmax(0, 1fr); }
  .issue-status-col {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
  }
  .issue-progress-wrap { width: auto; }
}

@media (max-width: 480px) {
  .meta-item { grid-template-columns: 1fr; gap: 0.15rem; }
  .cl-bullet { grid-template-columns: 1fr; gap: 0.25rem; }
  .cl-tag { width: fit-content; }
  .device-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .wf-line { stroke-dashoffset: 0; }
}

@media print {
  @page {
    size: A4;
    margin: 13mm 15mm;
  }

  html, body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9.6pt;
    line-height: 1.38;
  }

  .no-print,
  .device-row,
  .browser-frame,
  .pipeline,
  .case-blocks,
  .hero-section,
  .side-quests { display: none !important; }

  .print-only { display: block !important; }

  .page { max-width: none; padding: 0; }

  .print-header {
    border-bottom: 1.2pt solid #000;
    padding-bottom: 8pt;
    margin-bottom: 10pt;
  }

  .print-name {
    font-family: "Instrument Serif", Georgia, serif;
    font-size: 21pt;
    line-height: 1.05;
    margin: 0 0 3pt;
  }

  .print-sub {
    font-size: 9.5pt;
    margin: 0 0 5pt;
    color: #222;
  }

  .print-contact-row {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 8.2pt;
    color: #222;
    margin-bottom: 7pt;
  }

  .print-meta-block {
    font-size: 9pt;
    margin-top: 4pt;
  }
  .print-meta-block strong { font-weight: 700; }

  .section {
    display: block !important;
    padding: 7pt 0 !important;
    border-bottom: 0.6pt solid #CCC !important;
  }
  .section:last-of-type { border-bottom: none !important; }

  .margin-col { display: none !important; }

  .section-heading {
    font-size: 12pt !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6pt !important;
    font-family: system-ui, sans-serif;
    font-weight: 700;
  }

  .project {
    margin: 0 0 8pt !important;
    padding: 0 0 6pt !important;
    border-bottom: 0.5pt solid #DDD !important;
    break-inside: avoid;
  }
  .project:last-child { border-bottom: none !important; margin-bottom: 0 !important; }

  .project-meta { font-size: 8pt; color: #333 !important; margin-bottom: 2pt; }
  .project-title { font-size: 11.5pt !important; font-family: system-ui, sans-serif; font-weight: 700; }
  .project-oneliner { font-size: 9.2pt; margin: 2pt 0 4pt; }
  .detail-list { margin: 0 0 3pt; padding-left: 14pt; }
  .detail-list li { margin-bottom: 2pt; }
  .stack-line { border: none; padding: 2pt 0 0; margin: 0; font-size: 8pt; color: #333; }
  .honest-note { display: none; }
  .stat-callout { border: none; padding: 2pt 0; margin: 0 0 2pt; }
  .stat-num { font-size: 10pt; color: #000 !important; font-weight: 700; }
  .stat-label { font-size: 8.8pt; color: #222 !important; }

  .lab-list { border-top: none; }
  .lab-item { padding: 1.5pt 0; border-bottom: none; font-size: 9pt; display: block; }
  .lab-item .chip { display: none; }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10pt !important;
  }
  .skill-col-title { color: #000 !important; border-color: #999; margin-bottom: 3pt; padding-bottom: 2pt; font-size: 8pt; }
  .skill-list { gap: 1.5pt; font-size: 8.8pt; }

  .chip { border-color: #555 !important; color: #000 !important; font-size: 7pt; }

  a { color: #000 !important; text-decoration: none !important; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: ui-monospace, Menlo, monospace;
    font-size: 7.5pt;
    color: #333;
  }
  a.no-print-url::after { content: "" !important; }

  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Post-review fixes */
.device-row[hidden], .browser-frame[hidden] { display: none !important; }
.icon-btn { white-space: nowrap; }
@media (max-width: 600px) {
  .wf-title { font-size: 17px; }
  .wf-sub { font-size: 14px; }
}
