/* ==========================================================================
   Vy Nguyen — portfolio
   Hand-written design system. Structure:
     1. Tokens (light + dark)
     2. Base & typography
     3. Utilities
     4. Header & nav
     5. Hero (copy, pipeline, deck, stats)
     6. Sections & shared blocks
     7. About
     8. Projects & filters
     9. Skills
    10. Timeline
    11. Credentials
    12. Contact & form
    13. Footer
    14. Case-study dialog
    15. Toast, standalone page
    16. Motion & reduced-motion
   ========================================================================== */

/* ------------------------------ 1. TOKENS ------------------------------ */
:root {
  /* palette — "iron ore & ink": warm paper neutrals + ochre accent */
  --bg: #FAF6F0;
  --bg-alt: #F4EEE4;
  --surface: #FFFFFF;
  --surface-2: #FFFDF9;
  --ink: #221D16;
  --ink-2: #5C544A;
  --ink-3: #756D5F; /* 4.7:1 on --bg — keeps small labels WCAG AA */
  --line: #E6DCCC;
  --line-strong: #D5C8B2;

  --accent: #B4530A;
  --accent-strong: #93430B;
  --accent-soft: rgba(180, 83, 10, 0.10);
  --accent-softer: rgba(180, 83, 10, 0.055);
  --on-accent: #FFF8F0;
  --ok: #3D7A48;
  --danger: #B3261E;

  --dot: rgba(140, 110, 70, 0.16);

  --shadow-sm: 0 1px 2px rgba(46, 32, 18, 0.05), 0 2px 8px rgba(46, 32, 18, 0.05);
  --shadow-md: 0 2px 6px rgba(46, 32, 18, 0.06), 0 14px 34px -10px rgba(46, 32, 18, 0.16);
  --shadow-lg: 0 4px 10px rgba(46, 32, 18, 0.07), 0 28px 60px -18px rgba(46, 32, 18, 0.28);

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "SF Mono", monospace;

  /* layout */
  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-pad: clamp(4.5rem, 9vw, 7.5rem);
  --header-h: 64px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #171310;
  --bg-alt: #1D1813;
  --surface: #221C15;
  --surface-2: #29221A;
  --ink: #EFE7DA;
  --ink-2: #B5A991;
  --ink-3: #948871; /* 5.2:1 on dark --bg — keeps small labels WCAG AA */
  --line: #352C21;
  --line-strong: #4A3E2E;

  --accent: #E08A3C;
  --accent-strong: #EDA45F;
  --accent-soft: rgba(224, 138, 60, 0.14);
  --accent-softer: rgba(224, 138, 60, 0.07);
  --on-accent: #241505;
  --ok: #7FB889;
  --danger: #E6867F;

  --dot: rgba(224, 138, 60, 0.10);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3), 0 14px 34px -10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.32), 0 28px 60px -18px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 2.6vw + 1rem, 2.75rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

img, svg { max-width: 100%; display: block; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

::selection { background: var(--accent); color: var(--on-accent); }

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

section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ------------------------------ 3. UTILITIES ------------------------------ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-64px);
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.skip-link:focus-visible {
  transform: none;
  opacity: 1;
  color: var(--bg);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ------------------------------ BUTTONS ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
              color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-softer);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-softer); }

.btn-small { padding: 0.45rem 0.85rem; font-size: 0.85rem; border-radius: 8px; }

.btn-text {
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-text svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease); }
.btn-text:hover svg { transform: translateX(4px); }

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-link:hover { color: var(--accent-strong); border-color: var(--line); background: var(--surface); transform: translateY(-2px); }

