/* ============================================================
   jameschang.co — single stylesheet
   Editorial / blue-tinted palette / oxide-red accent
   Liquid-glass surfaces via backdrop-filter
   Dark mode via prefers-color-scheme + manual [data-theme] override
   ============================================================ */

:root {
  /* Surface */
  --bg:           #c6cfdd;        /* cool blue-gray paper, deeper still */
  --bg-from:      #d2dae6;        /* gradient top-left */
  --bg-to:        #a5b1c8;        /* gradient bottom-right (substantial depth) */
  --text:         #0f1a2e;        /* deep navy ink */
  --muted:        #576376;        /* blue-gray */
  --rule:         rgba(15, 26, 46, 0.12);

  /* Accent stays warm against the cool neutral */
  --accent:       #b44a3e;        /* slightly softer oxide red */
  --accent-hover: #8a3428;

  /* Liquid-glass card surface */
  --card-bg:        rgba(255, 255, 255, 0.55);
  --card-border:    rgba(15, 26, 46, 0.08);
  --card-shadow:    0 4px 24px rgba(15, 26, 46, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --glass-blur:     blur(20px) saturate(1.3);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --measure: 640px;
  --measure-wide: 960px;
}

/* Dark — deep navy, not black. Warmer than pure dark blue to keep text legible. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #0f1a2e;        /* deep navy */
    --bg-from:    #14233d;
    --bg-to:      #0a1422;
    --text:       #e4e9f2;
    --muted:      #8a95a8;
    --rule:       rgba(228, 233, 242, 0.12);
    --accent:     #ff8b6d;        /* warm coral against cool navy */
    --accent-hover: #ffa98f;
    --card-bg:      rgba(255, 255, 255, 0.04);
    --card-border:  rgba(255, 255, 255, 0.10);
    --card-shadow:  0 4px 24px rgba(0, 0, 0, 0.25);
  }
}

:root[data-theme="dark"] {
  --bg:         #0f1a2e;
  --bg-from:    #14233d;
  --bg-to:      #0a1422;
  --text:       #e4e9f2;
  --muted:      #8a95a8;
  --rule:       rgba(228, 233, 242, 0.12);
  --accent:     #ff8b6d;
  --accent-hover: #ffa98f;
  --card-bg:      rgba(255, 255, 255, 0.04);
  --card-border:  rgba(255, 255, 255, 0.10);
  --card-shadow:  0 4px 24px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  /* Subtle twin-radial gradient so liquid-glass surfaces have something to sample + blur */
  background-image:
    radial-gradient(at 15% 10%, var(--bg-from) 0%, transparent 45%),
    radial-gradient(at 85% 85%, var(--bg-to) 0%, transparent 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* ---------- Focus (WCAG 2.2) ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Links ---------- */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
}
.site-header-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-brand {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-brand:hover { color: var(--accent); }
.site-header nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.25rem; /* WCAG 2.2: min 24px tap target */
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.site-header nav a:hover { color: var(--accent); }

/* Theme toggle — pill with both icons visible, highlight slides to active */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  cursor: pointer;
  font-family: inherit;
  margin-left: auto;
  gap: 0;
  height: 32px;
  box-shadow: var(--card-shadow);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.25s ease;
  z-index: 2;
  user-select: none;
}
/* Sliding highlight pill */
.theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  z-index: 1;
}
/* Light mode (default): highlight on sun (left, position 0) */
.theme-toggle .icon-sun { color: var(--bg); font-weight: 600; }
.theme-toggle .icon-moon { color: var(--muted); }

/* Dark mode: highlight translates to moon (right) */
:root[data-theme="dark"] .theme-toggle::before { transform: translateX(26px); }
:root[data-theme="dark"] .theme-toggle .icon-sun { color: var(--muted); font-weight: normal; }
:root[data-theme="dark"] .theme-toggle .icon-moon { color: var(--bg); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle::before { transform: translateX(26px); }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { color: var(--muted); font-weight: normal; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { color: var(--bg); font-weight: 600; }
}

/* ---------- Main container ---------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
}
section:last-of-type { border-bottom: none; }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
}

/* ---------- Hero ---------- */
.hero { padding-top: 5rem; padding-bottom: 2rem; border-bottom: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.display-tagline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  max-width: 36rem;
  color: var(--text);
}
.display-tagline a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.display-tagline a:hover { color: var(--accent); }
.tagline-metric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--accent);
  font-weight: 600;
}

