:root {
  --bg: #FAF9F5;
  --surface: #FFFFFF;
  --surface-2: #F1EFE6;
  --text-primary: #1C1C1A;
  --text-secondary: #55534C;
  --text-muted: #8B8879;
  --border: #E3E0D3;
  --border-strong: #CBC7B4;
  --accent: #2C4A5E;
  --accent-dark: #16262F;
  --accent-light: #E7ECEE;
  --highlight: #EFE9DA;
  --highlight-text: #4A3F28;
  --radius: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171715;
    --surface: #1F1F1C;
    --surface-2: #262622;
    --text-primary: #F2F0E7;
    --text-secondary: #B8B5A6;
    --text-muted: #85826F;
    --border: #38372F;
    --border-strong: #4B4A3F;
    --accent: #7FA0B4;
    --accent-dark: #C4D8E2;
    --accent-light: #232B2F;
    --highlight: #2B2619;
    --highlight-text: #E4D9B8;
  }
}

/* Explicit theme overrides set by the nav toggle — take precedence over
   prefers-color-scheme regardless of source order (attribute selector
   specificity beats a plain :root rule). */
html[data-theme="light"] {
  --bg: #FAF9F5;
  --surface: #FFFFFF;
  --surface-2: #F1EFE6;
  --text-primary: #1C1C1A;
  --text-secondary: #55534C;
  --text-muted: #8B8879;
  --border: #E3E0D3;
  --border-strong: #CBC7B4;
  --accent: #2C4A5E;
  --accent-dark: #16262F;
  --accent-light: #E7ECEE;
  --highlight: #EFE9DA;
  --highlight-text: #4A3F28;
}
html[data-theme="dark"] {
  --bg: #171715;
  --surface: #1F1F1C;
  --surface-2: #262622;
  --text-primary: #F2F0E7;
  --text-secondary: #B8B5A6;
  --text-muted: #85826F;
  --border: #38372F;
  --border-strong: #4B4A3F;
  --accent: #7FA0B4;
  --accent-dark: #C4D8E2;
  --accent-light: #232B2F;
  --highlight: #2B2619;
  --highlight-text: #E4D9B8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 500; margin: 0; color: var(--text-primary); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-nav .brand { font-family: var(--font-serif); font-weight: 400; font-size: 16px; white-space: nowrap; letter-spacing: 0.01em; color: var(--text-primary); }
.site-nav .links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav .links a { font-size: 13.5px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.site-nav .links a:hover { color: var(--accent); text-decoration: none; }
.site-nav .nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.site-nav .cta {
  font-size: 13.5px;
  padding: 7px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.site-nav .cta:hover { background: var(--accent); color: var(--surface); text-decoration: none; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { display: none; }
.theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  .theme-toggle .icon-sun { display: inline; }
  .theme-toggle .icon-moon { display: none; }
}
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

main { max-width: 800px; margin: 0 auto; padding: 0 32px 80px; }

/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--border);
}
.hero .avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}
.hero .hero-text { min-width: 0; }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 38px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.hero .role { font-size: 16.5px; color: var(--accent); font-weight: 500; margin-bottom: 12px; }
.hero .location { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; }
.hero .tagline { font-size: 17px; color: var(--text-secondary); max-width: 560px; margin-bottom: 22px; font-family: var(--font-serif); line-height: 1.5; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .actions a { font-size: 13.5px; font-weight: 500; padding: 10px 20px; border-radius: var(--radius); }
.hero .actions .primary { background: var(--accent); color: #fff; }
.hero .actions .primary:hover { background: var(--accent-dark); text-decoration: none; }
.hero .actions .secondary { border: 1px solid var(--border-strong); color: var(--text-primary); }
.hero .actions .secondary:hover { background: var(--surface-2); text-decoration: none; }

@media (max-width: 560px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 20px; text-align: left; }
  .hero .avatar { width: 108px; height: 108px; }
  .hero h1 { font-size: 30px; }
}

section { padding: 30px 0 18px; }
#jm-page .jm-rule { border: 0; border-top: 1px solid var(--border); margin: 0; }
#jm-page .jm-epigraph { margin: var(--space-8) 0; padding: 0 calc(var(--space-8) * 3); }
section > h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  margin-bottom: 26px;
}
section > .lede { font-size: 16px; color: var(--text-secondary); margin: -10px 0 26px; max-width: 640px; }

