/* Shared stylesheet — Johnathan Dempsey resume site.
   Single source of truth for all pages; page-specific rules live in each page's own <style> block (rare). */

    /* Art direction: Cybersecurity executive profile
       Palette: warm neutrals, teal accent — operational, calm, deliberate
       Typography: Iowan / Charter (display serif) + system-ui (body) — system-only
       Density: spacious, editorial */

    :root, [data-theme="light"] {
      --color-bg:             #f7f6f2;
      --color-surface:        #f9f8f5;
      --color-surface-2:      #fbfbf9;
      --color-surface-offset: #f3f0ec;
      --color-surface-offset-2: #edeae5;
      --color-surface-dynamic: #e6e4df;
      --color-divider:        #dcd9d5;
      --color-border:         #d4d1ca;
      --color-text:           #28251d;
      --color-text-muted:     #6f6e69;
      --color-text-faint:     #b0afaa;
      --color-text-inverse:   #f9f8f4;
      --color-primary:        #01696f;
      --color-primary-hover:  #0c4e54;
      --color-primary-active: #0f3638;
      --color-primary-highlight: #cedcd8;
      --color-accent-warn:    #b35c1e;
      --radius-sm: 0.375rem;
      --radius-md: 0.5rem;
      --radius-lg: 0.75rem;
      --radius-xl: 1rem;
      --radius-full: 9999px;
      --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
      --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
      --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
      --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
      --content-narrow: 640px;
      --content-default: 1040px;
      --content-wide: 1200px;
      --font-display: 'Iowan Old Style', 'Charter', 'Palatino Linotype', 'Palatino', 'Georgia', serif;
      --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
      --font-mono: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', 'Cascadia Mono', 'Consolas', monospace;
      --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
      --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
      --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
      --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
      --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
      --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
      --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
      --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
      --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
      --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
      --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;
    }

    [data-theme="dark"] {
      --color-bg:             #161514;
      --color-surface:        #1c1b19;
      --color-surface-2:      #201f1d;
      --color-surface-offset: #1d1c1a;
      --color-surface-offset-2: #22211f;
      --color-surface-dynamic: #2d2c2a;
      --color-divider:        #2a2927;
      --color-border:         #393836;
      --color-text:           #d6d4d0;
      --color-text-muted:     #8a8884;
      --color-text-faint:     #5a5957;
      --color-text-inverse:   #18171a;
      --color-primary:        #5fb4bd;
      --color-primary-hover:  #7ec6cf;
      --color-primary-active: #2f9aa6;
      --color-primary-highlight: #1f3034;
      --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
      --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
      --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme]) {
        --color-bg: #161514; --color-surface: #1c1b19; --color-surface-2: #201f1d;
        --color-surface-offset: #1d1c1a; --color-surface-offset-2: #22211f;
        --color-surface-dynamic: #2d2c2a; --color-divider: #2a2927;
        --color-border: #393836; --color-text: #d6d4d0;
        --color-text-muted: #8a8884; --color-text-faint: #5a5957;
        --color-text-inverse: #18171a; --color-primary: #5fb4bd;
        --color-primary-hover: #7ec6cf; --color-primary-active: #2f9aa6;
        --color-primary-highlight: #1f3034;
        --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
        --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
        --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
      }
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html {
      -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility; scroll-behavior: smooth;
      scroll-padding-top: 80px;
    }
    body {
      min-height: 100dvh; line-height: 1.6; font-family: var(--font-body);
      font-size: var(--text-base); color: var(--color-text); background-color: var(--color-bg);
      font-feature-settings: "kern", "liga", "calt";
    }
    img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
    h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; font-weight: 600; }
    p { text-wrap: pretty; max-width: 72ch; }
    ::selection { background: oklch(from var(--color-primary) l c h / 0.2); color: var(--color-text); }
    :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important; scroll-behavior: auto !important;
      }
    }
    button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
    a, button, [role="button"] {
      transition: color var(--transition-interactive), background var(--transition-interactive),
                  border-color var(--transition-interactive), box-shadow var(--transition-interactive),
                  opacity var(--transition-interactive);
    }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
    .mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

    .skip-link { position: absolute; top: -100%; left: var(--space-4); padding: var(--space-2) var(--space-4);
      background: var(--color-primary); color: var(--color-text-inverse); border-radius: var(--radius-md);
      font-size: var(--text-sm); font-weight: 500; text-decoration: none; z-index: 1000; }
    .skip-link:focus { top: var(--space-4); }

    /* HEADER / NAV */
    header.site-header {
      position: sticky; top: 0; z-index: 100;
      background: color-mix(in oklch, var(--color-bg) 88%, transparent);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
    }
    .nav-inner {
      max-width: var(--content-default); margin-inline: auto;
      padding: var(--space-4) var(--space-6);
      display: flex; align-items: center; justify-content: center; gap: var(--space-8);
    }
    .logo-mark {
      display: flex; align-items: center; gap: var(--space-3); text-decoration: none;
      color: var(--color-text);
    }
    .logo-glyph {
      width: 36px; height: 36px; border-radius: 50%;
      background-image: url("../images/logo-glyph.png");
      background-size: cover; background-position: center;
      box-shadow: 0 0 0 1px var(--color-border);
      flex-shrink: 0;
    }
    .logo-text { display: flex; flex-direction: column; gap: 0; line-height: 1.1; }
    .logo-name { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; font-weight: 500; }
    .logo-role { font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
    nav.primary ul { display: flex; gap: var(--space-1); list-style: none; align-items: center; }
    nav.primary a {
      font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none;
      padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
      font-weight: 500;
    }
    nav.primary a:hover { color: var(--color-text); background: var(--color-surface-offset); }
    nav.primary a.active { color: var(--color-primary); }
    .nav-actions { display: flex; align-items: center; gap: var(--space-2); }
    .icon-btn {
      display: flex; align-items: center; justify-content: center;
      width: 36px; height: 36px; border-radius: var(--radius-md);
      color: var(--color-text-muted);
    }
    .icon-btn:hover { background: var(--color-surface-offset); color: var(--color-text); }
    .btn-primary {
      font-size: var(--text-sm); font-weight: 500; padding: var(--space-2) var(--space-4);
      background: var(--color-primary); color: var(--color-text-inverse);
      border-radius: var(--radius-md); text-decoration: none;
      display: inline-flex; align-items: center; gap: var(--space-2);
      box-shadow: 0 1px 0 oklch(from var(--color-primary) calc(l - 0.1) c h);
    }
    .btn-primary:hover { background: var(--color-primary-hover); }
    .hamburger { display: none; flex-direction: column; gap: 5px; width: 36px; height: 36px;
      align-items: center; justify-content: center; border-radius: var(--radius-md); }
    .hamburger span { display: block; width: 18px; height: 1.5px; background: var(--color-text); border-radius: 2px; }
    .hamburger:hover { background: var(--color-surface-offset); }
    .mobile-menu {
      display: none; position: fixed; inset: 0; top: 73px; z-index: 99;
      background: var(--color-bg); padding: var(--space-6);
      flex-direction: column; gap: 0;
      border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a {
      font-size: var(--text-base); color: var(--color-text); text-decoration: none;
      padding: var(--space-4) var(--space-2); font-weight: 500;
      border-bottom: 1px solid var(--color-divider);
    }
    .mobile-menu a:hover { color: var(--color-primary); }

    /* SECTIONS COMMON */
    .section { padding-block: clamp(var(--space-12), 8vw, var(--space-20)); }
    .container { max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-6); }
    .section-label {
      font-family: var(--font-mono);
      font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
      color: var(--color-primary); margin-bottom: var(--space-3);
      display: inline-flex; align-items: center; gap: var(--space-2);
    }
    .section-label::before {
      content: ''; width: 18px; height: 1px; background: var(--color-primary); display: inline-block;
    }
    .section-title {
      font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-text);
      margin-bottom: var(--space-10); font-style: italic; letter-spacing: -0.01em; font-weight: 400;
    }

    /* HERO */
    #hero {
      background: var(--color-surface);
      border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
      position: relative;
      overflow: hidden;
    }
    #hero::before {
      content: ''; position: absolute; inset: 0; pointer-events: none;
      background-image:
        linear-gradient(to right, oklch(from var(--color-text) l c h / 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, oklch(from var(--color-text) l c h / 0.025) 1px, transparent 1px);
      background-size: 56px 56px;
      mask-image: radial-gradient(ellipse at 70% 40%, black 30%, transparent 70%);
      -webkit-mask-image: radial-gradient(ellipse at 70% 40%, black 30%, transparent 70%);
    }
    .hero-inner {
      max-width: 760px; margin-inline: auto;
      padding: clamp(var(--space-12), 8vw, var(--space-20)) var(--space-6);
      display: grid; grid-template-columns: 1fr; gap: var(--space-16); align-items: center;
      width: 100%; position: relative;
    }
    .hero-eyebrow {
      display: inline-flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6);
      font-family: var(--font-mono);
      font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
      color: var(--color-text-muted);
      padding: var(--space-1) var(--space-3);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-full);
      background: var(--color-surface-2);
    }
    .hero-eyebrow-dot {
      width: 7px; height: 7px; border-radius: 50%; background: #2f9b6e;
      box-shadow: 0 0 0 3px oklch(0.7 0.13 155 / 0.18);
      animation: pulse 2.4s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { box-shadow: 0 0 0 3px oklch(0.7 0.13 155 / 0.18); }
      50%      { box-shadow: 0 0 0 6px oklch(0.7 0.13 155 / 0.05); }
    }
    .hero-name {
      font-family: var(--font-display); font-size: var(--text-3xl); color: var(--color-text);
      line-height: 1.0; margin-bottom: var(--space-5); letter-spacing: -0.025em; font-weight: 400;
    }
    .hero-name em { font-style: italic; color: var(--color-primary); }
    .hero-title {
      font-size: var(--text-lg); color: var(--color-text); margin-bottom: var(--space-5);
      font-weight: 500; max-width: 32ch;
    }
    .hero-name-tagline {
      display: block; font-family: var(--font-body); font-size: var(--text-lg);
      font-weight: 500; letter-spacing: 0; color: var(--color-text);
      margin-top: var(--space-4); font-style: normal;
    }
    .hero-bio { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-8); max-width: 56ch; }
    .hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
    .btn-outline {
      font-size: var(--text-sm); font-weight: 500; padding: var(--space-2) var(--space-4);
      border: 1px solid var(--color-border);
      color: var(--color-text); border-radius: var(--radius-md); text-decoration: none;
      display: inline-flex; align-items: center; gap: var(--space-2);
      background: var(--color-surface-2);
    }
    .btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
    .hero-meta {
      display: grid; grid-template-columns: repeat(4, auto); gap: var(--space-8);
      margin-top: var(--space-10); padding-top: var(--space-6);
      border-top: 1px solid var(--color-divider);
      max-width: max-content;
    }
    .hero-stat-num {
      font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-text);
      line-height: 1; margin-bottom: var(--space-1); font-weight: 400;
    }
    .hero-stat-label { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
    /* CONTACT BAR */
    .contact-bar {
      background: var(--color-primary); color: var(--color-text-inverse);
      padding: var(--space-4) var(--space-6);
    }
    .contact-bar-inner {
      max-width: var(--content-default); margin-inline: auto;
      display: flex; align-items: center; gap: var(--space-6) var(--space-8); flex-wrap: wrap;
      justify-content: center;
    }
    .contact-bar-cta { padding: var(--space-3) var(--space-5); }
    .contact-item {
      display: inline-flex; align-items: center; gap: var(--space-2);
      font-size: var(--text-sm); color: var(--color-text-inverse); text-decoration: none;
      opacity: 0.92;
    }
    .contact-item:hover { opacity: 1; }
    .contact-item svg { opacity: 0.8; flex-shrink: 0; }

    /* EXPERIENCE */
    #experience { background: var(--color-bg); }
    .experience-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-12); align-items: start; }
    .experience-rail {
      position: sticky; top: 96px; align-self: start;
    }
    .rail-title {
      font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
      color: var(--color-text-faint); margin-bottom: var(--space-3);
    }
    .exp-nav-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
    .exp-nav-item a {
      display: flex; flex-direction: column; gap: 2px;
      font-size: var(--text-sm); color: var(--color-text-muted);
      text-decoration: none; padding: var(--space-2) var(--space-3);
      border-left: 2px solid var(--color-divider);
    }
    .exp-nav-item small {
      font-family: var(--font-mono); font-size: 10px; color: var(--color-text-faint);
      letter-spacing: 0.04em;
    }
    .exp-nav-item a:hover, .exp-nav-item a.active {
      color: var(--color-text); border-left-color: var(--color-primary);
      background: var(--color-surface-offset);
    }
    .exp-nav-item a.active small { color: var(--color-primary); }

    .job-list { display: flex; flex-direction: column; gap: var(--space-6); }
    .job-card {
      background: var(--color-surface); border-radius: var(--radius-lg);
      padding: var(--space-8); border: 1px solid oklch(from var(--color-text) l c h / 0.07);
      box-shadow: var(--shadow-sm);
      transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
      position: relative;
    }
    .job-card:hover { box-shadow: var(--shadow-md); }
    .job-dates-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
    .job-current-pill {
      font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
      color: var(--color-primary);
      background: var(--color-primary-highlight);
      padding: 3px 8px; border-radius: var(--radius-sm);
      text-transform: uppercase;
    }
    .job-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      gap: var(--space-4); margin-bottom: var(--space-3); flex-wrap: wrap;
    }
    .job-header > div:first-child { flex: 1 1 320px; min-width: 0; }
    .job-title { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text); font-style: italic; font-weight: 400; }
    .job-org-row { display: flex; align-items: center; gap: var(--space-2); margin-top: 2px; flex-wrap: wrap; }
    .job-org { font-size: var(--text-sm); color: var(--color-primary); font-weight: 500; }
    .job-loc { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.03em; }
    .job-loc::before { content: '·'; padding-right: var(--space-2); color: var(--color-text-faint); }
    .job-dates {
      font-family: var(--font-mono); font-size: 12px; color: var(--color-text-muted); white-space: nowrap;
      background: var(--color-surface-offset); padding: var(--space-1) var(--space-3);
      border-radius: var(--radius-full); flex-shrink: 0; letter-spacing: 0.02em;
    }
    .job-bullets { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-5); }
    .job-bullets li {
      font-size: var(--text-sm); color: var(--color-text); padding-left: var(--space-6);
      position: relative; line-height: 1.65;
    }
    .job-bullets li::before {
      content: ''; position: absolute; left: var(--space-1); top: 0.65em;
      width: 8px; height: 1px;
      background: var(--color-primary);
    }
    .job-bullets li b, .job-summary b { font-weight: inherit; color: inherit; }
    .job-summary { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; margin-top: var(--space-3); font-style: italic; }
    .skill-tags { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px dashed var(--color-divider); }
    .skill-tag {
      font-family: var(--font-mono); font-size: 11px;
      padding: 3px 9px; border-radius: var(--radius-sm);
      background: var(--color-primary-highlight); color: var(--color-primary);
      font-weight: 500; letter-spacing: 0.02em;
    }
    [data-theme="dark"] .skill-tag { background: var(--color-primary-highlight); color: var(--color-primary); }

    /* EDUCATION + CERTS combined section */
    #credentials { background: var(--color-surface); border-block: 1px solid oklch(from var(--color-text) l c h / 0.06); }
    .creds-grid {
      display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-12);
    }
    .creds-col h3.col-title {
      font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text);
      margin-bottom: var(--space-6); font-style: italic; font-weight: 400;
    }
    .edu-list { display: flex; flex-direction: column; gap: var(--space-4); }
    .edu-card {
      background: var(--color-bg); border-radius: var(--radius-lg);
      padding: var(--space-5) var(--space-6); border: 1px solid oklch(from var(--color-text) l c h / 0.07);
      display: grid; grid-template-columns: 1fr auto; gap: var(--space-4); align-items: center;
    }
    .edu-degree { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; font-weight: 400; margin-bottom: 4px; }
    .edu-institution { font-size: var(--text-sm); color: var(--color-primary); font-weight: 500; }
    .edu-year {
      font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted);
      background: var(--color-surface-offset); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
      letter-spacing: 0.04em; white-space: nowrap;
    }
    .edu-year[data-status="in-progress"] { color: var(--color-accent-warn); background: oklch(from var(--color-accent-warn) l c h / 0.1); }

    .cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
    .cert-card {
      background: var(--color-bg); border-radius: var(--radius-md);
      padding: var(--space-4) var(--space-5);
      border: 1px solid oklch(from var(--color-text) l c h / 0.07);
      display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center;
    }
    .cert-badge {
      width: 36px; height: 36px; border-radius: 8px;
      background: var(--color-primary-highlight); color: var(--color-primary);
      display: grid; place-items: center;
      font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.02em;
      text-align: center; line-height: 1; padding: 2px;
    }
    .cert-name { font-size: 13px; font-weight: 600; color: var(--color-text); line-height: 1.25; }
    .cert-issuer { font-family: var(--font-mono); font-size: 10px; color: var(--color-text-muted); letter-spacing: 0.04em; margin-top: 2px; }
    .cert-stack {
      grid-column: 1 / -1;
      background: var(--color-bg); border-radius: var(--radius-md);
      padding: var(--space-4) var(--space-5);
      border: 1px solid oklch(from var(--color-text) l c h / 0.07);
    }
    .cert-stack-label {
      font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted);
      text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3);
    }
    .cert-stack-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
    .cert-stack-list span {
      font-family: var(--font-mono); font-size: 11px; font-weight: 600;
      padding: 4px 10px; border-radius: var(--radius-sm);
      background: var(--color-surface-offset); color: var(--color-text);
      letter-spacing: 0.02em;
    }

    /* SKILLS */
    #skills { background: var(--color-bg); }
    .skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
    .skill-group {
      background: var(--color-surface); border-radius: var(--radius-lg);
      padding: var(--space-6) var(--space-6); border: 1px solid oklch(from var(--color-text) l c h / 0.07);
    }
    .skill-group-head {
      display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4);
      padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-divider);
    }
    .skill-group-icon {
      width: 32px; height: 32px; border-radius: var(--radius-sm);
      background: var(--color-primary-highlight); color: var(--color-primary);
      display: grid; place-items: center; flex-shrink: 0;
    }
    .skill-group-title { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); letter-spacing: -0.005em; }
    .skill-group-num { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-faint); margin-left: auto; }
    .skill-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .skill-chip {
      font-size: 12.5px; padding: 4px 10px;
      border-radius: var(--radius-sm); background: var(--color-surface-offset);
      color: var(--color-text); border: 1px solid oklch(from var(--color-text) l c h / 0.06);
      font-weight: 500;
    }

    /* CONTACT SECTION */
    #contact { background: var(--color-primary); overflow: hidden; position: relative; }
    #contact::before {
      content: ''; position: absolute; inset: 0; pointer-events: none;
      background-image: radial-gradient(circle at 1px 1px, oklch(from var(--color-text-inverse) l c h / 0.08) 1px, transparent 0);
      background-size: 32px 32px;
      mask-image: linear-gradient(to bottom, transparent, black 50%, transparent);
      -webkit-mask-image: linear-gradient(to bottom, transparent, black 50%, transparent);
    }
    .contact-section-inner {
      max-width: 720px; margin-inline: auto; padding-inline: var(--space-6);
      text-align: center; position: relative;
    }
    #contact .section-label { color: oklch(from var(--color-text-inverse) l c h / 0.7); }
    #contact .section-label::before { background: oklch(from var(--color-text-inverse) l c h / 0.7); }
    #contact .section-title { color: var(--color-text-inverse); margin-bottom: var(--space-6); }
    #contact p.lede { color: oklch(from var(--color-text-inverse) l c h / 0.85); max-width: 56ch; margin-inline: auto; margin-bottom: var(--space-10); font-size: var(--text-base); }
    .contact-links { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
    .contact-link-card {
      display: flex; align-items: center; gap: var(--space-3);
      padding: var(--space-4) var(--space-5); border-radius: var(--radius-md);
      background: oklch(from var(--color-text-inverse) l c h / 0.1);
      color: var(--color-text-inverse); text-decoration: none;
      border: 1px solid oklch(from var(--color-text-inverse) l c h / 0.18);
      font-size: var(--text-sm); font-weight: 500;
    }
    .contact-link-card:hover { background: oklch(from var(--color-text-inverse) l c h / 0.18); }
    .contact-link-card svg { opacity: 0.85; flex-shrink: 0; }
    .contact-link-body { display: flex; flex-direction: column; gap: 1px; text-align: left; }
    .contact-link-name { font-weight: 600; }
    .contact-link-note { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; opacity: 0.75; font-weight: 400; }

    /* FOOTER */
    footer.site-footer {
      background: var(--color-bg); border-top: 1px solid var(--color-divider);
      padding: var(--space-8) var(--space-6);
    }
    .footer-inner {
      max-width: var(--content-default); margin-inline: auto;
      display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap;
    }
    .footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.02em; }
    .footer-links { display: flex; gap: var(--space-5); }
    .footer-links a { font-size: 12px; color: var(--color-text-muted); text-decoration: none; }
    .footer-links a:hover { color: var(--color-text); }

    /* RESPONSIVE */
    @media (max-width: 900px) {
      .experience-layout { display: block; gap: 0; }
      .experience-rail { display: none; }
      .creds-grid { grid-template-columns: 1fr; gap: var(--space-10); }
      .skills-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 640px) {
      #experience.section { padding-block: var(--space-10); }
      #experience .section-title { margin-bottom: var(--space-6); }
    }
    @media (max-width: 768px) {
      nav.primary { display: none; }
      .hamburger { display: flex; }
      .hero-inner { grid-template-columns: 1fr; gap: var(--space-10); }
      .hero-meta { gap: var(--space-6); grid-template-columns: repeat(2, auto); }
      .footer-inner { flex-direction: column; align-items: flex-start; }
      .cert-grid { grid-template-columns: 1fr; }
      .job-card { padding: var(--space-6) var(--space-5); }
      .job-header { flex-direction: column; gap: var(--space-2); flex-wrap: nowrap; }
      .job-header > div:first-child { flex: 0 0 auto; width: 100%; }
      .job-dates-stack { flex-direction: row; align-items: center; gap: var(--space-2); }
    }

    @media (max-width: 480px) {
      .logo-text { display: none; }
      header.site-header .nav-actions .btn-primary span.btn-label { display: none; }
      header.site-header .nav-actions .btn-primary { padding: var(--space-2); }
      .hero-actions { gap: var(--space-2); }
      .hero-actions .btn-primary, .hero-actions .btn-outline { font-size: 13px; padding: var(--space-2) var(--space-3); }
    }

    /* SCROLL REVEAL */
    .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
    .reveal.visible { opacity: 1; transform: none; }

    /* PRINT */
    @media print {
      header.site-header, .mobile-menu, footer.site-footer, .hero-actions, .nav-actions, .skip-link { display: none !important; }
      body { background: white; color: black; }
      .section { padding-block: 1rem; }
      #contact { background: white; color: black; }
      #contact .section-title, #contact p.lede, #contact .contact-link-card { color: black; }
      .job-card, .edu-card, .cert-card, .skill-group { break-inside: avoid; box-shadow: none; }
      a { color: inherit; text-decoration: none; }
    }

    /* TWEAKS PANEL */
    .tweaks-panel {
      position: fixed; right: 20px; bottom: 20px; z-index: 1000;
      width: 320px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px);
      background: var(--color-surface); color: var(--color-text);
      border: 1px solid var(--color-border); border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      font-family: var(--font-body); font-size: 13px;
      overflow: hidden;
      display: none; flex-direction: column;
    }
    .tweaks-panel.open { display: flex; }
    .tweaks-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 14px; border-bottom: 1px solid var(--color-divider);
      background: var(--color-surface-2); cursor: grab;
    }
    .tweaks-head h3 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 600; }
    .tweaks-close { width: 24px; height: 24px; border-radius: 6px; color: var(--color-text-muted); display: grid; place-items: center; }
    .tweaks-close:hover { background: var(--color-surface-offset); color: var(--color-text); }
    .tweaks-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
    .tweak-section { display: flex; flex-direction: column; gap: 8px; }
    .tweak-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); font-weight: 600; }
    .tweak-row { display: flex; gap: 6px; flex-wrap: wrap; }
    .swatch {
      width: 32px; height: 32px; border-radius: 8px; border: 2px solid transparent;
      cursor: pointer; padding: 0; transition: transform 0.15s, border-color 0.15s;
    }
    .swatch:hover { transform: scale(1.05); }
    .swatch.active { border-color: var(--color-text); }
    .seg { display: flex; background: var(--color-surface-offset); border-radius: 8px; padding: 3px; gap: 2px; }
    .seg button {
      flex: 1; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
      color: var(--color-text-muted); background: transparent; border: none;
    }
    .seg button.active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }
    .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .toggle-row span { font-size: 13px; color: var(--color-text); }
    .switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
    .switch input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
    .switch-track {
      position: absolute; inset: 0; background: var(--color-surface-dynamic);
      border-radius: 999px; transition: background 0.18s;
    }
    .switch-track::after {
      content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
      background: white; border-radius: 50%; box-shadow: var(--shadow-sm);
      transition: transform 0.18s;
    }
    .switch input:checked ~ .switch-track { background: var(--color-primary); }
    .switch input:checked ~ .switch-track::after { transform: translateX(16px); }
    .tweak-input {
      width: 100%; padding: 8px 10px; border-radius: 6px;
      border: 1px solid var(--color-border); background: var(--color-surface-2);
      color: var(--color-text); font-family: inherit; font-size: 12.5px;
      resize: vertical; min-height: 60px;
    }
    .tweak-input:focus { outline: none; border-color: var(--color-primary); }

    html[data-density="compact"] .section { padding-block: clamp(var(--space-8), 5vw, var(--space-12)); }
    html[data-density="compact"] .job-card { padding: var(--space-5) var(--space-6); }
    html[data-density="compact"] .job-bullets { gap: var(--space-2); margin-top: var(--space-3); }
    html[data-density="compact"] .hero-inner { padding-block: clamp(var(--space-8), 6vw, var(--space-12)); }
    .hero-text { text-align: center; }
    .hero-eyebrow,
    .hero-actions,
    .hero-meta { justify-content: center; }
    .hero-bio,
    .hero-title { margin-inline: auto; }
    .hero-meta { max-width: none; margin-inline: auto; justify-self: center; }

    /* PUBLICATIONS */
    #publications { background: var(--color-bg); }
    .pub-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); padding: 0; margin: 0; counter-reset: pubs; max-width: var(--content-default); }
    .pub-item { border-top: 1px solid var(--color-divider); }
    .pub-item:last-child { border-bottom: 1px solid var(--color-divider); }
    .pub-link {
      display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-6);
      padding: var(--space-5) var(--space-2);
      text-decoration: none; color: inherit;
      transition: padding 0.2s ease, background 0.2s ease;
    }
    .pub-link:hover { background: var(--color-surface-offset); padding-inline: var(--space-4); }
    .pub-num { font-family: var(--font-mono); font-size: 12px; color: var(--color-text-faint); letter-spacing: 0.06em; }
    .pub-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .pub-kind {
      font-family: var(--font-mono); font-size: 10px; font-weight: 600;
      letter-spacing: 0.12em; text-transform: uppercase;
      color: var(--color-primary);
      display: inline-block; align-self: flex-start;
      padding: 2px 7px; border-radius: var(--radius-sm);
      background: var(--color-primary-highlight);
    }
    .pub-title { font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); color: var(--color-text); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; }
    .pub-source { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.04em; }
    .pub-arrow { color: var(--color-text-faint); transition: color 0.2s ease, transform 0.2s ease; flex-shrink: 0; }
    .pub-link:hover .pub-arrow { color: var(--color-primary); transform: translate(2px, -2px); }
    .pub-link:hover .pub-title { color: var(--color-primary); }
    @media (max-width: 640px) {
      .pub-link { grid-template-columns: auto 1fr auto; gap: var(--space-3); }
      .pub-title { font-size: var(--text-base); }
    }

    @media print { .tweaks-panel { display: none !important; } }

    .back-to-top {
      position: fixed; right: 20px; bottom: 20px; z-index: 90;
      width: 44px; height: 44px; border-radius: 50%;
      background: var(--color-primary); color: var(--color-text-inverse);
      display: grid; place-items: center;
      box-shadow: var(--shadow-md);
      border: none; cursor: pointer;
      opacity: 0; transform: translateY(8px); pointer-events: none;
      transition: opacity 0.25s ease, transform 0.25s ease, background 0.18s ease;
    }
    .back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .back-to-top:hover { background: var(--color-primary-hover); }
    .back-to-top:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
    .tweaks-panel.open ~ .back-to-top { right: 360px; }
    @media (max-width: 640px) {
      .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
      .tweaks-panel.open ~ .back-to-top { right: 14px; bottom: calc(50vh + 14px); }
    }
    @media print { .back-to-top { display: none !important; } }

    /* ═══════════════════════════════════════════════════════
       ENTRANCE ANIMATIONS
       ═══════════════════════════════════════════════════════ */
    @keyframes jd-fade-up {
      from { opacity: 0; transform: translateY(32px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes jd-fade-in {
      from { opacity: 0; }
      to   { opacity: 1; }
    }
    @keyframes jd-slide-down {
      from { opacity: 0; transform: translateY(-16px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes jd-line-reveal {
      from { opacity: 0; transform: translateY(48px) skewY(1.5deg); }
      to   { opacity: 1; transform: translateY(0)    skewY(0deg); }
    }

    @media (prefers-reduced-motion: no-preference) {
      /* Header */
      .site-header {
        animation: jd-slide-down 0.55s cubic-bezier(0.16,1,0.3,1) both;
      }
      /* Eyebrow status pill */
      .hero-eyebrow {
        animation: jd-fade-in 0.5s ease both;
        animation-delay: 0.05s;
      }
      /* Name lines — each revealed from below, clipped by overflow */
      .hero-name-line {
        display: block;
        overflow: hidden;
        line-height: 1.05;
        padding-bottom: 0.12em;
      }
      .hero-name-line span {
        display: block;
        animation: jd-line-reveal 0.75s cubic-bezier(0.16,1,0.3,1) both;
      }
      .hero-name-line:nth-child(1) span { animation-delay: 0.10s; }
      .hero-name-line:nth-child(2) span { animation-delay: 0.20s; }
      /* Tagline under name */
      .hero-name-tagline {
        animation: jd-fade-up 0.6s cubic-bezier(0.16,1,0.3,1) both;
        animation-delay: 0.32s;
      }
      /* Bio */
      .hero-bio {
        animation: jd-fade-up 0.55s cubic-bezier(0.16,1,0.3,1) both;
        animation-delay: 0.42s;
      }
      /* CTA buttons */
      .hero-actions {
        animation: jd-fade-up 0.5s cubic-bezier(0.16,1,0.3,1) both;
        animation-delay: 0.52s;
      }
      /* Stats */
      .hero-meta [role="listitem"]:nth-child(1) { animation: jd-fade-up 0.45s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.60s; }
      .hero-meta [role="listitem"]:nth-child(2) { animation: jd-fade-up 0.45s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.68s; }
      .hero-meta [role="listitem"]:nth-child(3) { animation: jd-fade-up 0.45s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.76s; }
      .hero-meta [role="listitem"]:nth-child(4) { animation: jd-fade-up 0.45s cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.84s; }
      /* Contact bar */
      .contact-bar {
        animation: jd-fade-in 0.5s ease both;
        animation-delay: 0.92s;
      }
      /* Enhanced scroll reveals */
      .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.65s cubic-bezier(0.16,1,0.3,1);
      }
      .reveal.visible {
        opacity: 1;
        transform: translateY(0);
      }
      /* Sibling stagger within a list */
      .job-list .reveal:nth-child(1),
      .cert-grid .reveal:nth-child(1),
      .pub-list .reveal:nth-child(1) { transition-delay: 0s; }
      .job-list .reveal:nth-child(2),
      .cert-grid .reveal:nth-child(2),
      .pub-list .reveal:nth-child(2) { transition-delay: 0.07s; }
      .job-list .reveal:nth-child(3),
      .cert-grid .reveal:nth-child(3),
      .pub-list .reveal:nth-child(3) { transition-delay: 0.14s; }
      .job-list .reveal:nth-child(4),
      .cert-grid .reveal:nth-child(4),
      .pub-list .reveal:nth-child(4) { transition-delay: 0.21s; }
      .job-list .reveal:nth-child(5),
      .pub-list .reveal:nth-child(5)  { transition-delay: 0.28s; }
      .job-list .reveal:nth-child(6)  { transition-delay: 0.35s; }
    }

    /* ─── MOBILE / IOS SCALING FIXES ─────────────────────────────────── */
    /* Prevent iOS Safari from auto-scaling text */
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    /* Clip any accidental horizontal overflow without creating a scroll context */
    body { overflow-x: clip; }
    /* The logo marquee track is width:max-content (~1200px); without these
       guards its intrinsic width propagates up (marquee → .hero-orgs →
       .hero-text grid item, whose min-width defaults to auto) and forces the
       hero column wider than small viewports — iOS then renders the page
       overflowed/zoomed instead of fitting 1:1. Allow the grid items and the
       marquee wrapper to shrink below their content's intrinsic width. */
    .hero-text, .hero-orgs { min-width: 0; }
    .hero-orgs-marquee { contain: inline-size; }

    /* Publications: reflow on narrow screens */
    @media (max-width: 480px) {
      /* Drop pub-num on very small screens; let pub-body go full width */
      .pub-link {
        grid-template-columns: 1fr auto;
        gap: var(--space-3);
        padding-inline: var(--space-1);
      }
      .pub-num { display: none; }
      /* Prevent long words in titles from overflowing */
      .pub-title {
        font-size: var(--text-base);
        overflow-wrap: break-word;
        word-break: break-word;
      }
      /* Align summary text flush with body content */
      .pub-summary {
        padding-left: 0;
        font-size: var(--text-xs);
      }
    }

    @media (max-width: 640px) {
      /* Ensure pub-title wraps cleanly even on mid-size phones */
      .pub-title { overflow-wrap: break-word; word-break: break-word; }
      .pub-summary { font-size: var(--text-xs); }
    }
  
    /* Narrative / intro text (subpages) */

    .job-narrative { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); }
    .job-narrative p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.85; max-width: 70ch; margin-bottom: var(--space-4); }
    .job-narrative p:last-child { margin-bottom: 0; }
    .skill-narrative { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--color-divider); }
    .skill-narrative p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.85; max-width: 68ch; }
    .pub-summary { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.8; max-width: 68ch; padding: var(--space-4) 0 var(--space-5) 0; }
    .section-intro { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.75; max-width: 60ch; margin-bottom: var(--space-12); }

    /* HERO — current role line, employer strip, featured publication */
    .hero-current {
      font-size: var(--text-sm); color: var(--color-text-muted);
      margin-top: calc(-1 * var(--space-4)); margin-bottom: var(--space-8);
      max-width: 56ch;
    }
    .hero-current strong { color: var(--color-primary); font-weight: 600; }
    .hero-orgs {
      display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap;
      margin-top: var(--space-8);
    }
    .hero-orgs-label {
      font-family: var(--font-mono); font-size: 10px; font-weight: 600;
      letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-faint);
      white-space: nowrap;
    }
    .hero-orgs-list { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 500; }
    /* Rolling logo strip: two identical copies scroll left; each copy carries a
       trailing gap so the -50% loop point is seamless. Pauses on hover. */
    .hero-orgs-marquee {
      flex: 1 1 0; min-width: 0; max-width: 560px; overflow: hidden;
      align-self: center;
      -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
      mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    }
    .hero-orgs-track {
      display: flex; width: max-content;
      animation: hero-orgs-scroll 28s linear infinite;
    }
    .hero-orgs-logos {
      display: flex; align-items: center; flex-wrap: nowrap;
      gap: var(--space-12); padding-right: var(--space-12);
    }
    @keyframes hero-orgs-scroll {
      from { transform: translateX(0); }
      to   { transform: translateX(-50%); }
    }
    @media (prefers-reduced-motion: reduce) {
      .hero-orgs-track { animation: none; }
    }
    .hero-org-logo {
      display: inline-block; flex-shrink: 0;
      background-color: currentColor; color: var(--color-text);
      opacity: 0.5; transition: opacity 0.2s ease;
      -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
      -webkit-mask-position: center; mask-position: center;
      -webkit-mask-size: contain; mask-size: contain;
    }
    .hero-org-logo:hover { opacity: 1; }
    @media (max-width: 640px) {
      .hero-orgs-logos { gap: var(--space-8); padding-right: var(--space-8); }
    }
    .hero-featured {
      display: inline-flex; flex-direction: column; gap: 2px;
      margin-top: var(--space-6); padding: var(--space-3) var(--space-5);
      border: 1px solid var(--color-border); border-radius: var(--radius-md);
      background: var(--color-surface-2); text-decoration: none; color: inherit;
      max-width: max-content;
    }
    .hero-featured:hover { border-color: var(--color-primary); }
    .hero-featured:hover .hero-featured-title { color: var(--color-primary); }
    .hero-featured-kind {
      font-family: var(--font-mono); font-size: 10px; font-weight: 600;
      letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-primary);
    }
    .hero-featured-title {
      font-family: var(--font-display); font-style: italic; font-size: var(--text-base);
      color: var(--color-text); line-height: 1.3;
    }
    .hero-featured-src { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.04em; }
    .hero-current { margin-inline: auto; }
    .hero-orgs { justify-content: center; }
    .hero-featured { margin-inline: auto; align-items: center; }
  