:root {
  --color-bg: oklch(0.98 0.015 75);
  --color-text: oklch(0.2 0.02 40);
  --color-text-muted: oklch(0.4 0.02 40);
  --color-text-soft: oklch(0.3 0.02 40);
  /* Darkened from 0.48 to clear WCAG AA 4.5:1 on --color-bg (was 3.77:1) — see qa-lighthouse.html */
  --color-text-faint: oklch(0.42 0.02 40);
  --color-accent: oklch(0.58 0.19 25);
  --color-accent-soft: oklch(0.58 0.19 25 / 0.12);
  --color-accent-text: oklch(0.45 0.12 25);
  --color-shadow: oklch(0.2 0.02 40 / 0.15);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

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

/* Page header */
.page-header { background: var(--color-accent); padding: 48px 48px 64px; }
.back-link { display: inline-block; text-decoration: none; color: #fff; font-weight: 600; font-size: 14px; margin-bottom: 28px; }
.back-link:hover { text-decoration: underline; }
.page-header h1 { font-family: var(--font-heading); font-weight: 800; font-size: 52px; margin: 0 0 14px; color: #fff; }
.page-header p { font-size: 19px; max-width: 560px; margin: 0; color: #fff; }

/* Content */
.content { max-width: 820px; margin: -32px auto 0; padding: 0 48px 80px; }

.intro-card { background: #fff; border-radius: 24px; padding: 40px; box-shadow: 0 20px 40px -20px var(--color-shadow); display: flex; gap: 36px; flex-wrap: wrap; }

.intro-photo { flex: 0 0 auto; width: 180px; height: 180px; border-radius: 24px; overflow: hidden; background: oklch(0.9 0.02 75); }
.intro-photo img { width: 100%; height: 100%; object-fit: cover; }

.intro-text { flex: 1 1 320px; min-width: 260px; }
.intro-text h2 { font-family: var(--font-heading); font-weight: 700; font-size: 26px; margin: 0 0 12px; }
.intro-text p { font-size: 16px; line-height: 1.7; color: var(--color-text-muted); margin: 0; }

.section-title { font-family: var(--font-heading); font-weight: 700; font-size: 18px; margin: 0 0 14px; color: var(--color-text-soft); }
.section-block { margin-top: 36px; }

/* Tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { background: var(--color-accent-soft); color: var(--color-accent-text); font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.photo-item {
  aspect-ratio: 1; border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 24px -14px oklch(0.2 0.02 40 / 0.3);
  background: #fff; padding: 6px; cursor: pointer;
  transition: transform 0.2s ease;
}
.photo-item:hover, .photo-item:focus-visible { transform: scale(1.04); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }

/* Click-to-enlarge images (see lightbox.js) */
img.zoomable { cursor: zoom-in; }

/* Buttons */
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { text-decoration: none; font-weight: 700; font-size: 15px; padding: 14px 22px; border-radius: 12px; display: inline-block; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-secondary { background: var(--color-accent-soft); color: var(--color-accent-text); }

/* Footer */
.page-footer { text-align: center; padding: 24px 24px 40px; font-size: 13px; color: var(--color-text-faint); }
.page-footer a { color: inherit; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: oklch(0.15 0.02 40 / 0.8); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 40px;
  animation: fadeIn 0.2s ease; cursor: pointer;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(88vw, 900px); max-height: 82vh; object-fit: contain; border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.5); animation: popIn 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
  cursor: default;
}
.lightbox-close { position: absolute; top: 28px; right: 36px; color: #fff; font-size: 28px; cursor: pointer; }

@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Generic content card (QA / Motion / UXUI bodies) */
.content-card { background: #fff; border-radius: 24px; padding: 40px; box-shadow: 0 20px 40px -20px var(--color-shadow); }
.content-card p { font-size: 17px; line-height: 1.7; color: oklch(0.35 0.02 40); margin: 0 0 28px; }
.content-card + .content-card { margin-top: 20px; }

.helper-note { font-size: 13px; color: var(--color-text-faint); margin-top: 10px; }

/* Case study real images */
.case-figure { border-radius: 16px; overflow: hidden; margin: 16px 0; background: oklch(0.97 0.01 75); }
.case-figure img { width: 100%; height: auto; display: block; }
.case-figure svg { width: 100%; height: auto; display: block; }
.case-figure figcaption { font-size: 13px; line-height: 1.5; color: var(--color-text-faint); padding: 10px 14px 12px; }
.case-figure:first-child { margin-top: 0; }
.case-figure:last-child { margin-bottom: 0; }

.case-figure-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; align-items: flex-start; }
.case-figure-row .case-figure { flex: 1 1 200px; margin: 0; min-width: 0; }
/* Phone screenshots: one even row on desktop, two per row on a phone — never one stretched to full width */
.case-figure-row--phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (max-width: 640px) { .case-figure-row--phones { grid-template-columns: repeat(2, 1fr); } }
/* Diagrams redrawn as SVG: full width, and scroll sideways on narrow screens instead of shrinking the text */
.flow-diagram { background: #fff; border: 1px solid oklch(0.9 0.01 75); }
.flow-diagram .table-wrap { padding: 16px; margin: 0; }
.flow-diagram svg { min-width: 620px; }

/* Full-bleed variant — breaks out of the content-card padding for images that need to read larger */
.case-figure-bleed { margin: 16px -40px; width: calc(100% + 80px); }
@media (max-width: 640px) {
  .case-figure-bleed { margin: 16px -28px; width: calc(100% + 56px); }
}

.section-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-title-row .section-title { margin-bottom: 0; }
.section-title-row img { width: 44px; height: auto; flex: 0 0 auto; }

/* Severity / priority / status badges (QA case study) */
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.badge { font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-critical { background: oklch(0.6 0.22 25 / 0.15); color: oklch(0.5 0.2 25); }
.badge-high { background: oklch(0.68 0.19 45 / 0.15); color: oklch(0.5 0.17 45); }
.badge-medium { background: oklch(0.78 0.15 85 / 0.25); color: oklch(0.48 0.13 85); }
.badge-low { background: oklch(0.75 0.02 40 / 0.15); color: oklch(0.45 0.02 40); }
.badge-pass { background: oklch(0.72 0.13 175 / 0.15); color: oklch(0.4 0.1 175); }
.badge-pending { background: oklch(0.88 0.02 250 / 0.4); color: oklch(0.45 0.05 250); border: 1px dashed oklch(0.72 0.03 250); }
.badge-closed { background: oklch(0.75 0.02 40 / 0.15); color: oklch(0.45 0.02 40); }

/* Test case table (QA case study) */
.tc-table { width: 100%; border-collapse: collapse; margin: 8px 0 0; }
.tc-table th, .tc-table td { text-align: left; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid oklch(0.93 0.01 75); vertical-align: top; }
.tc-table th { font-family: var(--font-heading); font-weight: 700; color: var(--color-text-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.tc-table td { color: var(--color-text-muted); line-height: 1.5; }
.tc-table tr:last-child td { border-bottom: none; }
.tc-id { font-family: var(--font-heading); font-weight: 700; color: var(--color-text); white-space: nowrap; }

/* Bug report card (QA case study) */
.bug-card { background: #fff; border-radius: 18px; padding: 26px 28px; box-shadow: 0 14px 28px -18px var(--color-shadow); margin-top: 16px; }
.bug-card:first-child { margin-top: 0; }
.bug-title { font-family: var(--font-heading); font-weight: 700; font-size: 16px; margin: 0 0 6px; }
.bug-meta { font-size: 13px; color: var(--color-text-faint); margin: 0 0 4px; }
.bug-steps { font-size: 14px; color: var(--color-text-muted); line-height: 1.7; margin: 10px 0; padding-left: 20px; }
.bug-result-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.bug-result-row > div { font-size: 13px; }
.bug-result-row strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-faint); margin-bottom: 4px; }
@media (max-width: 640px) { .bug-result-row { grid-template-columns: 1fr; } .tc-table { display: block; overflow-x: auto; } }

/* Project grid (QA page) */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.project-card {
  background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 16px 32px -18px oklch(0.2 0.02 40 / 0.18);
  display: block; text-decoration: none; color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover, .project-card:focus-visible { transform: translateY(-6px); box-shadow: 0 22px 40px -18px oklch(0.2 0.02 40 / 0.28); }
.project-thumb {
  width: 100%; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  background: oklch(0.95 0.01 75); border-bottom: 2px dashed oklch(0.85 0.02 75);
  color: var(--color-text-faint); font-size: 13px; text-align: center; padding: 12px;
  overflow: hidden;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.project-thumb:has(img) { border-bottom: none; padding: 0; background: none; }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-body { padding: 20px; }
.project-title { font-family: var(--font-heading); font-weight: 700; font-size: 17px; color: var(--color-text); margin-bottom: 6px; }
.project-link { display: block; font-size: 14px; font-weight: 600; }

/* Page header with side image/gif (no frame) */
.page-header-flex { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-header-text { flex: 1 1 320px; min-width: 240px; }
.page-header-gif { flex: 0 0 auto; width: 200px; max-width: 100%; height: auto; display: block; }

/* Video embed */
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; margin-top: 8px; background: oklch(0.1 0 0); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.video-grid .video-embed, .video-grid .video-embed-auto { margin-top: 0; }

/* Mixed-orientation video grid & Google Drive embeds (vertical + horizontal clips) — fixed height
   instead of a forced aspect-ratio, so a portrait clip isn't squeezed into
   a wide box. Drive's own player centers/letterboxes inside that height. */
.video-embed-auto {
  position: relative; width: 100%; height: 480px; border-radius: 16px; overflow: hidden;
  background: oklch(0.1 0 0); display: flex; align-items: center; justify-content: center;
  margin-top: 14px;
}
.video-embed-auto iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Home page */
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 28px 48px; }
.nav-brand { font-family: var(--font-heading); font-weight: 800; font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-link { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--color-text); }
.nav-link:hover { text-decoration: underline; }
.btn-cv {
  text-decoration: none; font-size: 14px; font-weight: 700; color: #fff; background: var(--color-accent);
  padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 10px 24px -10px oklch(0.2 0.02 40 / 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-cv:hover, .btn-cv:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 28px -10px oklch(0.2 0.02 40 / 0.6); }

.btn-github {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 14px; font-weight: 700; color: #fff; background: #171515;
  padding: 10px 18px; border-radius: 10px;
  box-shadow: 0 10px 24px -10px oklch(0.2 0.02 40 / 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-github svg { width: 16px; height: 16px; fill: #fff; flex: 0 0 auto; }
.btn-github:hover, .btn-github:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 28px -10px oklch(0.2 0.02 40 / 0.6); }

.hero { display: flex; align-items: center; gap: 56px; max-width: 1100px; margin: 24px auto 64px; padding: 0 48px; flex-wrap: wrap; }
.hero-text { flex: 1 1 380px; min-width: 280px; }
.hero-text h1 { font-family: var(--font-heading); font-weight: 800; font-size: 56px; line-height: 1.08; margin: 0 0 20px; }
.hero-text p { font-size: 19px; line-height: 1.6; color: oklch(0.45 0.02 40); margin: 0 0 28px; max-width: 460px; }
/* Darkened from 0.5 to clear WCAG AA 4.5:1 (was 4.45:1) — see qa-lighthouse.html */
.hero-hint { font-size: 15px; font-weight: 600; color: oklch(0.46 0.17 25); }
.wave { display: inline-block; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero-photo { flex: 0 0 auto; width: 260px; height: 260px; border-radius: 50%; overflow: hidden; border: 6px solid #fff; box-shadow: 0 20px 40px -12px oklch(0.2 0.02 40 / 0.25); background: oklch(0.9 0.02 75); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; padding: 0 48px 80px; }
.nav-card {
  text-decoration: none; color: inherit; display: block; border-radius: 28px; padding: 36px;
  position: relative; min-height: 180px; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-card:hover { transform: translateY(-6px); box-shadow: 0 20px 36px -14px var(--card-glow); }
.nav-card-title { font-family: var(--font-heading); font-weight: 700; font-size: 28px; margin-bottom: 10px; }
.nav-card-desc { font-size: 16px; max-width: 280px; }
.nav-card-arrow { position: absolute; right: 32px; bottom: 28px; font-size: 24px; }

/* Creative Work card — gradient background needs a two-tone glow to match, a single --card-glow can't represent both hues */
.nav-card.nav-card-creative:hover, .nav-card.nav-card-creative:focus-visible {
  box-shadow: 0 20px 36px -18px oklch(0.68 0.17 320 / 0.55), 0 20px 36px -18px oklch(0.76 0.15 55 / 0.45);
}

/* Featured card — used for QA on the home grid so it reads first */
.nav-card-featured { grid-column: 1 / -1; min-height: 260px; padding: 56px; }
.nav-card-featured .nav-card-title { font-size: 42px; }
.nav-card-featured .nav-card-desc { font-size: 18px; max-width: 460px; }
.nav-card-featured .nav-card-arrow { font-size: 30px; }

.home-footer { text-align: center; padding: 24px; font-size: 13px; color: var(--color-text-faint); }

@media (max-width: 640px) {
  .page-header { padding: 36px 24px 56px; }
  .page-header h1 { font-size: 36px; }
  .page-header-flex { gap: 16px; justify-content: center; }
  .page-header-gif { margin: 8px auto 0; }
  .content { padding: 0 20px 60px; }
  .intro-card, .content-card { padding: 28px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr; }
  .video-embed-auto { height: 380px; }
  .navbar { padding: 20px 24px; }
  .hero { padding: 0 24px; gap: 32px; }
  .hero-text h1 { font-size: 38px; }
  .card-grid { grid-template-columns: 1fr; padding: 0 24px 60px; }
  .nav-card-featured { padding: 36px; min-height: auto; }
  .nav-card-featured .nav-card-title { font-size: 30px; }
  .nav-card-featured .nav-card-desc { font-size: 16px; }
}

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

/* ==========================================================================
   Added for the QA-first rebuild. Everything below reuses the tokens above —
   no new colors, no new fonts.
   ========================================================================== */

/* Evidence stats — real counts, shown where a recruiter looks first */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: #fff; border-radius: 18px; padding: 22px 24px;
  box-shadow: 0 14px 28px -20px var(--color-shadow);
}
.stat-num {
  font-family: var(--font-heading); font-weight: 800; font-size: 34px;
  line-height: 1.05; color: var(--color-accent-text); margin-bottom: 6px;
}
.stat-label { font-size: 13px; line-height: 1.45; color: var(--color-text-muted); }

/* Toolkit — grouped, because "which layer does this tool live at" is the point */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tool-group {
  background: #fff; border-radius: 18px; padding: 24px 26px;
  box-shadow: 0 14px 28px -20px var(--color-shadow);
}
.tool-group h4 {
  font-family: var(--font-heading); font-weight: 700; font-size: 15px;
  margin: 0 0 4px; color: var(--color-text);
}
.tool-group .tool-note { font-size: 13px; color: var(--color-text-faint); margin: 0 0 14px; line-height: 1.5; }
.tool-group .tag-row { gap: 8px; }
.tool-group .tag { font-size: 12.5px; padding: 6px 12px; }

/* Process — numbered steps, the cheapest proof of test-design thinking */
.process-list { display: flex; flex-direction: column; gap: 2px; }
.process-step { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid oklch(0.93 0.01 75); }
.process-step:last-child { border-bottom: none; }
.process-num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-accent-soft); color: var(--color-accent-text);
  font-family: var(--font-heading); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.process-body { flex: 1; min-width: 0; }
.process-body h4 { font-family: var(--font-heading); font-weight: 700; font-size: 16px; margin: 4px 0 6px; }
.process-body p { font-size: 14.5px; line-height: 1.6; color: var(--color-text-muted); margin: 0; }

/* Lead paragraph under a section title */
.section-lead { font-size: 15px; line-height: 1.65; color: var(--color-text-muted); margin: -4px 0 18px; max-width: 640px; }

/* Learning / certification rows */
.track-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid oklch(0.93 0.01 75); }
.track-row:last-child { border-bottom: none; }
.track-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--color-text-soft); }
.track-detail { font-size: 13.5px; color: var(--color-text-muted); }

/* Contact card */
.contact-card {
  background: var(--color-accent); border-radius: 24px; padding: 40px;
  box-shadow: 0 20px 40px -20px var(--color-shadow);
}
.contact-card h3 { font-family: var(--font-heading); font-weight: 800; font-size: 28px; margin: 0 0 10px; color: #fff; }
.contact-card p { font-size: 16px; line-height: 1.65; color: #fff; margin: 0 0 24px; max-width: 480px; }  /* no opacity: 4.71:1 on the accent */
.contact-card .btn-primary { background: #fff; color: var(--color-accent-text); }
.contact-card .btn-secondary { background: oklch(0 0 0 / 0.18); color: #fff; }  /* darkened: white text 6.46:1 */

/* In-page jump links (the "See the case studies" button) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#case-studies { scroll-margin-top: 24px; }

/* Drawn project covers — a designed cover reads as finished; a placeholder reads as abandoned */
.project-thumb:has(svg) { border-bottom: none; padding: 0; background: none; }
.project-thumb svg { width: 100%; height: 100%; display: block; }

@media (max-width: 860px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stat { padding: 18px 20px; }
  .stat-num { font-size: 28px; }
  .contact-card { padding: 28px; }
  .contact-card h3 { font-size: 23px; }
}

/* ==========================================================================
   Home rebuild — product design + technical writing + QA in one grid.
   Same tokens as above; the three discipline hues already existed on the site
   (UX magenta 320, QA teal 175, brand accent 25 now used for writing).
   ========================================================================== */

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

a.hero-hint { display: inline-block; text-decoration: none; }
a.hero-hint:hover, a.hero-hint:focus-visible { text-decoration: underline; }

.home-section { max-width: 1100px; margin: 0 auto; padding: 0 48px 80px; }
#work { scroll-margin-top: 24px; }
.home-section-title { font-family: var(--font-heading); font-weight: 800; font-size: 34px; margin: 0 0 10px; }

/* Filter bar — toggle buttons (aria-pressed), revealed by filters.js so no-JS visitors see every card */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.filter-btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  background: #fff; color: var(--color-text-soft);
  border: 1.5px solid oklch(0.88 0.02 75);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-btn:hover { border-color: var(--color-accent); }
.filter-btn[aria-pressed="true"] { background: var(--color-accent-text); border-color: var(--color-accent-text); color: #fff; }
.filter-btn:focus-visible, .project-card:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

/* Grid — auto-fill (not auto-fit) so a filtered row of 2 keeps normal card width */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.project-card[hidden] { display: none !important; }
.project-body h3.project-title { margin: 0 0 6px; }
.project-desc { font-size: 14px; line-height: 1.55; color: var(--color-text-muted); margin: 0 0 12px; }
.work-grid .project-link { color: var(--color-accent-text); }

/* Discipline chips */
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chip { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em; }
.chip-ux { background: oklch(0.68 0.17 320 / 0.13); color: oklch(0.42 0.13 320); }
.chip-writing { background: var(--color-accent-soft); color: var(--color-accent-text); }
.chip-qa { background: oklch(0.72 0.13 175 / 0.15); color: oklch(0.4 0.1 175); }

@media (max-width: 640px) {
  .home-section { padding: 0 24px 60px; }
  .home-section-title { font-size: 28px; }
  .work-grid { grid-template-columns: 1fr; }
}

/* Navbar on small phones — keep the brand on one line and the buttons from squashing */
.nav-brand, .btn-cv, .btn-github, .nav-link { white-space: nowrap; }
@media (max-width: 480px) {
  .navbar { padding: 18px 16px; gap: 10px; }
  .nav-brand { font-size: 17px; }
  .nav-links { gap: 10px; }
  .btn-github { padding: 9px 12px; }
  .btn-cv { padding: 9px 12px; }
}

/* ==========================================================================
   Multi-discipline case study (Time Keeper first). Same tokens; chips and
   .filter-btn come from the home rebuild above.
   ========================================================================== */

.case-header-cta { margin-top: 24px; }
.btn.case-cta { background: #fff; color: oklch(0.42 0.13 320); }
.btn.case-cta:hover, .btn.case-cta:focus-visible { box-shadow: 0 10px 24px -10px oklch(0.2 0.02 40 / 0.45); }

.case-overview > * + * { margin-top: 20px; }
.case-meta { display: grid; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--color-text-muted); }
.case-meta__label {
  display: block; font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-soft);
}
.process-body h4 .chip { margin-left: 6px; vertical-align: 2px; }
.case-stats .stat-label { font-size: 13px; }

/* Sticky discipline tabs */
.case-tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 36px -12px 8px; padding: 14px 12px;
  background: var(--color-bg);
  border-bottom: 1px solid oklch(0.92 0.01 75);
}

.discipline-group { margin-top: 28px; }
.discipline-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 0 4px; }
.discipline-head h2 { font-family: var(--font-heading); font-weight: 800; font-size: 30px; line-height: 1.2; margin: 0; }
.discipline-head .chip { font-size: 12px; padding: 5px 12px; }

.persona-card { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.persona-card .content-card p, .persona-card p { margin: 0; flex: 1 1 240px; }
.persona-card__img { max-width: 130px; margin: 0; flex: 0 0 auto; }

.subhead { font-family: var(--font-heading); font-weight: 700; font-size: 17px; margin: 28px 0 10px; }
.change-list { margin: 0 0 28px; padding-left: 20px; font-size: 16px; line-height: 1.65; color: oklch(0.35 0.02 40); }
.change-list li + li { margin-top: 8px; }
figure.case-figure { margin-left: 0; margin-right: 0; }

.draft-note { border: 2px dashed oklch(0.85 0.02 75); box-shadow: none; background: transparent; }
.draft-note p { margin: 0; font-size: 15px; color: var(--color-text-muted); }

@media (max-width: 640px) {
  .case-tabs { margin: 28px -8px 8px; padding: 12px 8px; }
  .discipline-head h2 { font-size: 24px; }
}
.process-body a, .content-card p a, .change-list a { color: var(--color-accent-text); font-weight: 600; }
.process-body a:hover, .content-card p a:hover { text-decoration-thickness: 2px; }

/* ==========================================================================
   Technical writing samples — context notes, help-center frames, callouts.
   ========================================================================== */

.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline: 3px solid var(--color-accent-text); outline-offset: 2px; border-radius: 8px; }
.subhead--first { margin-top: 0; }
.content-card .tc-table a { color: var(--color-accent-text); font-weight: 600; }

/* Context note that opens every sample */
.doc-context {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px;
  margin: 0 0 16px; padding: 20px 24px; border-radius: 18px;
  background: var(--color-accent-soft);
}
.doc-context div { min-width: 0; }
.doc-context__wide { grid-column: 1 / -1; }
.doc-context dt {
  font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-accent-text); margin-bottom: 3px;
}
.doc-context dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--color-text-soft); }

/* Help-center frame: reads like a published help page, not a screenshot */
.doc-frame {
  background: #fff; border-radius: 20px; padding: 32px 36px;
  border: 1px solid oklch(0.92 0.01 75); box-shadow: 0 20px 40px -24px var(--color-shadow);
  font-size: 16px; line-height: 1.65; color: oklch(0.3 0.02 40);
}
.doc-frame p { margin: 0 0 14px; }
.doc-frame ul, .doc-frame ol { margin: 0 0 16px; padding-left: 22px; }
.doc-frame li + li { margin-top: 6px; }
.doc-frame a { color: var(--color-accent-text); font-weight: 600; }
.doc-breadcrumb { font-size: 13px !important; color: var(--color-text-faint); margin-bottom: 6px !important; }
.doc-title { font-family: var(--font-heading); font-weight: 800; font-size: 26px; line-height: 1.2; color: var(--color-text); margin: 0 0 12px; }
.doc-h { font-family: var(--font-heading); font-weight: 700; font-size: 17px; color: var(--color-text); margin: 24px 0 8px; }

/* Numbered steps with a picture under the step it belongs to */
.doc-steps { list-style: none; counter-reset: step; padding-left: 0 !important; }
.doc-steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-top: 18px !important; }
.doc-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent-soft); color: var(--color-accent-text);
  font-family: var(--font-heading); font-weight: 800; font-size: 14px;
}
.doc-steps > li > p { margin-bottom: 10px; }
.doc-shot {
  display: block; width: 100%; max-width: 344px; height: auto;
  border-radius: 14px; box-shadow: 0 12px 28px -16px oklch(0.2 0.02 40 / 0.35);
}
.doc-shot--wide { max-width: 440px; }

/* Callouts */
.doc-callout { border-radius: 12px; padding: 14px 18px; margin: 16px 0; border-left: 4px solid; }
.doc-callout p { margin: 0; font-size: 15px; }
.doc-callout strong:first-child { margin-right: 6px; }
.doc-callout--note { background: oklch(0.95 0.02 250); border-color: oklch(0.55 0.12 250); }
.doc-callout--tip { background: oklch(0.95 0.03 175); border-color: oklch(0.55 0.1 175); }
.doc-callout--important { background: oklch(0.96 0.04 85); border-color: oklch(0.65 0.14 70); }

/* Troubleshooting entries */
.doc-problem + .doc-problem { border-top: 1px solid oklch(0.93 0.01 75); margin-top: 8px; }

/* Single-source demo: conditional blocks and the audience switch */
.audience-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.audience-switch__label { font-size: 14px; font-weight: 600; color: var(--color-text-soft); margin-right: 4px; }
.doc-cond { position: relative; margin: 20px 0 0; padding: 18px 20px 4px; border: 2px dashed oklch(0.85 0.05 25); border-radius: 14px; }
.doc-cond .doc-h { margin-top: 4px; }
.doc-cond__tag {
  position: absolute; top: -11px; left: 14px; padding: 2px 10px; border-radius: 999px;
  background: var(--color-accent-text); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* Product pills, same values as the prototype */
.tk-pill { display: inline-block; white-space: nowrap; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.tk-pill--notstarted { background: #f2f4f5; color: #475467; box-shadow: inset 0 0 0 1px #e7ebec; }
.tk-pill--progress { background: #dbeafe; color: #1e40af; }
.tk-pill--stuck { background: #fee2e2; color: #991b1b; }
.tk-pill--done { background: #d1fae5; color: #065f46; }
.tk-pill--high { background: #ffe4d5; color: #9a3412; }
.tk-pill--medium { background: #fef3c7; color: #92400e; }
.tk-pill--low { background: #e2e8f0; color: #334155; }

/* API reference samples: endpoint headings, method labels, code blocks */
.api-endpoint {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 28px 0 10px; padding-top: 20px; border-top: 1px solid oklch(0.93 0.01 75);
}
.api-endpoint:first-of-type { border-top: 0; padding-top: 0; }
.api-endpoint code { font: 600 16px/1.4 ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; color: var(--color-text); background: none; padding: 0; }
.api-method { font: 700 12px/1 var(--font-body); letter-spacing: 0.03em; padding: 6px 9px; border-radius: 6px; }
.api-method--get { background: #d8f3ea; color: #0b5e47; }
.api-method--post { background: #dbe8fb; color: #1d4b8f; }
.api-method--put { background: #fbecc8; color: #7a4a06; }
.api-method--delete { background: #fbe0dc; color: #93261a; }
.doc-code {
  margin: 10px 0 18px; padding: 16px 18px; border-radius: 12px; overflow-x: auto;
  background: #1e2624; color: #e7ece9; font: 13.5px/1.6 ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  white-space: pre; tab-size: 2;
}
.doc-code__label {
  display: block; margin: 16px 0 -4px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-faint);
}
.doc-frame .tc-table code, .doc-frame p code, .doc-frame li code {
  font: 0.9em ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  background: oklch(0.95 0.01 75); padding: 1px 5px; border-radius: 4px; color: oklch(0.3 0.02 40);
}

@media (max-width: 640px) {
  .doc-context { grid-template-columns: 1fr; padding: 18px; }
  .doc-frame { padding: 24px 20px; }
  .doc-title { font-size: 22px; }
  .doc-steps > li { padding-left: 40px; }
}

/* Doc tables on phones: keep columns readable and let the wrapper scroll sideways */
@media (max-width: 640px) {
  .table-wrap .tc-table { display: table; min-width: 560px; }
  .table-wrap { margin: 0 -8px; padding: 0 8px; }
}

/* Back-to-top button (see back-to-top.js) */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 20;
  width: 52px; height: 52px; border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent-text); color: #fff;
  box-shadow: 0 14px 28px -10px oklch(0.2 0.02 40 / 0.5);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
h1[tabindex="-1"]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
@media (max-width: 640px) { .back-to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; } }

/* ==========================================================================
   QA samples — scope, evidence (before/after), grouped test cases.
   ========================================================================== */
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.scope-label { font-family: var(--font-heading); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-soft); margin: 0 0 8px !important; }
.scope-grid .change-list { margin-bottom: 12px; font-size: 15px; }

.bug-card { margin-top: 16px; }
.bug-fix { font-size: 14.5px; line-height: 1.6; color: var(--color-text-muted); margin: 14px 0 0; }
.bug-fix a { color: var(--color-accent-text); font-weight: 600; }

.evidence-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 16px; }
.evidence-row--stack { flex-direction: column; }
.evidence { position: relative; margin: 0; flex: 0 1 auto; max-width: 100%; }
.evidence img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid oklch(0.92 0.01 75); }
.evidence__tag {
  display: inline-block; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: oklch(0.75 0.02 40 / 0.15); color: oklch(0.42 0.02 40);
}
.evidence__tag--fixed { background: oklch(0.72 0.13 175 / 0.15); color: oklch(0.4 0.1 175); }

.qa-stats { margin: 0 0 18px; }
.qa-group { background: #fff; border-radius: 18px; box-shadow: 0 14px 28px -20px var(--color-shadow); margin-top: 12px; }
.qa-group > summary {
  cursor: pointer; list-style: none; padding: 18px 24px;
  font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: var(--color-text);
  display: flex; align-items: center; gap: 10px;
}
.qa-group > summary::-webkit-details-marker { display: none; }
.qa-group > summary::before { content: "▸"; color: var(--color-accent-text); transition: transform 0.15s ease; }
.qa-group[open] > summary::before { transform: rotate(90deg); }
.qa-group > summary:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -3px; border-radius: 18px; }
.qa-group__count { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--color-text-muted); }
.qa-group .table-wrap { padding: 0 24px 18px; }
.content-card code { font-size: 0.92em; background: oklch(0.95 0.01 75); padding: 1px 6px; border-radius: 5px; }

@media (max-width: 640px) {
  .scope-grid { grid-template-columns: 1fr; }
  .qa-group > summary { padding: 16px 18px; }
  .qa-group .table-wrap { padding: 0 12px 14px; }
}
