/* ==========================================================================
   Michaël St-Louis — portfolio
   Static, semantic, dependency-free stylesheet.
   Design system: custom-property tokens, fluid type via clamp(),
   automatic dark mode via prefers-color-scheme.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* ---- Structural constants ---- */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --wrap: 1140px;
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  /* ---- Fluid type scale (clamp: mobile-min, viewport-preferred, desktop-max) ---- */
  --fs-2xs: clamp(0.6875rem, 0.665rem + 0.11vw, 0.75rem);    /* ~11   → 12px  */
  --fs-xs:  clamp(0.75rem,   0.72rem  + 0.15vw, 0.8125rem);  /* ~12   → 13px  */
  --fs-sm:  clamp(0.8125rem, 0.775rem + 0.18vw, 0.90625rem); /* ~13   → 14.5px*/
  --fs-base:clamp(0.9375rem, 0.9rem   + 0.2vw,  1rem);       /* ~15   → 16px  */
  --fs-md:  clamp(1rem,      0.95rem  + 0.28vw, 1.09375rem); /* ~16   → 17.5px*/
  --fs-lg:  clamp(1.0625rem, 1rem     + 0.35vw, 1.1875rem);  /* ~17   → 19px  */
  --fs-xl:  clamp(1.125rem, 1.03rem   + 0.5vw,  1.3125rem);  /* ~18   → 21px  */
  --fs-2xl: clamp(1.25rem,  1.08rem   + 0.85vw, 1.5rem);     /* ~20   → 24px  */
  --fs-3xl: clamp(1.375rem, 1.1rem    + 1.2vw,  1.75rem);    /* ~22   → 28px  */
  --fs-4xl: clamp(1.75rem,  1.25rem   + 2.1vw,  2.25rem);    /* ~28   → 36px  */
  --fs-5xl: clamp(2rem,     1.35rem   + 2.9vw,  2.875rem);   /* ~32   → 46px  */
  --fs-6xl: clamp(2.5rem,   1.5rem    + 4.3vw,  3.375rem);   /* ~40   → 54px  */
  --fs-7xl: clamp(2.75rem,  1rem      + 7.8vw,  4.875rem);   /* ~44   → 78px  */

  /* ---- Light theme tokens (default) ---- */
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-tint: #F4F2EC;
  --surface-alt: #F4F3FF;
  --text: #16171A;
  --text-muted: #5A5C63;
  --text-soft: #4A4C53;
  --text-strong: #2A2C32;
  --border: #E7E3DA;
  --border-strong: #C5C0B6;
  --border-input: #CFCABD;

  --accent: #2f3bd6;
  --accent-soft: #8E97F2;
  --accent-tint: #E7E9FB;

  /* the deliberately "always dark" statement panels (project card, contact, footer CTA) */
  --ink: #16171A;
  --ink-card: #23242A;
  --ink-border: #2C2D31;
  --ink-muted: #C2C3CB;
  --ink-soft: #9DA0A8;
  --ink-faint: #7A7C82;

  --gold: #B8862A;
  --gold-soft: #E0B84A;
  --gold-bg: #F6EFE4;
  --gold-border: #EAD9B8;
  --gold-tint: #E5D6B4;
  --gold-ink: #7A5E22;
  --gold-ink-strong: #5A4A28;
  --gold-muted: #9A7A35;
  --gold-timeline: #B6A271;
  --gold-tag-bg: #F6ECD2;
  --gold-tag-border: #E7D4A6;
  --gold-tag-ink: #9A6B16;
  --meta-muted: #9A9586;

  --badge-neutral-bg: #EEEFF1;
  --badge-neutral-border: #DADCE0;

  --dot-pattern: #E2DED4;
  --dot-pattern-gold: #E9DCC2;

  --shadow-ambient: 22, 23, 26;   /* rgb triplet for rgba(var(--shadow-ambient), .18) */
  --shadow-ink: 8, 9, 14;
  --header-glass: 251, 250, 247;
  --status-live: #2ecc71;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1B1C20;
    --surface-tint: #212226;
    --surface-alt: #1E1F2A;
    --text: #F3F2ED;
    --text-muted: #ABAEB5;
    --text-soft: #C8CACF;
    --text-strong: #FFFFFF;
    --border: #2B2C30;
    --border-strong: #3D3F45;
    --border-input: #43454B;

    --accent: #8E97F2;
    --accent-soft: #B7BEFF;
    --accent-tint: rgba(142, 151, 242, .16);

    /* statement panels sit darker than the (now dark) page, with a hairline
       border for edge definition instead of the light-mode drop shadow */
    --ink: #08090B;
    --ink-card: #1B1C20;
    --ink-border: rgba(255, 255, 255, .09);
    --ink-muted: #C7C8CE;
    --ink-soft: #9DA0A8;
    --ink-faint: #8B8D93;

    --gold-bg: #221A0E;
    --gold-border: #3E3018;
    --gold-tint: #4A3A20;
    --gold-ink: #E6C27C;
    --gold-ink-strong: #E9CD93;
    --gold-muted: #D9AE5E;
    --gold-timeline: #C9A567;
    --gold-tag-bg: #33290F;
    --gold-tag-border: #4E3E1C;
    --gold-tag-ink: #E8C77A;
    --meta-muted: #8C816F;

    --badge-neutral-bg: #232427;
    --badge-neutral-border: #34363B;

    --dot-pattern: #232427;
    --dot-pattern-gold: #2C2314;

    --shadow-ambient: 0, 0, 0;
    --shadow-ink: 0, 0, 0;
    --header-glass: 17, 18, 20;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, p, dl, figure { margin: 0; }
