/* ==========================================================================
   johirxofficial — handcrafted portfolio stylesheet
   Direction: field notes from a small-town broadband network
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --font-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --bg: #f6f4ee;
  --surface: #fbfaf6;
  --surface-2: #efebe3;
  --surface-3: #e6e1d7;
  --ink: #17181a;
  --ink-2: #4c504f;
  --ink-3: #656861;
  --line: rgba(23, 24, 26, 0.12);
  --line-2: rgba(23, 24, 26, 0.22);
  --accent: #a04a20;
  --accent-2: #8a3d18;
  --accent-soft: rgba(160, 74, 32, 0.08);
  --ok: #3d6b52;
  --danger: #a33f34;
  --selection: #ecdfd2;
  --shadow: 0 1px 2px rgba(23, 24, 26, 0.04), 0 18px 40px -30px rgba(23, 24, 26, 0.45);

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shell: 1140px;
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --dur: 180ms;
  --slow: 560ms;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #131312;
  --surface: #1a1a18;
  --surface-2: #232320;
  --surface-3: #2c2c28;
  --ink: #f1eee6;
  --ink-2: #b4b1a7;
  --ink-3: #97948b;
  --line: rgba(241, 238, 230, 0.12);
  --line-2: rgba(241, 238, 230, 0.24);
  --accent: #e39a70;
  --accent-2: #f0ae86;
  --accent-soft: rgba(227, 154, 112, 0.1);
  --ok: #7fb395;
  --danger: #e08b7f;
  --selection: #3b2b22;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 20px 44px -30px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

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

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

:target { scroll-margin-top: 92px; }

/* ---------- 3. Layout & type ---------- */
.shell {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  font-weight: 400;
}
.num { font-variant-numeric: tabular-nums; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
  overflow: visible;
}