/* Metric grid */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric { background: var(--surface-2); border-radius: var(--radius); padding: 18px; }
.metric .num { font-family: var(--font-serif); font-size: 24px; font-weight: 400; color: var(--accent); }
.metric .label { font-size: 12.5px; color: var(--text-secondary); margin-top: 5px; line-height: 1.4; }
@media (max-width: 640px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

/* Timeline (used for both Experience and Projects): line/dot sit flush
   with the page's left edge, matching headings and other paragraphs;
   dates hang in the margin to the left of the line. */
.job {
  position: relative;
  margin-bottom: 38px;
}
.job:last-child { margin-bottom: 0; }
.job-dates {
  position: absolute;
  top: 2px;
  right: calc(100% + 14px);
  width: 78px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.4;
}
.job-content { position: relative; padding-left: 26px; border-left: 1px solid var(--border); }
.job-content::before {
  content: ""; position: absolute; left: -4.5px; top: 5px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.job-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.job-title { font-size: 16px; font-weight: 500; }
.job-company { font-size: 14px; color: var(--accent); margin-bottom: 12px; }
.job ul { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 14.5px; }
.job li { margin-bottom: 7px; }
.job-content p { margin: 0 0 4px; color: var(--text-secondary); font-size: 14.5px; }
.job .stack { margin-top: 12px; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.01em; }
.job .more-link { margin-top: 10px; }
.job-content code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 900px) {
  .job-dates { position: static; text-align: left; width: auto; margin-bottom: 4px; display: block; }
}

.earlier-roles { font-size: 14px; color: var(--text-secondary); }
.earlier-roles .role-line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.earlier-roles .role-line:last-child { border-bottom: none; }
.earlier-roles .role-line .rn { color: var(--text-primary); }
.earlier-roles .role-line .rd { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; font-family: var(--font-mono); }

/* Projects subpage (/projects/) — same date-rail/line/dot timeline as
   Experience, plus a card box (20% opacity fill) around each project's
   content. Dot is vertically centered on the title's line box (padding-top
   16px + half the title's ~26.4px line height, minus half the dot's
   height); the date rail is centered on that same fixed point via
   translateY, so it stays aligned regardless of whether the date wraps
   to 1 or 2 lines. */
.projects { display: block; }
.project-item .job-content {
  background-color: color-mix(in srgb, var(--surface-2) 20%, transparent);
  border-left: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px 16px 30px;
}
.project-item .job-content::before { top: 25px; }
.project-item .job-company { margin-bottom: 8px; }
.project-item .job-dates { top: 29px; transform: translateY(-50%); }
@media (max-width: 900px) {
  .project-item .job-dates { transform: none; }
}

/* Homepage "Selected projects" teaser — free-form, no card box.
   Each .project is title + paragraph + tech-stack line. Rhythm alone
   has to signal where one project ends and the next begins, so the
   internal gaps (title→paragraph, paragraph→stack) are kept tight and
   uniform, while the gap between one project's stack line and the next
   project's title is deliberately much larger. */
.project { margin-bottom: 34px; }
.project:last-child { margin-bottom: 0; }
.project h3 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.project p { font-size: 14px; color: var(--text-secondary); margin: 0 0 6px; }
.project .stack { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); margin: 0; }

/* Skills */
.skill-group { margin-bottom: 22px; }
.skill-group h3 { font-size: 12.5px; color: var(--text-muted); font-weight: 500; margin-bottom: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 6px 13px; border-radius: 999px; background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--border); }

.edu-item .job-title { margin-bottom: 2px; }

/* Testimonials */
.testimonial { background: var(--highlight); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 14px; }
.testimonial p { font-family: var(--font-serif); font-size: 15.5px; color: var(--highlight-text); margin: 0 0 12px; line-height: 1.55; }
.testimonial cite { font-size: 12.5px; color: var(--highlight-text); font-style: normal; opacity: 0.75; }

/* Contact / footer */
.contact-block { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.contact-block a {
  font-size: 14px; font-weight: 500; padding: 11px 22px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); color: var(--text-primary);
}
.contact-block a:hover { background: var(--surface-2); text-decoration: none; }

.site-footer { text-align: center; padding: 30px 32px; font-size: 12.5px; color: var(--text-muted); }