::selection { background: var(--accent); color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ── Language toggle (pure CSS, no framework) ── */
html:not([lang="en"]) [lang="en"] { display: none; }
html[lang="en"] [lang="fr"] { display: none; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-base);
  z-index: 100;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ── Focus visibility ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Layout helpers ── */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 28px);
}
.section-pad { padding-block: clamp(48px, 7vw, 72px); }
.section-pad--tight { padding-block: clamp(32px, 5vw, 40px) 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-5xl);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.section-lede {
  font-size: var(--fs-xl);
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 620px;
}

/* ── Site header / nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--header-glass), .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease, background-color .25s ease, border-color .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 24px -8px rgba(var(--shadow-ambient), .12); }
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 12px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; border-radius: 9px; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  overflow-x: auto;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 0;
  transition: color .2s ease;
}
.primary-nav a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s ease;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a[aria-current="true"] { color: var(--text); }
.primary-nav a[aria-current="true"]::before { opacity: 1; }

.lang-toggle {
  font-family: var(--font-mono);
  background: transparent;
  border: 1px solid var(--border-input);
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease;
}
.lang-toggle:hover { border-color: var(--text); color: var(--text); }

.btn-contact {
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border: none;
  padding: 9px 17px;
  border-radius: 9px;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s ease;
}
.btn-contact:hover { background: var(--accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 11px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: var(--fs-lg);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 32px -8px rgba(47, 59, 214, .45); }
.btn--ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--border-input); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: var(--surface); transform: translateY(-3px); }
.btn--outline-dark { border-color: var(--ink-border); color: var(--bg); }
.btn--outline-dark:hover { border-color: var(--bg); }

/* ── Hero ── */
.hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  background-image: radial-gradient(var(--dot-pattern) 1px, transparent 1px);
  background-size: 26px 26px;
  overflow: hidden;
}
.hero__scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero__scene canvas { width: 100%; height: 100%; display: block; }

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(28px, 5vw, 54px);
  align-items: center;
  padding-block: clamp(48px, 9vw, 80px) clamp(40px, 7vw, 72px);
}
.hero__kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.hero__kicker-line { height: 1px; width: 30px; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); flex-shrink: 0; }
.hero__kicker-label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-7xl);
  line-height: .98;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(128deg, var(--text) 15%, var(--accent) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__desc { font-size: var(--fs-xl); line-height: 1.6; color: var(--text-soft); max-width: 540px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.hero__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero__gallery li {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent-soft) 45%, var(--border));
  box-shadow: 0 18px 40px -22px rgba(var(--shadow-ink), .55);
}
.hero__gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}
.stats li {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 26px);
}
.stat-number { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-4xl); letter-spacing: -0.028em; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, var(--accent), var(--accent-soft)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-top: 6px; line-height: 1.4; }

/* ── About body ── */
.about-body { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.about-body h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-3xl); letter-spacing: -0.025em; line-height: 1.1; }
.about-lead { font-size: var(--fs-2xl); line-height: 1.6; color: var(--text-strong); font-weight: 500; max-width: 720px; margin-bottom: 22px; }
.about-copy { font-size: var(--fs-md); line-height: 1.7; color: var(--text-soft); max-width: 680px; margin-bottom: 36px; }
.about-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.about-links a {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
}
.about-links strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); margin-bottom: 3px; color: var(--text); }
.about-links span { font-size: var(--fs-sm); color: var(--text-muted); }