/* ------------------------------ 4. HEADER ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.35s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.scroll-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.brand-bg { fill: var(--ink); transition: fill 0.35s var(--ease); }
.brand-bar { fill: var(--accent); }
.brand-name { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--accent-softer); }
.nav-link.is-active { color: var(--accent-strong); }
.nav-link.is-active:hover { color: var(--accent-strong); }
.nav-cv-item { margin-left: 0.5rem; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--accent-strong); border-color: var(--line); background: var(--surface); }
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease);
}
:root[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
:root[data-theme="light"] .icon-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="dark"] .icon-moon { opacity: 1; transform: none; }

.nav-burger {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.nav-burger:hover { border-color: var(--line); background: var(--surface); }
.nav-burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-burger span:first-child { top: 15px; }
.nav-burger span:last-child { top: 23px; }
.nav-burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-burger { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-link { padding: 0.8rem 0.75rem; font-size: 1.05rem; }
  .nav-cv-item { margin: 0.5rem 0 0; }
  .nav-cv-item .btn { width: 100%; justify-content: center; padding: 0.8rem; font-size: 0.95rem; }
}

/* ------------------------------ 5. HERO ------------------------------ */
.hero {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1.2px, transparent 0);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 20%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 70% 20%, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.6rem, 4.6vw + 1rem, 4.3rem);
  line-height: 1.04;
  margin-bottom: 1.25rem;
}
.hero-em {
  font-style: normal;
  color: var(--accent-strong);
  background: linear-gradient(transparent 68%, var(--accent-soft) 68%);
  border-radius: 2px;
  padding-inline: 0.05em;
}

.hero-lede {
  font-size: clamp(1.05rem, 1.1vw + 0.8rem, 1.2rem);
  color: var(--ink-2);
  max-width: 54ch;
  margin-bottom: 1.75rem;
}

/* pipeline */
.pipeline { margin-bottom: 2rem; }
.pipe-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.3rem;
}
.pipe-arrow { color: var(--ink-3); font-size: 0.85rem; user-select: none; }
.pipe-step {
  position: relative;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease),
              color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.pipe-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.25s var(--ease);
}
.pipe-step.is-lit,
.pipe-step:hover,
.pipe-step[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-softer);
}
.pipe-step.is-lit .pipe-label,
.pipe-step:hover .pipe-label,
.pipe-step[aria-expanded="true"] .pipe-label { color: var(--accent-strong); }

.pipe-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: max-content;
  max-width: 250px;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.pipe-step:hover .pipe-tip,
.pipe-step:focus-visible .pipe-tip,
.pipe-step[aria-expanded="true"] .pipe-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.pipe-step:first-child .pipe-tip { left: 0; transform: translateX(0) translateY(-4px); }
.pipe-step:first-child:hover .pipe-tip,
.pipe-step:first-child:focus-visible .pipe-tip,
.pipe-step:first-child[aria-expanded="true"] .pipe-tip { transform: translateX(0) translateY(0); }

.pipe-caption {
  margin: 0.8rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.hero-social { display: flex; gap: 0.25rem; margin-left: 0.25rem; }

/* deck */
.hero-visual { position: relative; }
.deck {
  position: relative;
  height: clamp(360px, 40vw, 460px);
  perspective: 1200px;
}
.deck-card {
  position: absolute;
  width: min(330px, 88%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.2rem 1.2rem;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
}
.deck-card--req { top: 2%; left: 0; rotate: -5deg; z-index: 1; }
.deck-card--sql { top: 18%; right: 0; rotate: 3.5deg; z-index: 2; }
.deck-card--dash { bottom: 0; left: 10%; rotate: -1.5deg; z-index: 3; }

.deck-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-bottom: 0.8rem;
}
.deck-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.deck-req {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.deck-req li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.req-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}
.req-tick { margin-left: auto; color: var(--ok); font-weight: 600; }

.deck-chip {
  margin-top: 0.9rem;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

.deck-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-2);
  overflow: hidden;
}
.deck-code .c { color: var(--ink-3); }

/* deck idle float */
@media (prefers-reduced-motion: no-preference) {
  .deck-card--req { animation: float-a 7s ease-in-out infinite; }
  .deck-card--sql { animation: float-b 8.5s ease-in-out infinite; }
  .deck-card--dash { animation: float-c 7.6s ease-in-out infinite; }
}
@keyframes float-a { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes float-b { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes float-c { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; gap: 0.2rem; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.4vw + 0.8rem, 2.7rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; max-width: 480px; }
  .deck { height: clamp(320px, 78vw, 420px); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------ 6. SECTIONS ------------------------------ */
.section { padding-block: var(--section-pad); }
.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
  transition: background-color 0.35s var(--ease);
}
.section--last { border-bottom: 0; }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); max-width: 640px; }
.section-head h2 { margin-bottom: 0.5rem; }
.section-sub { color: var(--ink-2); font-size: 1.05rem; max-width: 56ch; margin: 0; }