/* Subpages */
.back-link { display: inline-block; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.back-link:hover { color: var(--accent); }
.subpage-header { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.subpage-header h1 { font-family: var(--font-serif); font-weight: 400; font-size: 32px; margin-bottom: 10px; }
.subpage-header .lede { font-size: 16px; color: var(--text-secondary); max-width: 620px; margin: 0; }

.more-link { display: inline-block; font-size: 13.5px; font-weight: 500; }
.more-link::after { content: " \2192"; }

.leadership-group { margin-bottom: 32px; }
.leadership-group h3 { font-family: var(--font-serif); font-weight: 400; font-size: 17px; margin-bottom: 12px; }
.leadership-group ul { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 14.5px; }
.leadership-group li { margin-bottom: 8px; }

@media (max-width: 640px) {
  .site-nav { flex-wrap: wrap; padding: 12px 20px; }
  .site-nav .links { gap: 14px; order: 3; width: 100%; }
  main { padding: 0 20px 60px; }
}

@media print {
  #jm-page .jm-nav, #jm-page .jm-rail { display: none; }

  .site-nav, .hero .actions, .contact-block, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  section { padding: 14px 0 8px; }
  #jm-page .jm-rule { display: none; }
  #jm-page .jm-epigraph { margin: 12px 0; }
  .job { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}

/* ============================================================================
   "Industry" design system — homepage redesign, scoped to #jm-page.
   Source: Claude Design handoff (Online CV.dc.html). Tokens and component
   classes below are namespaced under #jm-page so they cannot affect
   /experience/, /projects/, /skills/, which still use the original tokens
   defined at the top of this file.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&display=swap');

#jm-page {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-accent-2: #728fab;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  --color-neutral-100: #f5f5f8;
  --color-neutral-200: #e7e7ea;
  --color-neutral-300: #d4d4d7;
  --color-neutral-400: #b7b7ba;
  --color-neutral-500: #98989b;
  --color-neutral-600: #7a7a7d;
  --color-neutral-700: #5d5d60;
  --color-neutral-800: #424244;
  --color-neutral-900: #2b2b2d;

  --color-accent-100: #eef6ff;
  --color-accent-200: #d6ebff;
  --color-accent-300: #b5d9fd;
  --color-accent-400: #94bce3;
  --color-accent-500: #749dc4;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  /* No --space-5 by design — the Industry scale skips it. */
  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --space-6: 20.4px;
  --space-8: 27.2px;

  --radius-md: 4px;

  --shadow-lg: 0 12px 32px color-mix(in srgb, #2b2b2d 22%, transparent);

  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

/* Dark-mode ramp, authored for this site — the source design system only
   shipped a light theme. Same roles, remapped for a dark ground. Follows
   this file's existing pattern: an automatic prefers-color-scheme default
   plus an explicit html[data-theme] override for the manual toggle. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) #jm-page {
    --color-bg: #17181a;
    --color-surface: #1f2123;
    --color-text: #eceeef;
    --color-accent: #7fa0be;
    --color-accent-2: #8fa8bd;
    --color-divider: color-mix(in srgb, #eceeef 16%, transparent);
    --color-neutral-100: #202224;
    --color-neutral-200: #292b2e;
    --color-neutral-300: #35383b;
    --color-neutral-400: #4a4d51;
    --color-neutral-500: #63666a;
    --color-neutral-600: #85888c;
    --color-neutral-700: #a6a9ac;
    --color-neutral-800: #cfd1d3;
    --color-neutral-900: #f0f1f2;
    --color-accent-100: #16232d;
    --color-accent-200: #1c2d3a;
    --color-accent-300: #2b4256;
    --color-accent-400: #3c5b73;
    --color-accent-500: #547b96;
    --color-accent-600: #6f97b0;
    --color-accent-700: #93b3c8;
    --color-accent-800: #b9d0dd;
    --color-accent-900: #e3edf3;
  }
}
html[data-theme="dark"] #jm-page {
  --color-bg: #17181a;
  --color-surface: #1f2123;
  --color-text: #eceeef;
  --color-accent: #7fa0be;
  --color-accent-2: #8fa8bd;
  --color-divider: color-mix(in srgb, #eceeef 16%, transparent);
  --color-neutral-100: #202224;
  --color-neutral-200: #292b2e;
  --color-neutral-300: #35383b;
  --color-neutral-400: #4a4d51;
  --color-neutral-500: #63666a;
  --color-neutral-600: #85888c;
  --color-neutral-700: #a6a9ac;
  --color-neutral-800: #cfd1d3;
  --color-neutral-900: #f0f1f2;
  --color-accent-100: #16232d;
  --color-accent-200: #1c2d3a;
  --color-accent-300: #2b4256;
  --color-accent-400: #3c5b73;
  --color-accent-500: #547b96;
  --color-accent-600: #6f97b0;
  --color-accent-700: #93b3c8;
  --color-accent-800: #b9d0dd;
  --color-accent-900: #e3edf3;
}
html[data-theme="light"] #jm-page {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-accent-2: #728fab;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);
  --color-neutral-100: #f5f5f8;
  --color-neutral-200: #e7e7ea;
  --color-neutral-300: #d4d4d7;
  --color-neutral-400: #b7b7ba;
  --color-neutral-500: #98989b;
  --color-neutral-600: #7a7a7d;
  --color-neutral-700: #5d5d60;
  --color-neutral-800: #424244;
  --color-neutral-900: #2b2b2d;
  --color-accent-100: #eef6ff;
  --color-accent-200: #d6ebff;
  --color-accent-300: #b5d9fd;
  --color-accent-400: #94bce3;
  --color-accent-500: #749dc4;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;
}

#jm-page * { box-sizing: border-box; }
#jm-page h1, #jm-page h2, #jm-page h3, #jm-page h4, #jm-page h5, #jm-page h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0;
}
#jm-page p { margin: 0; }
#jm-page a { color: var(--color-accent); text-decoration: none; text-underline-offset: 3px; }
#jm-page a:hover { color: var(--color-accent-900); }
html[data-theme="dark"] #jm-page a:hover { color: var(--color-accent-900); }
#jm-page img { display: block; max-width: 100%; }
#jm-page figure { margin: 0; }
#jm-page ul { margin: 0; }
#jm-page :focus { outline: none; }
#jm-page :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
#jm-page ::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
#jm-page kbd { font-family: ui-monospace, monospace; }

/* — blueprint frame: corner registration marks — */
#jm-page .blueprint { position: relative; border: 1px solid var(--color-divider); border-radius: 0; }
#jm-page .blueprint > .corner { position: absolute; width: 11px; height: 11px; color: color-mix(in srgb, var(--color-text) 55%, transparent); }
#jm-page .blueprint > .corner::before, #jm-page .blueprint > .corner::after { content: ""; position: absolute; background: currentColor; }
#jm-page .blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
#jm-page .blueprint > .corner::after { top: 5px; left: 0; width: 100%; height: 1px; }
#jm-page .blueprint > .corner.tl { top: -6px; left: -6px; }
#jm-page .blueprint > .corner.tr { top: -6px; right: -6px; }
#jm-page .blueprint > .corner.bl { bottom: -6px; left: -6px; }
#jm-page .blueprint > .corner.br { bottom: -6px; right: -6px; }

/* — buttons — */
#jm-page .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid var(--color-divider);
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 0;
}
#jm-page .btn:disabled { opacity: 0.45; cursor: not-allowed; }
#jm-page .btn-primary { background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }
#jm-page .btn-primary:hover { background: var(--color-accent-600); }
#jm-page .btn-primary:active { background: var(--color-accent-700); }
#jm-page .btn-secondary { border-color: var(--color-divider); }
#jm-page .btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
#jm-page .btn-ghost { color: var(--color-accent); border-color: transparent; padding-inline: var(--space-1); }
#jm-page .btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
#jm-page .btn-block { width: 100%; margin-top: var(--space-2); }
/* Scoped reset so it never strips the .btn treatment above. */
#jm-page button.jm-hit:not(.btn) { background: none; border: 0; text-align: left; font: inherit; color: inherit; padding: 0; }

/* — cards & tags — */
#jm-page .card { background: transparent; border: 1px solid var(--color-divider); border-radius: 0; }
#jm-page .card-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }
#jm-page .tag { display: inline-flex; align-items: center; font-size: 11px; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 0; cursor: pointer; }
#jm-page .tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
#jm-page .tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
#jm-page .tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — hit targets & hover affordances — */
#jm-page .jm-hit { cursor: pointer; }
#jm-page .jm-hit:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
#jm-page .jm-row:hover { background: var(--color-accent-100); }
#jm-page .jm-card:hover { border-color: var(--color-accent-700); }
#jm-page .jm-more { opacity: 0; transition: opacity .18s; }
#jm-page .jm-card:hover .jm-more, #jm-page .jm-row:hover .jm-more, #jm-page .jm-hit:focus-visible .jm-more { opacity: 1; }
#jm-page button { min-height: 44px; }
#jm-page button.jm-more-inline { min-height: 0; }

/* — sticky nav — */
#jm-page .jm-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--color-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-neutral-300); }
#jm-page .jm-nav-inner { max-width: 1480px; margin: 0 auto; padding: 0 var(--space-6); height: 58px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
#jm-page .jm-nav-links { display: flex; gap: var(--space-4); align-items: center; }
#jm-page .jm-nav-links a[data-spy] { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; padding: 4px 0; border-bottom: 2px solid transparent; color: var(--color-text); }
#jm-page .jm-brand { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 600; color: var(--color-text); }

/* — stage / rail / responsive — */
#jm-page .jm-stage { display: flex; justify-content: center; align-items: flex-start; gap: var(--space-8); margin: 0 auto; padding: var(--space-8) var(--space-6); }
@media (max-width: 1180px) { #jm-page .jm-stage { gap: 0; } }
@media (max-width: 900px) { #jm-page .jm-stage { padding: var(--space-6) var(--space-4); } }
#jm-page .jm-col { flex: 0 1 760px; min-width: 0; }
#jm-page .jm-rail { position: sticky; top: 82px; flex: 0 1 0px; min-width: 0; overflow: hidden; opacity: 0; max-height: calc(100vh - 110px); transition: flex-grow .38s cubic-bezier(.2,.7,.3,1), opacity .28s; }
#jm-page.panel-open .jm-rail { flex-grow: 1; opacity: 1; }
main:has(#jm-page.panel-open) { max-width: none; transition: max-width .38s cubic-bezier(.2,.7,.3,1); }
#jm-page .jm-rail-inner { position: relative; border: 1px solid var(--color-accent-700); background: var(--color-neutral-100); padding: var(--space-4); width: 100%; max-height: calc(100vh - 110px); overflow-y: auto; overflow-x: hidden; box-sizing: border-box; scrollbar-width: none; }
#jm-page .jm-rail-inner::-webkit-scrollbar { display: none; }

/* — timeline: date | title / company / content, repeated per entry — */
#jm-page .tl {
  --tl-date-col: 118px;
  --tl-rule-col: 13px;
  --tl-gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#jm-page .tl-entry {
  display: grid;
  grid-template-columns: var(--tl-date-col) var(--tl-rule-col) 1fr;
  padding-bottom: var(--space-4);
}
#jm-page .tl-date {
  font-family: var(--font-heading);
  font-size: 12.5px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--color-neutral-700);
  text-align: right;
  padding: 3px 12px 0 0;
  white-space: nowrap;
}
#jm-page .tl-rule { position: relative; display: flex; justify-content: center; }
#jm-page .tl-line { position: absolute; top: 0; bottom: calc(var(--space-4) * -1); width: 1px; background: var(--color-neutral-400); }
#jm-page .tl-node { position: relative; margin-top: 6px; width: 7px; height: 7px; background: var(--color-accent); transform: rotate(45deg); }
#jm-page .tl-entry:last-child .tl-line { bottom: auto; height: 14px; }
#jm-page .tl-body { padding-left: var(--tl-gap); min-width: 0; }
#jm-page .tl-title { font-family: var(--font-heading); font-size: 17.5px; line-height: 1.2; color: var(--color-text); margin-bottom: 2px; }
#jm-page .tl-org { font-size: 13px; line-height: 1.3; color: var(--color-accent-700); margin-bottom: 7px; }
#jm-page .tl-desc { font-size: 14px; line-height: 1.55; color: var(--color-neutral-700); margin: 0; overflow-wrap: anywhere; text-wrap: pretty; }
@media (max-width: 520px) {
  #jm-page .tl-entry { grid-template-columns: var(--tl-rule-col) 1fr; column-gap: 0; }
  #jm-page .tl-date { grid-column: 2; grid-row: 1; text-align: left; padding: 0 0 3px var(--tl-gap); }
  #jm-page .tl-rule { grid-column: 1; grid-row: 1 / span 2; }
  #jm-page .tl-body { grid-column: 2; grid-row: 2; }
  #jm-page .tl-node { margin-top: 3px; }
}