/* ── Cards (generic) ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), box-shadow .28s ease, border-color .22s ease, background-color .25s ease;
}
.card:hover { transform: translateY(-7px); box-shadow: 0 26px 56px -16px rgba(var(--shadow-ambient), .18); border-color: var(--border-strong); }
.card--dark { background: var(--ink); color: var(--bg); border-color: var(--ink-border); }
.card--dark:hover { box-shadow: 0 26px 56px -16px rgba(var(--shadow-ink), .55); }

/* ── Experience ── */
.experience-list { display: flex; flex-direction: column; gap: 18px; }
.experience { display: grid; grid-template-columns: 260px 1fr; gap: clamp(24px, 4vw, 40px); padding: clamp(22px, 3vw, 32px); }
.experience figure { margin: 0 0 16px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #1E2230; }
.experience figure img { width: 100%; height: 100%; object-fit: cover; }
.experience time { display: block; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 8px; }
.badge {
  display: inline-block;
  font-size: var(--fs-2xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 4px 10px;
  border-radius: 6px;
}
.experience h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); letter-spacing: -0.017em; margin-bottom: 4px; }
.experience .org { font-size: var(--fs-lg); color: var(--text-muted); margin-bottom: 18px; }
.experience p { font-size: var(--fs-md); line-height: 1.7; color: var(--text-soft); max-width: 620px; margin-bottom: 20px; }
.experience ul { display: flex; flex-direction: column; gap: 9px; }
.experience ul li { position: relative; padding-left: 18px; font-size: var(--fs-base); color: var(--text-soft); }
.experience ul li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ── Repeatable "offer" card template ──
   One shared anatomy for every card that pitches something the visitor can
   act on (a project, a skill/capability): a color bar for instant peripheral
   recognition while scrolling, a faint index number for rhythm/scannability,
   an all-caps value line as the loudest line on the card (louder than the
   title's case, quieter than its size — the eye reads value before title),
   then the supporting description last. Same order every time = no relearning
   the layout card to card, which is what kills scroll-scan confusion. */
.offer-card { position: relative; overflow: hidden; }
.offer-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}
.card--dark.offer-card::before { background: linear-gradient(90deg, var(--accent-soft), var(--accent)); }
.music-section .offer-card::before { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.offer-card__index {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-5xl);
  line-height: 1;
  color: var(--text);
  opacity: .07;
  pointer-events: none;
  user-select: none;
}
.card--dark .offer-card__index { color: var(--bg); opacity: .09; }
.offer-card__value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.card--dark .offer-card__value { color: var(--accent-soft); }

/* ── Projects ── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.project { padding: clamp(20px, 3vw, 26px); display: flex; flex-direction: column; }
.project__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.project__top .badge { background: var(--accent-tint); }
.card--dark .project__top .badge { color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 18%, var(--ink)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--ink)); }
.project h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); letter-spacing: -0.014em; margin-bottom: 6px; }
.project p { font-size: var(--fs-sm); line-height: 1.6; color: var(--text-soft); margin-bottom: 18px; flex: 1; }
.card--dark .project p { color: var(--ink-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: var(--fs-2xs); font-weight: 500; background: var(--surface-tint); border: 1px solid var(--border); padding: 5px 10px; border-radius: 7px; color: var(--text-soft); }
.card--dark .tags li { background: var(--ink-card); border-color: var(--ink-border); color: var(--ink-muted); }

/* ── Live GitHub widgets (lazy-loaded — see assets/js/github-live.js) ── */
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.live-panel { padding: clamp(20px, 3vw, 26px); display: flex; flex-direction: column; gap: 4px; }
.live-panel__fallback { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }
.live-panel__fallback a { color: var(--accent); font-weight: 600; text-decoration: none; }
.live-panel__fallback a:hover { text-decoration: underline; }