.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip-list li {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip-list li:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ------------------------------ 7. ABOUT ------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-story p:not(.about-now) {
  font-size: 1.06rem;
  color: var(--ink-2);
  margin-bottom: 1.25em;
}
.about-story p:first-child::first-line { color: var(--ink); }

.about-now {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.9rem 1.1rem;
  margin-top: 1.75rem;
}
.about-now strong { color: var(--ink); }
.now-dot {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ok);
  align-self: center;
}
@media (prefers-reduced-motion: no-preference) {
  .now-dot { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 122, 72, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(61, 122, 72, 0); }
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.strength-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.4rem 1.4rem 1.2rem;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.strength-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.strength-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.strength-card:hover::before { transform: scaleX(1); }
.strength-card h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.strength-card p { font-size: 0.9rem; color: var(--ink-2); margin: 0; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .about-cards { grid-template-columns: 1fr; }
}

/* ------------------------------ 8. PROJECTS ------------------------------ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-chip {
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.filter-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
              border-color 0.28s var(--ease), opacity 0.24s var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.project-card--featured { grid-column: 1 / -1; }
.project-card.is-hiding { opacity: 0; transform: scale(0.98); }
.project-card.is-hidden { display: none; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
}
.tag--accent {
  color: var(--accent-strong);
  border-color: transparent;
  background: var(--accent-soft);
}

.project-title { font-size: clamp(1.4rem, 2vw, 1.8rem); margin-bottom: 0.2rem; }
.project-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-strong);
  margin-bottom: 0.9rem;
}
.project-summary { color: var(--ink-2); max-width: 68ch; margin-bottom: 1.1rem; }
.project-card--featured .project-summary { font-size: 1.02rem; }

.metric-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.4rem;
  padding: 0;
}
.metric-chips li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.24rem 0.55rem;
  font-variant-numeric: tabular-nums;
}

.project-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.projects-more { margin: 2rem 0 0; color: var(--ink-2); font-size: 0.95rem; }

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

/* ------------------------------ 9. SKILLS ------------------------------ */
.skills-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.skill-group:hover { border-color: var(--line-strong); }
.skill-group.is-open { border-color: var(--accent); box-shadow: var(--shadow-sm); }

.skill-head {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.3rem;
}
.skill-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.skill-group.is-open .skill-name { color: var(--accent-strong); }
.skill-desc { font-size: 0.88rem; color: var(--ink-3); }
.chev {
  width: 20px; height: 20px;
  fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.3s var(--ease), stroke 0.2s var(--ease);
}
.skill-group.is-open .chev { transform: rotate(180deg); stroke: var(--accent-strong); }

.skill-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.skill-group.is-open .skill-body { grid-template-rows: 1fr; }
.skill-body-inner { overflow: hidden; min-height: 0; padding-inline: 1.3rem; }
.skill-group.is-open .skill-body-inner { padding-bottom: 1.3rem; }

.skill-proof {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
}
.skill-proof strong { color: var(--accent-strong); font-weight: 600; }

@media (max-width: 640px) {
  .skill-head { grid-template-columns: 1fr auto; }
  .skill-desc { display: none; }
}

/* ------------------------------ 10. TIMELINE ------------------------------ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  max-width: 760px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  left: 7px;
  width: 2px;
  background: var(--line);
}
.tl-item {
  position: relative;
  padding: 0 0 2.25rem 2.5rem;
}
.tl-item:last-of-type { padding-bottom: 0.5rem; }
.tl-marker {
  position: absolute;
  top: 6px; left: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--line-strong);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.tl-item:hover .tl-marker { border-color: var(--accent); transform: scale(1.15); }
.tl-item[data-kind="milestone"] .tl-marker { background: var(--accent); border-color: var(--accent); }

.tl-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.tl-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  background: var(--surface);
}
.tl-tag--accent { color: var(--accent-strong); border-color: transparent; background: var(--accent-soft); }

.tl-item h3 { font-size: 1.18rem; margin-bottom: 0.3rem; }
.tl-item > .tl-content > p { color: var(--ink-2); font-size: 0.96rem; margin-bottom: 0.5rem; max-width: 62ch; }

.tl-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.tl-more::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease);
}
.tl-more[aria-expanded="true"]::after { transform: rotate(225deg) translateY(-1px); }

.tl-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.tl-detail > ul {
  overflow: hidden;
  min-height: 0;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.tl-detail.is-open { grid-template-rows: 1fr; }
.tl-detail.is-open > ul { margin-top: 0.6rem; }
.tl-detail li { margin-bottom: 0.4rem; }
.tl-detail li::marker { color: var(--accent); }

.tl-aside {
  max-width: 760px;
  margin-top: 2.5rem;
  background: var(--accent-softer);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1.25rem 1.5rem;
}
.tl-aside p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* ------------------------------ 11. CREDENTIALS ------------------------------ */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.cred-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cred-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.cred-card h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.cred-card p { color: var(--ink-2); font-size: 0.94rem; margin-bottom: 0.5rem; }
.cred-card p:last-child { margin-bottom: 0; }

.cred-card--cv {
  border-color: var(--accent);
  background: linear-gradient(140deg, var(--accent-softer), var(--surface) 55%);
}
.cred-card--cv .btn { margin-top: 0.5rem; }
.cv-buttons { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; }
.cred-note { font-size: 0.8rem !important; color: var(--ink-3) !important; margin: 0.8rem 0 0 !important; }

.cred-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin-bottom: 0.8rem !important;
}
.cred-mono {
  font-family: var(--font-mono);
  font-size: 0.8rem !important;
  color: var(--ink-2) !important;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  display: inline-block;
}
.cred-stack { margin-top: 1.1rem; }