/* Print-only utility: hidden on web, visible in Cmd-P / PDF output */
.print-only { display: none; }
@media print {
  .print-only { display: inline; }
}

/* Name + contact block at top of hero */
.name {
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.contact-line {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  line-height: 1.7;
}
.contact-line a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.contact-line a:hover { color: var(--accent); }
.contact-line .dot { color: var(--rule); margin: 0 0.15rem; }

@media (max-width: 600px) {
  .contact-line .dot { display: inline; }
  .name { font-size: 1.5rem; }
}

.lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 40rem;
  margin: 0 0 2rem;
}

.hero-ctas {
  font-size: 1rem;
  color: var(--muted);
}

.hero-ctas .cta {
  color: var(--accent);
  font-weight: 500;
  padding: 0.25rem 0;
  /* WCAG 2.2 target size: padding + line-height gives >=24×24 */
  display: inline-block;
  min-height: 24px;
}
.cta-sep { color: var(--rule); margin: 0 0.5rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: start;
}
.headshot {
  width: 100%;
  height: auto;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--rule);
}
.about-copy p { margin: 0 0 1rem; }
.about-copy p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .about-grid { grid-template-columns: 1fr; gap: 1rem; }
  .headshot { width: 120px; }
}

/* ---------- Current projects (7 cards) ---------- */
.section-lede {
  color: var(--muted);
  font-size: 1rem;
  margin: -0.75rem 0 2rem;
  max-width: 36rem;
}

.project-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative; /* for stretched link */
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--card-shadow);
}
.project-card:has(h3 a):hover {
  border-color: var(--accent);
  cursor: pointer;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(15, 26, 46, 0.08);
}
.project-card h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.project-card h3 a {
  color: var(--text);
  text-decoration: none;
}
.project-card h3 a:hover { color: var(--accent); }
/* Stretched-link: clicking anywhere on the card triggers the h3 link */
.project-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.project-card p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--text); }
.project-meta {
  margin-top: 0.75rem !important;
  font-size: 0.8125rem !important;
  color: var(--muted) !important;
}
/* Secondary links inside the card stay clickable above the stretched link */
.project-card .project-meta a {
  position: relative;
  z-index: 2;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.project-card .project-meta a:hover { color: var(--accent); }
.tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  background: var(--rule);
  color: var(--muted);
  border-radius: 3px;
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* ---------- Case studies ---------- */
.case {
  margin-bottom: 3.5rem;
}
.case:last-child { margin-bottom: 0; }
.case-header { margin-bottom: 1.25rem; }
.case-meta {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.case h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.case p {
  margin: 0 0 1rem;
  max-width: 40rem;
}
.case-outcome {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 8px;
  margin-top: 1.5rem !important;
  font-size: 1rem;
}

/* Inline figure inside a case study (screenshot + caption) */
.case-figure {
  margin: 1.5rem 0;
  padding: 0;
}
.case-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.case-figure figcaption {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Pulled-out display metric for cases without a screenshot */
.case-metric {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
  padding: 0.25rem 0;
}
.case-metric .metric-value {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.case-metric .metric-label {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.3;
  max-width: 18rem;
}
@media (max-width: 600px) {
  .case-metric { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}

/* Print: hide inline figures (screenshots) and case-metric; keep prose */
@media print {
  .case-figure { display: none; }
  .case-metric { display: none; }
}

/* Testimonials strip */
.testimonials {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0;
}
.testimonials h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 600;
  margin: 0 0 1.5rem;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.testimonial {
  padding: 0;
}
.testimonial blockquote {
  margin: 0 0 0.75rem;
  padding: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--text);
  font-style: normal;
}
.testimonial blockquote::before { content: "\201C"; color: var(--accent); margin-right: 0.1rem; }
.testimonial blockquote::after { content: "\201D"; color: var(--accent); margin-left: 0.1rem; }
.testimonial cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.testimonial cite strong { color: var(--text); font-weight: 600; }
@media print { .testimonials { display: none; } }
.case-reflect {
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 1.5rem !important;
}
.case-reflect strong { color: var(--text); font-style: normal; }
.case code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--rule);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}

/* ---------- Experience ---------- */
.role { margin-bottom: 2rem; }
.role:last-child { margin-bottom: 0; }
.role h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.role h3 a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--muted); }
.role h3 a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.role-title { font-weight: 400; color: var(--muted); }
.role-note { font-weight: 400; color: var(--muted); font-size: 0.8125rem; opacity: 0.7; }
.role-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.role ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}
.role li {
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.earlier-experience {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.earlier-experience summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--muted);
  padding: 0.5rem 0;
  min-height: 24px;
}
.earlier-experience summary:hover { color: var(--accent); }
.earlier-experience[open] summary { margin-bottom: 1.5rem; }
.earlier-experience .role { margin-bottom: 1rem; }
.earlier-experience .role h3 { font-size: 0.9375rem; }