/* Skeleton loading state — shown until the fetch resolves, hidden by JS either way */
.skeleton {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 10px;
  list-style: none;
  background: linear-gradient(90deg, var(--surface-tint) 25%, var(--border) 50%, var(--surface-tint) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton:nth-child(2) { width: 80%; }
.skeleton:nth-child(3) { width: 60%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Widget 1 — language mix bar chart */
.live-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.live-bars li:not(.skeleton) { list-style: none; }
.live-bar__row { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: 5px; }
.live-bar__row span:last-child { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); }
.live-bar__track { height: 8px; border-radius: 999px; background: var(--surface-tint); overflow: hidden; }
.card--dark .live-bar__track { background: var(--ink-card); }
.live-bar__fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 1s cubic-bezier(.16, 1, .3, 1);
}

/* Widget 2 — recent activity feed */
.live-feed { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.live-feed li:not(.skeleton) { list-style: none; position: relative; padding-left: 16px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-soft); }
.live-feed li:not(.skeleton)::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.live-feed strong { color: var(--text); font-weight: 600; }
.live-feed time { display: block; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 2px; }

/* Widget 3 — "right now" status strip */
.live-now { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); color: var(--text-soft); margin: 10px 0 0; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--status-live);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .5);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .45); }
  50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
}
.live-now__link { color: var(--text); font-weight: 600; text-decoration: none; }
.live-now__link:hover { color: var(--accent); }

/* ── Proof matrix (case-study / metrics grid) ──
   Dark "statement panel" for high contrast against the light Experience
   section. Every tile links straight to the on-page evidence for its
   number — the click-through is what dissolves skepticism, not the
   number in isolation. The live tile is filled in by github-live.js,
   reusing the events fetch the widgets above already made. */
.proof-matrix { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); margin-top: 40px; border: 1px solid var(--ink-border); }
.proof-matrix__head { max-width: 620px; margin-bottom: 28px; }
.proof-matrix__head .eyebrow { color: var(--accent-soft); }
.proof-matrix__head h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-3xl); letter-spacing: -0.023em; color: var(--bg); }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--ink-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 28px;
}
.proof-tile { background: var(--ink); }
.proof-tile a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 24px 22px; text-decoration: none; color: inherit;
  transition: background-color .2s ease;
}
.proof-tile a:hover { background: var(--ink-card); }
.proof-tile__number { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-5xl); letter-spacing: -0.028em; font-variant-numeric: tabular-nums; color: var(--bg); line-height: 1; }
.proof-tile__label { font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.4; }
.proof-tile__source {
  display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px;
  font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-soft);
}
.proof-tile--live .proof-tile__source { color: var(--status-live); }

/* ── Skills ── */
.skills-figure { aspect-ratio: 24 / 9; border-radius: var(--radius); overflow: hidden; margin-bottom: 36px; border: 1px solid var(--border); }
.skills-figure img { width: 100%; height: 100%; object-fit: cover; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.skill-card { padding: clamp(22px, 3vw, 28px); }
.skill-card .eyebrow { color: var(--accent); }
.card--dark .skill-card-heading { color: var(--accent-soft); }
.skill-card p { font-size: var(--fs-base); line-height: 1.6; color: var(--text-soft); margin-bottom: 18px; }
.card--dark .skill-card p { color: var(--ink-muted); }
.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pills li { font-size: var(--fs-base); font-weight: 500; background: var(--surface-tint); border: 1px solid var(--border); padding: 7px 13px; border-radius: 8px; }
.lang-scores { display: flex; flex-direction: column; gap: 12px; }
.lang-scores li { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--ink-border); }
.lang-scores li:last-child { border-bottom: none; padding-bottom: 0; }
.lang-scores strong { font-size: var(--fs-md); }
.lang-scores span { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-soft); }

/* ── Music (gold theme) ── */
.music-section { background: var(--gold-bg); background-image: radial-gradient(var(--dot-pattern-gold) 1px, transparent 1px); background-size: 26px 26px; border-bottom: 1px solid var(--gold-border); transition: background-color .25s ease, border-color .25s ease; }
.music-section .hero__kicker-label,
.music-section .eyebrow { color: var(--gold-muted); }
.music-section h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-6xl); letter-spacing: -0.03em; line-height: 1; margin-bottom: 18px; }
.music-section .hero__desc { color: var(--gold-ink-strong); max-width: 520px; }
.music-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.music-badges li { font-size: var(--fs-base); font-weight: 600; color: var(--gold-ink); background: var(--surface); border: 1px solid var(--gold-tint); padding: 9px 15px; border-radius: 999px; }
.music-portrait { aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; border: 1px solid var(--gold-tint); box-shadow: 0 24px 50px -28px rgba(120, 90, 30, .4); }
.music-portrait img { width: 100%; height: 100%; object-fit: cover; }