.cred-edu { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.cred-edu li { display: grid; gap: 0.1rem; }
.cred-edu strong { font-size: 0.97rem; color: var(--ink); }
.cred-edu span { font-size: 0.85rem; color: var(--ink-3); }

.cred-card--wide { grid-column: 1 / -1; }
.toolkit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.toolkit-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.7rem;
}

@media (max-width: 860px) {
  .cred-grid { grid-template-columns: 1fr; }
  .toolkit { grid-template-columns: 1fr; gap: 1.1rem; }
}

/* ------------------------------ 12. CONTACT ------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-copy .section-head { margin-bottom: 1.75rem; }

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.email-link {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.email-link:hover { color: var(--accent-strong); }

.contact-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.contact-meta { font-size: 0.88rem; color: var(--ink-3); margin: 0; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.35s var(--ease);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-3); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-status { margin: 0.9rem 0 0; font-size: 0.9rem; min-height: 1.4em; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--danger); }

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

/* ------------------------------ 13. FOOTER ------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2.75rem;
  background: var(--bg);
  transition: background-color 0.35s var(--ease);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 1.5rem 3rem;
  align-items: start;
}
.footer-brand { display: flex; gap: 0.9rem; align-items: flex-start; }
.footer-brand .brand-mark { width: 34px; height: 34px; flex: none; margin-top: 2px; }
.footer-name { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.2rem; }
.footer-tag { font-size: 0.85rem; color: var(--ink-3); margin: 0; max-width: 44ch; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.footer-nav a {
  font-size: 0.88rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.25rem 0;
}
.footer-nav a:hover { color: var(--accent-strong); }

.footer-end {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}
.footer-end p { margin: 0; font-size: 0.85rem; color: var(--ink-3); }

.to-top {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--surface);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { color: var(--accent-strong); border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-sm); }

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

/* ------------------------------ 14. CASE DIALOG ------------------------------ */
.case-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: min(86vh, 900px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overscroll-behavior: contain;
}
.case-dialog::backdrop {
  background: rgba(22, 15, 8, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
@media (prefers-reduced-motion: no-preference) {
  .case-dialog[open] { animation: dialog-in 0.35s var(--ease); }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.case-dialog-frame {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.case-close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  z-index: 5;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.case-close:hover { color: var(--accent-strong); border-color: var(--accent); transform: rotate(90deg); }
.case-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.case h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; padding-right: 2.5rem; }
.case h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2rem 0 0.6rem;
}
.case p { color: var(--ink-2); }
.case .metric-chips { margin-bottom: 0.5rem; }

.case-list { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.case-list li { margin-bottom: 0.65rem; }
.case-list li::marker { color: var(--accent); }
.case-list strong { color: var(--ink); font-weight: 600; }

.case-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ------------------------------ 15. TOAST + STANDALONE ------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  z-index: 300;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.toast.is-shown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.standalone {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: var(--bg);
}
.standalone-card {
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.standalone-title { font-size: clamp(1.7rem, 4vw, 2.2rem); }
.standalone-text { color: var(--ink-2); margin-bottom: 1.75rem; }

/* ------------------------------ 16. MOTION ------------------------------ */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* gentle stagger for elements visible on load */
.hero-copy > .reveal:nth-child(2) { --reveal-delay: 0.07s; }
.hero-copy > .reveal:nth-child(3) { --reveal-delay: 0.14s; }
.hero-copy > .reveal:nth-child(4) { --reveal-delay: 0.21s; }
.hero-copy > .reveal:nth-child(5) { --reveal-delay: 0.28s; }
.hero-visual.reveal { --reveal-delay: 0.32s; }
.hero-stats.reveal { --reveal-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header, body, .section--alt { transition: none; }
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; }
}

/* ------------------------------ 17. IELTS PAGE ------------------------------ */
.band-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
  margin: 2rem 0 1.25rem;
}
.band-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.1rem 1.2rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.band-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.band-tile--hi { border-color: var(--accent); background: linear-gradient(150deg, var(--accent-softer), var(--surface) 60%); }
.band-tile--overall { border-color: var(--line-strong); background: var(--bg-alt); }
.band-tile-skill {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.45rem;
}
.band-tile-score {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.band-tile--hi .band-tile-score { color: var(--accent-strong); }
.band-tile-note {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.74rem;
  color: var(--ink-3);
}

.band-math {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ink-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 0.9rem 1.1rem;
  max-width: 640px;
}
.band-math strong { color: var(--accent-strong); font-weight: 500; }

/* gap bars */
.gap-list { display: grid; gap: 1.1rem; max-width: 640px; margin-top: 2rem; }
.gap-row { display: grid; grid-template-columns: 92px 1fr 84px; align-items: center; gap: 1rem; }
.gap-skill { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-2); }
.gap-track {
  position: relative;
  height: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.gap-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.85;
  transition: width 0.9s var(--ease);
}
.gap-row.is-met .gap-fill { opacity: 1; }
.gap-target {
  position: absolute;
  top: -5px; bottom: -5px;
  width: 2px;
  background: var(--ink-3);
  border-radius: 2px;
}
.gap-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.gap-row.is-met .gap-val { color: var(--ok); }

/* band small-multiple charts */
.bandcharts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.bandchart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.2rem 1.3rem 1rem;
}
.bandchart h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}
.bandchart svg { width: 100%; height: 110px; overflow: visible; display: block; }
.bc-grid { stroke: var(--line); stroke-width: 1; }
.bc-target { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 4; }
.bc-path { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bc-dot { fill: var(--accent); }
.bc-dot--official { stroke: var(--accent); stroke-width: 2; fill: var(--surface); }
.bc-label { font-family: var(--font-mono); font-size: 9px; fill: var(--ink-3); }
.bc-note { font-size: 0.78rem; color: var(--ink-3); margin: 0.5rem 0 0; }

.empty-note {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 1.1rem 1.3rem;
  color: var(--ink-2);
  font-size: 0.92rem;
  max-width: 640px;
}
.empty-note strong { color: var(--ink); }

.ielts-back { display: inline-flex; align-items: center; gap: 0.4rem; }

@media (max-width: 760px) {
  .band-tiles { grid-template-columns: repeat(2, 1fr); }
  .bandcharts { grid-template-columns: 1fr; }
  .gap-row { grid-template-columns: 76px 1fr 70px; gap: 0.6rem; }
}