.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;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 120;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}
.skip:focus { transform: none; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.btn .icon { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-link .icon { width: 15px; height: 15px; }
.btn-link:hover { color: var(--accent); border-color: var(--accent); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.link-arrow .icon { width: 14px; height: 14px; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .icon { width: 17px; height: 17px; }

.dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-3);
  display: inline-block;
}
.dot-live { background: var(--ok); }
.dot-err { background: var(--danger); }

/* ---------- 5. Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar {
    background: color-mix(in srgb, var(--bg) 87%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    backdrop-filter: blur(14px) saturate(1.1);
  }
}
.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: none;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-handle {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  position: relative;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); }
.nav a[aria-current]::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 1px;
  background: var(--accent);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock [data-clock] { color: var(--ink-2); }
.clock-zone { color: var(--ink-3); }
.cmd-trigger { border-color: var(--line); border-radius: var(--r-sm); }
.topbar-cta { height: 34px; padding: 0 13px; font-size: 13px; margin-left: 4px; }
.theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: inline-block; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded='true'] .icon-menu { display: none; }
.menu-toggle[aria-expanded='true'] .icon-close { display: inline-block; }

.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 24px 20px;
}
.mobile-links { display: grid; }
.mobile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}
.mobile-links a:hover { color: var(--ink); }
.mobile-links .mono { font-size: 10.5px; }
.mobile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}
.mobile-foot .clock { margin: 0; }

/* ---------- 6. Hero ---------- */
.hero { padding: clamp(40px, 6vw, 76px) 0 clamp(40px, 5vw, 64px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.84fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    'copy photo'
    'route photo';
  column-gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.hero-copy { grid-area: copy; max-width: 640px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(56px, 7.2vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.026em;
  margin-bottom: 24px;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  color: var(--accent);
}
.lede {
  max-width: 47ch;
  font-size: clamp(16.5px, 1.4vw, 18px);
  line-height: 1.62;
  color: var(--ink-2);
}
.lede strong { color: var(--ink); font-weight: 600; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 28px;
}
.hero-latest {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.hero-latest a {
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero-latest a:hover { color: var(--accent); border-color: var(--accent); }
.hero-latest .sep { opacity: 0.5; }

.hero-photo {
  grid-area: photo;
  justify-self: end;
  align-self: start;
  width: 100%;
  max-width: 424px;
  margin-top: 6px;
}
.photo-mat {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.photo-mat > img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.photo-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.route-wrap {
  grid-area: route;
  align-self: end;
  margin-top: clamp(32px, 4vw, 46px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.route-wrap figcaption {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.route::before {
  content: '';
  position: absolute;
  left: 5px;
  right: calc(25% - 5px);
  top: 4.5px;
  height: 1px;
  background: var(--line-2);
}
.route li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 8px;
}
.route .node {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  background: var(--bg);
}
.route li.is-live .node {
  background: var(--accent);
  border-color: var(--accent);
}
.route-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.3;
}
.route li.is-live .route-name { color: var(--ink); }
.route-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.4;
}

/* ---------- 7. Stats band ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 26px 0 24px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-label {
  order: -1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-note {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.3;
}

/* ---------- 8. Sections ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.kicker b {
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
}
h2 em { font-style: italic; color: var(--accent); }
.section-dek {
  margin-top: 14px;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---------- 9. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.about-copy > p {
  max-width: 60ch;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.68;
  color: var(--ink-2);
}
.about-copy .lead {
  margin-bottom: 22px;
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.about-copy .lead em { font-style: italic; color: var(--accent); }
.principles { margin-top: 30px; border-top: 1px solid var(--line); }
.principle {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.principle-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.principle h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.principle p { margin-top: 3px; max-width: 52ch; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

.practice { margin-top: 34px; }
.practice-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.practice h4 {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.practice li {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.facts { padding: 24px; }
.panel-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--ink-3);
}
.facts dl { display: grid; }
.facts-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.facts-row:last-child { border-bottom: 0; }
.facts-row dt { flex: none; color: var(--ink-3); }
.facts-row dd {
  min-width: 0;
  text-align: right;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.facts-row a:hover { color: var(--accent); }
.facts-row .mono { font-size: 11px; color: var(--ink); }
.facts-foot {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.facts-foot .label {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.facts-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.facts-foot a:hover { color: var(--accent); }
.facts-foot .icon { width: 13px; height: 13px; color: var(--ink-3); }

/* ---------- 10. Work / GitHub projects ---------- */
.section-head-split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head-split .section-dek { max-width: 62ch; }
.repo-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  white-space: nowrap;
}
.repo-status .dot { transition: background-color var(--dur) var(--ease); }
.refresh-btn {
  width: 30px;
  height: 30px;
  margin-left: 2px;
  border-color: var(--line);
  border-radius: var(--r-sm);
}
.refresh-btn:hover { border-color: var(--line-2); }
.refresh-btn:disabled { opacity: 0.55; cursor: default; }
.refresh-btn.is-syncing .icon { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 22px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 11px 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed='true'] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.work-count {
  flex: none;
  padding-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: clamp(24px, 3vw, 36px);
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.featured-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.featured h3 {
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.featured h3 a { transition: color var(--dur) var(--ease); }
.featured h3 a:hover { color: var(--accent); }
.featured h3 .icon { width: 18px; height: 18px; color: var(--ink-3); margin-left: 4px; }
.featured-desc {
  margin-top: 10px;
  max-width: 58ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chip {
  padding: 3px 7px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.featured-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
  align-self: start;
}
.featured-stats > div {
  min-width: 0;
  padding: 13px 15px;
  background: var(--surface);
}
.featured-stats .label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.featured-stats .label .icon { width: 11px; height: 11px; }
.featured-stats strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.repo-list { border-top: 1px solid var(--line); }
.repo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 2px;
  transition: background-color var(--dur) var(--ease);
}
.repo-row:hover { background: var(--surface); }
.repo-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.lang-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--lang, var(--ink-3));
}
[data-theme='dark'] .lang-dot { filter: brightness(1.3); }
.repo-name {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.repo-desc {
  margin: 4px 0 0 16px;
  max-width: 74ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.repo-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.repo-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 30px;
  justify-content: flex-end;
}
.repo-stars .icon { width: 12px; height: 12px; }
.repo-arrow { display: inline-flex; color: var(--ink-3); transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.repo-arrow .icon { width: 15px; height: 15px; }
.repo-row:hover .repo-arrow { color: var(--accent); transform: translate(2px, -2px); }
.repo-empty {
  padding: 28px 8px;
  font-size: 14px;
  color: var(--ink-3);
}
.work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
}
.work-note {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
html:not(.js) .js-only,
html:not(.js) .work-note,
html:not(.js) .refresh-btn,
html:not(.js) .copy-btn,
html:not(.js) .cmd-trigger,
html:not(.js) .theme-toggle,
html:not(.js) .menu-toggle { display: none; }

/* skeleton — static, no shimmer */
.sk {
  height: 9px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
}
.repo-row.is-skeleton { pointer-events: none; }
.repo-row.is-skeleton .repo-title { display: none; }
.sk-title { width: 26%; height: 12px; }
.sk-desc { width: min(58%, 420px); margin: 8px 0 0 16px; }
.sk-meta { width: 140px; height: 10px; }
.repo-error {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.repo-error > .icon { width: 18px; height: 18px; color: var(--danger); margin-top: 2px; }
.repo-error strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.repo-error p { margin-top: 3px; font-size: 13px; }
.repo-error .btn { margin-left: auto; }
.noscript-note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--ink-2);
}
.noscript-note a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 11. Journey ---------- */
.journey-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--line-2);
}
.timeline li {
  position: relative;
  padding-bottom: 34px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .t-dot {
  position: absolute;
  left: -33.5px;
  top: 4px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  background: var(--bg);
}
.timeline li.is-now .t-dot {
  border-color: var(--accent);
  background: var(--accent);
}
.t-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.timeline h3 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.t-org {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.t-body p {
  margin-top: 8px;
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}
.t-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.t-tags li { display: inline-flex; align-items: center; gap: 14px; padding-bottom: 0; }
.t-tags li::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.7;
}

.journey-side { display: grid; gap: 24px; }
.journey-side .photo-mat { padding: 8px; border-radius: var(--r-md); }
.journey-side .photo-mat > img {
  aspect-ratio: 3 / 4;
  border-radius: 5px;
}
.journey-side .photo-caption { padding-top: 8px; }
.note-quote {
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--accent);
}
.note-quote p {
  font-family: var(--font-serif);
  font-size: 21px;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.note-quote cite {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

/* ---------- 12. Local photos ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.photo { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.photo-frame {
  height: clamp(300px, 32vw, 418px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.photo figcaption .photo-place { color: var(--ink-2); }

/* ---------- 13. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5.6vw, 66px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.028em;
  max-width: 13ch;
}
.contact-title em { font-style: italic; color: var(--accent); }
.contact-dek {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.contact-card { padding: 6px 24px; }
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.contact-val {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}
.contact-val a { transition: color var(--dur) var(--ease); }
.contact-val a:hover { color: var(--accent); }
.contact-val .mono { font-size: 10.5px; color: var(--ink-3); }
.copy-btn {
  width: 26px;
  height: 26px;
  border-color: transparent;
}
.copy-btn .icon { width: 13px; height: 13px; }
.contact-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ---------- 14. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 52px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  gap: 32px;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.footer-role {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.footer-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.footer-domains a { transition: color var(--dur) var(--ease); }
.footer-domains a:hover { color: var(--accent); }
.footer-domains .sep { opacity: 0.6; }
.footer h3 {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.footer-col a {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 0;
  font-size: 13px;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--accent); }
.footer-col a .icon { width: 11px; height: 11px; opacity: 0.55; }
.footer-local-time {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.footer-local-date {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-3);
}
.footer-bottom p { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.footer-bottom .sep { opacity: 0.55; }
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease);
}
.to-top:hover { color: var(--accent); }
.to-top .icon { width: 12px; height: 12px; }

/* ---------- 15. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.toast .icon { width: 14px; height: 14px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 16. Command palette ---------- */
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 12vh, 120px) 16px 16px;
  background: rgba(24, 22, 19, 0.38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
[data-theme='dark'] .cmd-overlay { background: rgba(0, 0, 0, 0.62); }
.cmd {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.55);
  animation: cmd-in 170ms var(--ease);
}
@keyframes cmd-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}
.cmd-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.cmd-search > .icon { width: 16px; height: 16px; color: var(--ink-3); }
.cmd-search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
}
.cmd-search input::placeholder { color: var(--ink-3); }
kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  line-height: 1.5;
}
.cmd-body {
  max-height: min(420px, 52vh);
  overflow-y: auto;
  padding: 6px;
}
.cmd-group {
  padding: 9px 9px 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.cmd-item .icon { width: 15px; height: 15px; color: var(--ink-3); }
.cmd-item .hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.cmd-item[aria-selected='true'] {
  background: var(--surface-2);
  color: var(--ink);
}
.cmd-item[aria-selected='true'] .icon { color: var(--accent); }
.cmd-empty { padding: 18px 10px; font-size: 13px; color: var(--ink-3); }
.cmd-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
}

/* ---------- 17. Motion & reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1080px) {
  .clock { display: none; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-local { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; }
  .footer-local h4 { margin: 0; }
  .footer-local-date { margin: 0; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: 'copy' 'photo' 'route';
    column-gap: 0;
  }
  .hero-copy { max-width: 640px; }
  .hero-photo {
    justify-self: start;
    max-width: 420px;
    margin-top: 32px;
  }
  .route-wrap { margin-top: 36px; }
  .about-grid,
  .journey-grid,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .facts { max-width: 560px; }
  .journey-side { max-width: 520px; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo:first-child { grid-column: 1 / -1; }
  .photo-frame { height: clamp(280px, 48vw, 400px); }
  .photo:first-child .photo-frame { height: clamp(320px, 60vw, 440px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-local { grid-column: auto; display: block; }
  .footer-local h4 { margin-bottom: 8px; }
  .repo-desc { max-width: none; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 40px, var(--shell)); }
  .brand-handle { display: none; }
  .topbar-cta { display: none; }
  .hero { padding-top: 32px; }
  h1 { font-size: clamp(52px, 13vw, 68px); }
  .hero-actions { gap: 12px 20px; }
  .stats-inner { grid-template-columns: 1fr 1fr; padding: 0; }
  .stat {
    padding: 18px 16px 16px;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat-value { font-size: 32px; }
  .section { padding: 56px 0; }
  .section-head-split { align-items: flex-start; }
  .repo-status { padding-bottom: 0; }
  .featured { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .featured-stats { max-width: 360px; }
  .repo-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 15px 4px; }
  .repo-meta { gap: 14px; padding-left: 16px; }
  .repo-desc { margin-left: 16px; -webkit-line-clamp: unset; display: block; overflow: visible; }
  .about-copy .lead { font-size: 23px; }
  .practice-grid { grid-template-columns: 1fr; gap: 14px; }
  .practice li { display: inline; }
  .practice li::after { content: ' · '; color: var(--ink-3); }
  .practice li:last-child::after { content: ''; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo:first-child { grid-column: auto; }
  .photo-frame,
  .photo:first-child .photo-frame { height: clamp(280px, 78vw, 380px); }
  .contact-card { padding: 4px 18px; }
  .contact-title { font-size: clamp(38px, 10vw, 52px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .toast { width: max-content; max-width: calc(100% - 32px); }
}

@media (max-width: 480px) {
  .topbar-inner { gap: 12px; }
  .brand-name { font-size: 20px; }
  .cmd-foot { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero-actions .btn-link { width: auto; }
  .route { gap: 4px; }
  .route-name { font-size: 11.5px; }
  .route-sub { font-size: 9px; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-label { font-size: 9px; }
  .work-count { display: none; }
  .tabs { gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

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