.music-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 40px; }
.music-stats li { border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 26px); background: var(--surface); border: 1px solid var(--border); }
.music-stats li.is-gold {
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-soft) 40%, #C89030 60%, var(--gold) 100%);
  background-size: 200%;
  color: #fff;
  border: none;
}
.music-stats .stat-number { background: none; -webkit-text-fill-color: currentColor; color: inherit; }
.music-stats li.is-gold .stat-label { color: #FFF6E6; }
.music-stats .stat-label { color: var(--text-muted); }

.performances { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 52px; }
.performances li { display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-base); font-weight: 600; color: var(--gold-ink); background: var(--surface); border: 1px solid var(--gold-tint); padding: 10px 16px; border-radius: 12px; }
.performances li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-soft); }
.timeline-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.timeline-heading h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-3xl); letter-spacing: -0.023em; }
.timeline-heading .range { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--meta-muted); letter-spacing: .08em; }

.timeline { position: relative; display: flex; flex-direction: column; --tl-progress: 1; }
.timeline::before {
  content: '';
  position: absolute;
  left: 112px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(47, 59, 214, .2) 8%, rgba(47, 59, 214, .2) 92%, transparent 100%);
  transform: scaleY(var(--tl-progress, 1));
  transform-origin: top;
}
.timeline > li { display: grid; grid-template-columns: 120px 1fr; gap: clamp(16px, 3vw, 28px); padding-block: 22px; border-top: 1px solid var(--border); }
.timeline > li:last-child { border-bottom: 1px solid var(--border); }
.timeline time { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--gold-muted); font-weight: 500; }
.timeline .org { display: block; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-timeline); margin-bottom: 5px; }
.timeline h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); margin-bottom: 5px; display: inline; }
.timeline .badge-gold { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 500; color: var(--gold-tag-ink); background: var(--gold-tag-bg); border: 1px solid var(--gold-tag-border); padding: 3px 9px; border-radius: 6px; margin-left: 6px; }
.timeline .badge-neutral { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 500; color: var(--text); background: var(--badge-neutral-bg); border: 1px solid var(--badge-neutral-border); padding: 3px 9px; border-radius: 6px; margin-left: 6px; }
.timeline p { font-size: var(--fs-base); line-height: 1.6; color: var(--text-muted); margin-top: 5px; }

/* ── Education ── */
.education-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.education { padding: clamp(22px, 3vw, 32px); }
.education .row { display: grid; grid-template-columns: 170px 1fr auto; gap: 32px; align-items: baseline; }
.education time { font-family: var(--font-mono); font-size: var(--fs-md); color: var(--text-muted); }
.education .row.is-current time { color: var(--accent); }
.education h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); letter-spacing: -0.017em; margin-bottom: 4px; }
.education .school { font-size: var(--fs-lg); color: var(--text-muted); }
.education .status {
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted);
  background: var(--surface-tint); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.education .row.is-current .status { color: var(--accent); background: var(--accent-tint); border-color: transparent; }
.education-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 36px; }
.education-figures figure { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.education-figures img { width: 100%; height: 100%; object-fit: cover; }
.founding-project { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); border: 1px solid var(--ink-border); }
.founding-project .eyebrow { color: var(--accent-soft); margin-bottom: 12px; }
.founding-project h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); letter-spacing: -0.017em; margin-bottom: 8px; }
.founding-project p { font-size: var(--fs-md); line-height: 1.6; color: var(--ink-muted); max-width: 680px; }

/* ── Contact ── */
.contact-section { background: var(--ink); color: var(--bg); }
.contact-section h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-6xl); letter-spacing: -0.03em; line-height: 1.02; max-width: 760px; margin-bottom: 18px; }
.contact-section .eyebrow { color: var(--accent-soft); }
.contact-section .section-lede { color: var(--ink-muted); max-width: 560px; margin-bottom: 44px; }