/* ---------- Education ---------- */
.degree { margin-bottom: 2rem; }
.degree h3 { font-size: 1rem; }
.degree p { margin: 0; font-size: 0.9375rem; }

.certs-heading {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.certs {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  column-count: 2;
  column-gap: 2.5rem;
}
.certs li {
  margin-bottom: 0.85rem;
  line-height: 1.45;
  break-inside: avoid;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
}
@media (max-width: 600px) {
  .certs { column-count: 1; }
}

/* ---------- Skills ---------- */
.skills-list { margin: 0; padding: 0; }
.skills-list > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.skills-list > div:last-child { border-bottom: none; }
.skills-list dt { font-weight: 600; color: var(--text); }
.skills-list dd { margin: 0; color: var(--text); }

@media (max-width: 600px) {
  .skills-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Memberships ---------- */
.membership-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.membership-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.membership-list li:last-child { border-bottom: none; }
.membership-head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.membership-head strong { font-size: 1rem; font-weight: 600; }
.membership-head strong a { color: var(--text); text-decoration: none; }
.membership-head strong a:hover { color: var(--accent); }
.membership-head .role-title {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
}
.membership-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.membership-list li p { margin: 0 0 0.35rem; font-size: 0.9375rem; }
.membership-list li p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.footer-contact p {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}
.footer-meta {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer-meta a { color: var(--muted); }

/* ============================================================
   Print stylesheet — the PDF that ships to recruiters
   ============================================================ */

@media print {
  @page { size: letter; margin: 0.5in; }

  :root {
    --bg: #fff;
    --text: #000;
    --muted: #333;
    --rule: #ccc;
    --accent: #000;
  }

  body {
    font-family: var(--serif);
    font-size: 10pt;
    line-height: 1.4;
    background: #fff;
    color: #000;
  }

  /* Hide chrome that doesn't belong in a résumé */
  .site-header,
  .hero-ctas,
  .site-footer .footer-meta a[href*="github.com/thirstypig/jameschang.co"],
  .skip-link { display: none !important; }

  main { max-width: 100%; padding: 0; }

  section {
    padding: 0.5rem 0;
    border-bottom: none;
    break-inside: avoid;
  }
  section, article { page-break-inside: avoid; }
  h2, h3 { page-break-after: avoid; }

  .hero {
    padding: 0 0 0.5rem;
    border-bottom: 1px solid #000;
    margin-bottom: 0.75rem;
  }
  .eyebrow { font-size: 9pt; }
  .display-tagline br { display: none; }
  .display-tagline {
    font-family: var(--sans);
    font-size: 11pt;
    font-weight: 400;
    line-height: 1.4;
    color: #000;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }
  .lede { font-size: 10.5pt; margin-bottom: 0.5rem; max-width: 100%; }

  /* ATS-friendly body font + contact stack */
  body { font-family: var(--sans); }

  .contact-line .dot { display: none; }
  .contact-line span,
  .contact-line a {
    display: block;
    margin-bottom: 0.05rem;
  }

  /* Utility classes */
  .no-print { display: none !important; }
  .print-only { display: inline; }

  /* Reorder: Experience → Education → Skills → Certifications → Memberships.
     Case studies are hidden entirely in print (60 lines of prose confuses ATS
     parsers; the actual site at jameschang.co carries them for human readers). */
  main { display: flex; flex-direction: column; }
  .hero         { order: 0; }
  #about        { order: 1; }
  #experience   { order: 2; }
  #education    { order: 3; }
  #skills       { order: 4; }
  #projects     { order: 5; }
  #memberships  { order: 6; }
  #case-studies { display: none; }

  /* ATS dictionary aliases — swap visible heading text for ATS-friendly terms in print */
  #about h2 span.no-print,
  #memberships h2 span.no-print { display: none !important; }
  #about h2 span.print-only,
  #memberships h2 span.print-only { display: inline; }

  .about-grid { grid-template-columns: 1fr; gap: 0; }
  .headshot { display: none; }

  h2 {
    font-size: 13pt;
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
    border-bottom: 0.5pt solid #000;
    padding-bottom: 2pt;
  }

  .project-grid { grid-template-columns: 1fr; gap: 0.35rem; }
  .project-card { background: none; border: none; padding: 0.25rem 0; }
  .project-card h3 { font-size: 10pt; margin-bottom: 0.15rem; }
  .project-card p { font-size: 9pt; line-height: 1.35; }
  .project-meta { display: none; }

  .case { margin-bottom: 0.75rem; }
  .case h3 { font-size: 11pt; }
  .case-meta { font-size: 8.5pt; }
  .case p { font-size: 10pt; line-height: 1.4; margin-bottom: 0.35rem; }
  .case-outcome, .case-reflect {
    border: none;
    background: none;
    padding: 0;
    font-size: 10pt;
    font-style: normal;
    margin-top: 0.35rem !important;
  }

  .role { margin-bottom: 0.5rem; }
  .role h3 { font-size: 10.5pt; }
  .role-meta { font-size: 9pt; }
  .role ul { margin-top: 0.2rem; }
  .role li { font-size: 9.5pt; margin-bottom: 0.15rem; line-height: 1.35; }

  /* Force-expand collapsed earlier experience */
  details[open], details { display: block; }
  details > summary { display: none; }
  details > *:not(summary) { display: revert; }
  .earlier-experience { border-top: 0.5pt solid #000; padding-top: 0.25rem; margin-top: 0.35rem; }

  /* Single-column for ATS: multi-column layouts break top-to-bottom reading order */
  .certs { column-count: 1; font-size: 9pt; }
  .certs li {
    padding-left: 0;
    border-left: none;
    margin-bottom: 0.25rem;
  }

  .skills-list > div {
    display: block;
    grid-template-columns: none;
    padding: 0.2rem 0;
    font-size: 9.5pt;
    border-bottom: 0.25pt solid #ccc;
  }
  .skills-list dt { display: inline; font-weight: 600; }
  .skills-list dt::after { content: ": "; }
  .skills-list dd { display: inline; margin: 0; }

  .site-footer {
    padding: 0.5rem 0 0;
    border-top: 0.5pt solid #000;
    color: #000;
  }
  .site-footer a { color: #000; }

  /* Expand URLs after external footer links so a printed PDF retains contact info */
  .site-footer a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
  }

  a { color: #000; text-decoration: none; }

  /* Show all certs in print even if <details> is collapsed on web */
  .certs-more { display: block !important; }
  .certs-more > summary { display: none; }
  .certs-more > ul { display: block; }
}

/* ---------- Certifications (industry-recognized + collapsed extras) ---------- */
.certs-primary {
  column-count: 1;
  margin-bottom: 0.5rem;
}
.certs-primary li {
  border-left-color: var(--accent);
}

/* Mirror the .earlier-experience pattern for collapsed extras */
.certs-more {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.certs-more summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--muted);
  padding: 0.5rem 0;
  min-height: 24px;
  font-size: 0.9375rem;
}
.certs-more summary:hover { color: var(--accent); }
.certs-more[open] summary { margin-bottom: 1rem; }
.certs-more > ul { margin-top: 0.5rem; }