/* ── Two-step lead capture: 01 quick intro (no backend), 02 availability status ── */
.lead-step { max-width: 560px; margin-bottom: 32px; }
.lead-step__title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-2xl); letter-spacing: -0.017em;
  color: var(--bg); margin: 0 0 20px;
}
.lead-step__index {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-xs);
}
.quick-intro { display: flex; flex-direction: column; gap: 14px; }
.quick-intro__row { display: flex; flex-direction: column; gap: 6px; }
.quick-intro__row label {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint);
}
.quick-intro__row label span { text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
.quick-intro select, .quick-intro textarea {
  font: inherit; font-size: var(--fs-md); color: var(--bg);
  background: var(--ink-card); border: 1px solid var(--ink-border);
  border-radius: 10px; padding: 12px 14px; resize: vertical;
}
.quick-intro select:focus-visible, .quick-intro textarea:focus-visible {
  outline: 2px solid var(--accent-soft); outline-offset: 2px;
}
.quick-intro button { align-self: flex-start; }

.availability-status {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-base); color: var(--ink-muted);
  margin: 0 0 36px; max-width: 560px;
}
.availability-status__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--gold-soft); }
/* add .is-open to .availability-status when actually open to work — swaps the
   static amber dot for the same live-pulse green used in the GitHub widgets */
.availability-status.is-open .availability-status__dot {
  background: var(--status-live);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .45);
  animation: live-pulse 1.8s ease-in-out infinite;
}
.contact-alt { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }

.contact-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; margin-bottom: 44px; }
.contact-methods a {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  padding: 18px 22px; border-radius: 14px; transition: transform .2s ease, border-color .2s ease;
}
.contact-methods a.is-primary { background: var(--bg); color: var(--text); }
.contact-methods a.is-primary:hover { transform: translateY(-3px); }
.contact-methods a.is-secondary { color: var(--bg); border: 1px solid var(--ink-border); }
.contact-methods a.is-secondary:hover { border-color: var(--bg); }
.contact-methods .icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; font-size: var(--fs-xl); flex-shrink: 0;
}
.is-primary .icon { background: var(--text); color: var(--bg); }
.is-secondary .icon { background: var(--ink-card); color: var(--bg); }
.contact-methods .label { display: block; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.contact-methods strong { font-weight: 600; font-size: var(--fs-base); }
.social-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.social-list a {
  display: inline-flex; align-items: center; gap: 11px; text-decoration: none;
  background: var(--ink-card); color: var(--bg); padding: 13px 20px; border-radius: 12px;
  border: 1px solid var(--ink-border); transition: background-color .2s ease;
}
.social-list a:hover { background: var(--accent); }
.social-list .glyph {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; background: #fff; color: var(--text);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs);
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; }
.site-footer img { height: 42px; width: 42px; object-fit: cover; border-radius: 10px; }
.site-footer small { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--meta-muted); letter-spacing: .04em; }

/* ── Scroll reveal (progressive enhancement) ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── Preloader (GSAP-driven; default hidden so a JS failure can never leave
   it stuck covering the page — see assets/js/animations.js) ── */
.preloader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.preloader img { border-radius: 9px; }

/* ── Custom cursor (desktop, fine-pointer only; native cursor is only ever
   hidden via the JS-added .cursor-active class, never a bare media query) ── */
.cursor { position: fixed; top: 0; left: 0; z-index: 210; pointer-events: none; opacity: 0; }
.cursor__dot, .cursor__ring {
  position: absolute; top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot { width: 7px; height: 7px; background: var(--accent); }
.cursor__ring { width: 34px; height: 34px; border: 1.5px solid var(--accent-soft); }
html.cursor-active { cursor: none; }
html.cursor-active .cursor { opacity: 1; }
html.cursor-active a, html.cursor-active button { cursor: none; }

/* ── Magnetic buttons: GSAP owns transform while active, so the CSS hover
   lift is switched off to avoid the two fighting each other ── */
html.has-magnetic .btn--primary:hover,
html.has-magnetic .btn--ghost:hover,
html.has-magnetic .lang-toggle:hover { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .cursor, .preloader, .hero__scene { display: none !important; }
  html.cursor-active { cursor: auto !important; }
  html.cursor-active a, html.cursor-active button { cursor: pointer !important; }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .about-body { grid-template-columns: 1fr; }
  .experience { grid-template-columns: 1fr; gap: 18px; }
  .education .row { grid-template-columns: 1fr; gap: 6px; }
  .timeline > li { grid-template-columns: 64px 1fr; }
  .timeline::before { left: 56px; }
  .contact-methods { grid-template-columns: 1fr; }
  .education-figures { grid-template-columns: 1fr; }
}

/* ── Fallback for browsers without color-mix() (Safari <16.2, older Firefox) ── */
@supports not (color: color-mix(in srgb, red, blue)) {
  .btn--ghost { background: var(--surface); }
  .hero__gallery li { border-color: var(--border); }
  .card--dark .project__top .badge { background: #23253A; border: 1px solid #34375A; }
}
