/* ================================================
   PORTFOLIO — Maxime Blaise
   ================================================ */

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-secondary: #555555;
  --border: #e5e5e5;
  --card-bg: #ffffff;

  /* Fonts */
  --font: 'Sora', sans-serif;
  --font-display: 'Sora', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-gothic: 'UnifrakturCook', cursive;

  /* Spacing — 4pt scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;
  --s20: 80px;
  --s24: 96px;
  --s30: 120px;

  /* Section rhythm */
  --section-py: var(--s16);

  /* Font sizes */
  --fs-xs: 10px;
  --fs-sm: 11px;
  --fs-base: 12px;
  --fs-md: 13px;
  --fs-lg: 14px;
  --fs-body: 16px;
  --fs-h5: 18px;
  --fs-h4: 20px;
  --fs-h3: 24px;
  --fs-h2: 32px;
  --fs-h1: 48px;
  --fs-display: 56px;
  --fs-hero: 64px;
}

html, body {
  scroll-behavior: smooth;
  overscroll-behavior-x: none;
  overflow-x: clip;
}

/* ===== CROSS-PAGE TRANSITIONS =====
   Enables the View Transitions API for static multi-page navigations.
   Supported browsers crossfade between pages; others ignore it silently. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
  animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a, button, .experience-header { cursor: pointer; }

/* ===== UTILITY CLASSES ===== */
.gothic-heading {
  font-family: 'UnifrakturCook', cursive;
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 var(--s2);
}

.gothic-heading.mb { margin-bottom: var(--s8); }

.gothic-inline {
  font-family: 'UnifrakturCook', cursive;
}

.footer-heading .gothic-inline {
  font-size: 1.22em;
  vertical-align: -0.06em;
  line-height: 1;
  position: relative;
}

/* ===== PIXELATE — hero "design" glitch-pixel =====
   JS (main.js) picks the filter based on rendered font-size. */
.hero h1 .glitch-pixel.pixelate-sm { filter: url(#pixelate-sharp-sm); }
.hero h1 .glitch-pixel.pixelate-md { filter: url(#pixelate-sharp-md); }
.hero h1 .glitch-pixel.pixelate-lg { filter: url(#pixelate-sharp); }
.hero h1 .glitch-pixel.pixelate-off { filter: none; }

.no-ligatures {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
}

[style*="UnifrakturCook"], .glitch-pixel, .loader-mark {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden-svg {
  position: absolute;
  width: 0;
  height: 0;
}

/* ===== GRAIN OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 99998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

#loader.fade-out { opacity: 0; pointer-events: none; }

#loader .loader-mark {
  font-family: 'UnifrakturCook', cursive;
  font-size: var(--fs-hero);
  color: var(--text);
  position: relative;
  filter: url(#pixelate-sharp);
  -webkit-font-smoothing: none;
  image-rendering: pixelated;
}

#loader .loader-mark::before,
#loader .loader-mark::after {
  content: 'M.';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}

#loader .loader-mark::before {
  color: #ff00ff;
  animation: loaderGlitch1 1.2s ease-in-out forwards 0.5s;
  clip-path: inset(0 0 50% 0);
}

#loader .loader-mark::after {
  color: #00ffff;
  animation: loaderGlitch2 1.2s ease-in-out forwards 0.5s;
  clip-path: inset(40% 0 0 0);
}



@keyframes loaderGlitch1 {
  0%   { opacity: 0; transform: none; }
  10%  { opacity: 0.8; transform: translate(-3px, -1px); }
  20%  { opacity: 1; transform: translate(4px, 1px) skewX(2deg); }
  30%  { opacity: 0.6; transform: translate(-2px, 2px); }
  40%  { opacity: 0; transform: none; }
  60%  { opacity: 0; }
  65%  { opacity: 0.7; transform: translate(2px, -1px); }
  70%  { opacity: 0; transform: none; }
  100% { opacity: 0; }
}

@keyframes loaderGlitch2 {
  0%   { opacity: 0; transform: none; }
  8%   { opacity: 0.7; transform: translate(3px, 1px); }
  18%  { opacity: 1; transform: translate(-4px, -1px) skewX(-2deg); }
  28%  { opacity: 0.5; transform: translate(2px, -2px); }
  38%  { opacity: 0; transform: none; }
  58%  { opacity: 0; }
  63%  { opacity: 0.8; transform: translate(-2px, 1px); }
  68%  { opacity: 0; transform: none; }
  100% { opacity: 0; }
}

/* ===== LAYOUT ===== */
.wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--s12);
}

/* ===== NAVBAR ===== */
nav {
  padding: var(--s6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

nav .logo {
  font-family: 'UnifrakturCook', cursive;
  font-size: var(--fs-h4);
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: default;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

@keyframes logoGlitch {
  0%   { text-shadow: none; transform: none; }
  15%  { text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff; transform: translateX(2px) skewX(1deg); }
  30%  { text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; transform: translateX(-2px); }
  50%  { text-shadow: -1px 0 #ff00ff; transform: translateX(1px) skewX(-1deg); }
  70%  { text-shadow: 1px 0 #00ffff; transform: translateX(-1px); }
  100% { text-shadow: none; transform: none; }
}

@keyframes logoGlitchOut {
  0%   { text-shadow: -3px 0 #ff00ff, 3px 0 #00ffff; transform: translateX(3px) skewX(3deg); opacity: 1; }
  30%  { text-shadow: 3px 0 #00ffff, -3px 0 #ff00ff; transform: translateX(-4px) skewX(-2deg); opacity: 0.8; }
  60%  { text-shadow: -2px 0 #ff00ff; transform: translateX(2px) scaleX(1.03); opacity: 0.9; }
  100% { text-shadow: none; transform: none; opacity: 1; }
}

nav .logo.glitching { animation: logoGlitch 80ms infinite; }
nav .logo.glitch-out { animation: logoGlitchOut 120ms ease-out; }

nav .nav-links {
  display: flex;
  gap: var(--s8);
  list-style: none;
}

nav .nav-links a {
  font-family: 'Sora', sans-serif;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: 400;
  transition: color 0.2s ease;
}

nav .nav-links a:hover { color: var(--text); }

/* ===== HERO ===== */
.hero-bg {
  background: #f3f3f3;
  min-height: 100svh;
  max-height: 1600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}



.hero-bg > .wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 480px;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s20) 0 var(--s30);
}

/* ===== STACK CHIPS ===== */
.stack-chips {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--s2) var(--s3);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.stack-chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.stack-chip.dead {
  opacity: 0.45;
  position: relative;
  overflow: visible;
}

.rip-ribbon {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #8b0000;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 3px;
  transform: rotate(12deg);
  text-decoration: none;
  letter-spacing: 0.05em;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== HERO ELEMENTS ===== */
.avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 50%;
  transition: filter 0.1s;
}

.avatar:hover { animation: avatarGlitch 300ms steps(3); }

@keyframes avatarGlitch {
  0%   { filter: none; transform: none; }
  15%  { filter: drop-shadow(-2px 0 #ff00ff) drop-shadow(2px 0 #00ffff); transform: translate(1px, -1px); }
  30%  { filter: drop-shadow(2px 0 #00ffff) drop-shadow(-2px 0 #ff00ff); transform: translate(-2px, 1px); }
  50%  { filter: drop-shadow(-1px 0 #ff00ff) drop-shadow(1px 0 #00ffff); transform: translate(2px, 0); }
  70%  { filter: drop-shadow(1px 0 #00ffff); transform: translate(-1px, 1px); }
  100% { filter: none; transform: none; }
}

.availability-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-base);
  color: var(--text-muted);
  white-space: nowrap;
  padding: var(--s2) 0 var(--s2) var(--s2);
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  animation: availPulse 2.4s ease-in-out infinite;
}

@keyframes availPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12); }
  50%      { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.32); }
}

@media (prefers-reduced-motion: reduce) {
  .avail-dot {
    animation: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
  }
}

.hero-intro {
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: var(--s4);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1.2s;
}

/* ===== WIN95 POPUP ===== */
.maxime-trigger {
  color: var(--text);
  font-weight: 500;
  cursor: default;
}

.maxime-win {
  display: none;
  position: fixed;
  z-index: 99999;
  width: 140px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 1px 1px 0 #000;
}

.maxime-win.visible { display: block; }

.maxime-win-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  padding: 2px var(--s1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s1);
}

.maxime-win-bar > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maxime-win-btns { display: flex; gap: 2px; }

.maxime-win-btns span {
  background: #c0c0c0;
  color: #000;
  font-size: var(--fs-xs);
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
}

.maxime-win img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  filter: contrast(1.1) saturate(1.3);
  image-rendering: pixelated;
}

.hero-sub {
  font-size: var(--fs-body);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: var(--s8);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1.6s;
}

.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(40px, 6vw, 96px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin-bottom: var(--s10);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1.4s;
}

/* ===== GLITCH PIXEL ("design") ===== */
.glitch-pixel {
  position: relative;
  display: inline-block;
  font-family: 'UnifrakturCook', cursive;
  font-size: 1.22em;
  letter-spacing: 0.02em;
  vertical-align: -0.06em;
  line-height: 1;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  text-rendering: optimizeSpeed;
  filter: url(#pixelate-sharp);
}

.glitch-pixel::before,
.glitch-pixel::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}

.glitch-pixel::before {
  color: var(--text);
  animation: pixel-1 3s infinite linear;
  clip-path: inset(0 0 50% 0);
  text-shadow: 2px 0 0 #00ffff;
}

.glitch-pixel::after {
  color: var(--text);
  animation: pixel-2 3s infinite linear;
  clip-path: inset(40% 0 0 0);
  text-shadow: -2px 0 0 #ff00ff;
}

@keyframes pixel-1 {
  0%, 69% { opacity: 0; transform: none; }
  70% { opacity: 0.8; transform: translate(-2px, -1px) scale(1.02); }
  71% { opacity: 1; transform: translate(3px, 0px) scale(0.98); }
  72% { opacity: 0.6; transform: translate(-1px, 2px) scale(1.01); }
  73% { opacity: 1; transform: translate(2px, -1px); }
  74% { opacity: 0; transform: none; }
  78% { opacity: 0; }
  79% { opacity: 0.7; transform: translate(1px, 1px); }
  80% { opacity: 0; transform: none; }
  100% { opacity: 0; }
}

@keyframes pixel-2 {
  0%, 68% { opacity: 0; transform: none; }
  69% { opacity: 0.7; transform: translate(2px, 1px) scale(1.03); }
  70% { opacity: 1; transform: translate(-3px, -1px) scale(0.97); }
  71% { opacity: 0.5; transform: translate(1px, -2px); }
  72% { opacity: 1; transform: translate(-2px, 1px); }
  73% { opacity: 0; transform: none; }
  77% { opacity: 0; }
  78% { opacity: 0.8; transform: translate(-1px, -1px); }
  79% { opacity: 0; transform: none; }
  100% { opacity: 0; }
}

/* ===== CTA GROUP ===== */
.hero .cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1.8s;
  max-width: 100%;
}

.cta-main {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  padding: var(--s3) var(--s5);
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: opacity 0.2s;
  position: relative;
  z-index: 2;
}

.cta-main:hover { opacity: 0.8; }

.cta-book {
  position: relative;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  padding: var(--s3) var(--s5);
  border-radius: 8px;
  border: 1px solid #aaa;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.cta-secondary:hover,
.cta-book.open .cta-secondary {
  border-color: var(--text);
}

.cta-secondary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.cta-secondary svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.cta-book.open .cta-secondary svg { transform: rotate(180deg); }

.cta-book-menu {
  position: absolute;
  top: calc(100% + var(--s2));
  left: 0;
  min-width: 240px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--s2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.cta-book.open .cta-book-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cta-book-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s3) var(--s4);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.cta-book-menu a:hover { background: var(--bg); }

.cta-book-title {
  font-size: var(--fs-md);
  font-weight: 500;
}

.cta-book-hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.cta-main svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.cta-group.open .cta-main svg { transform: rotate(90deg); }

.cta-links {
  display: flex;
  gap: var(--s2);
  max-width: 0;
  margin-left: calc(-1 * var(--s2));
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease;
}

.cta-group.open .cta-links {
  max-width: 100%;
  margin-left: 0;
  opacity: 1;
}

.cta-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  padding: var(--s3) var(--s4);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  white-space: nowrap;
  transition: background 0.2s;
}

.cta-links a:hover { background: #f0f0f0; }

.cta-links a svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BENTO GRID ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
  padding-bottom: var(--s12);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--s6);
}

.card-full { grid-column: span 2; }

/* ===== MISC BLOCK ===== */
.misc-block {
  background: #f3f3f3;
  color: var(--text);
  padding: var(--section-py) 0;
}

/* Bento grid */
.misc-bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--s3);
  margin-top: var(--s3);
}

.misc-bento-music {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* Streak / Day counter */
.misc-bento-streak {
  --ruler-size: 16px;
  --guide-inset: calc(var(--s5) + var(--ruler-size));
  --guide-color: #ff00b4;
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* Padding asymétrique → content centré dans la zone blanche (container - rulers) */
  /* Top/Left compensent les 16px de ruler ; Right/Bottom = padding visuel symétrique de 20px */
  padding: var(--guide-inset) var(--s5) var(--s5) var(--guide-inset);
  background-color: #fff;
  background-image:
    /* Vertical guide gauche */
    linear-gradient(to right,
      transparent calc(var(--guide-inset) - 1px),
      var(--guide-color) calc(var(--guide-inset) - 1px),
      var(--guide-color) var(--guide-inset),
      transparent var(--guide-inset)),
    /* Vertical guide droite (à padding-right = s5 du bord) */
    linear-gradient(to right,
      transparent calc(100% - var(--s5)),
      var(--guide-color) calc(100% - var(--s5)),
      var(--guide-color) calc(100% - var(--s5) + 1px),
      transparent calc(100% - var(--s5) + 1px)),
    /* Horizontal guide haut */
    linear-gradient(to bottom,
      transparent calc(var(--guide-inset) - 1px),
      var(--guide-color) calc(var(--guide-inset) - 1px),
      var(--guide-color) var(--guide-inset),
      transparent var(--guide-inset)),
    /* Horizontal guide bas (à padding-bottom = s5 du bord) */
    linear-gradient(to bottom,
      transparent calc(100% - var(--s5)),
      var(--guide-color) calc(100% - var(--s5)),
      var(--guide-color) calc(100% - var(--s5) + 1px),
      transparent calc(100% - var(--s5) + 1px));
}

/* Top ruler — couvre tout en haut, le SVG est offset pour laisser le coin vide */
.misc-bento-streak::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ruler-size);
  background-color: #2c2c2c;
  background-position: var(--ruler-size) 0;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='16' shape-rendering='crispEdges'%3E%3Cg stroke='%23bdbdbd' stroke-width='1'%3E%3Cline x1='0.5' y1='8' x2='0.5' y2='16'/%3E%3Cline x1='50.5' y1='8' x2='50.5' y2='16'/%3E%3Cline x1='100.5' y1='8' x2='100.5' y2='16'/%3E%3Cline x1='150.5' y1='8' x2='150.5' y2='16'/%3E%3Cline x1='200.5' y1='8' x2='200.5' y2='16'/%3E%3Cline x1='250.5' y1='8' x2='250.5' y2='16'/%3E%3Cline x1='300.5' y1='8' x2='300.5' y2='16'/%3E%3Cline x1='350.5' y1='8' x2='350.5' y2='16'/%3E%3Cline x1='400.5' y1='8' x2='400.5' y2='16'/%3E%3Cline x1='450.5' y1='8' x2='450.5' y2='16'/%3E%3Cline x1='500.5' y1='8' x2='500.5' y2='16'/%3E%3Cline x1='550.5' y1='8' x2='550.5' y2='16'/%3E%3C/g%3E%3Cg stroke='%23777' stroke-width='1'%3E%3Cline x1='10.5' y1='12' x2='10.5' y2='16'/%3E%3Cline x1='20.5' y1='12' x2='20.5' y2='16'/%3E%3Cline x1='30.5' y1='12' x2='30.5' y2='16'/%3E%3Cline x1='40.5' y1='12' x2='40.5' y2='16'/%3E%3Cline x1='60.5' y1='12' x2='60.5' y2='16'/%3E%3Cline x1='70.5' y1='12' x2='70.5' y2='16'/%3E%3Cline x1='80.5' y1='12' x2='80.5' y2='16'/%3E%3Cline x1='90.5' y1='12' x2='90.5' y2='16'/%3E%3Cline x1='110.5' y1='12' x2='110.5' y2='16'/%3E%3Cline x1='120.5' y1='12' x2='120.5' y2='16'/%3E%3Cline x1='130.5' y1='12' x2='130.5' y2='16'/%3E%3Cline x1='140.5' y1='12' x2='140.5' y2='16'/%3E%3Cline x1='160.5' y1='12' x2='160.5' y2='16'/%3E%3Cline x1='170.5' y1='12' x2='170.5' y2='16'/%3E%3Cline x1='180.5' y1='12' x2='180.5' y2='16'/%3E%3Cline x1='190.5' y1='12' x2='190.5' y2='16'/%3E%3Cline x1='210.5' y1='12' x2='210.5' y2='16'/%3E%3Cline x1='220.5' y1='12' x2='220.5' y2='16'/%3E%3Cline x1='230.5' y1='12' x2='230.5' y2='16'/%3E%3Cline x1='240.5' y1='12' x2='240.5' y2='16'/%3E%3Cline x1='260.5' y1='12' x2='260.5' y2='16'/%3E%3Cline x1='270.5' y1='12' x2='270.5' y2='16'/%3E%3Cline x1='280.5' y1='12' x2='280.5' y2='16'/%3E%3Cline x1='290.5' y1='12' x2='290.5' y2='16'/%3E%3Cline x1='310.5' y1='12' x2='310.5' y2='16'/%3E%3Cline x1='320.5' y1='12' x2='320.5' y2='16'/%3E%3Cline x1='330.5' y1='12' x2='330.5' y2='16'/%3E%3Cline x1='340.5' y1='12' x2='340.5' y2='16'/%3E%3Cline x1='360.5' y1='12' x2='360.5' y2='16'/%3E%3Cline x1='370.5' y1='12' x2='370.5' y2='16'/%3E%3Cline x1='380.5' y1='12' x2='380.5' y2='16'/%3E%3Cline x1='390.5' y1='12' x2='390.5' y2='16'/%3E%3Cline x1='410.5' y1='12' x2='410.5' y2='16'/%3E%3Cline x1='420.5' y1='12' x2='420.5' y2='16'/%3E%3Cline x1='430.5' y1='12' x2='430.5' y2='16'/%3E%3Cline x1='440.5' y1='12' x2='440.5' y2='16'/%3E%3Cline x1='460.5' y1='12' x2='460.5' y2='16'/%3E%3Cline x1='470.5' y1='12' x2='470.5' y2='16'/%3E%3Cline x1='480.5' y1='12' x2='480.5' y2='16'/%3E%3Cline x1='490.5' y1='12' x2='490.5' y2='16'/%3E%3Cline x1='510.5' y1='12' x2='510.5' y2='16'/%3E%3Cline x1='520.5' y1='12' x2='520.5' y2='16'/%3E%3Cline x1='530.5' y1='12' x2='530.5' y2='16'/%3E%3Cline x1='540.5' y1='12' x2='540.5' y2='16'/%3E%3Cline x1='560.5' y1='12' x2='560.5' y2='16'/%3E%3Cline x1='570.5' y1='12' x2='570.5' y2='16'/%3E%3Cline x1='580.5' y1='12' x2='580.5' y2='16'/%3E%3Cline x1='590.5' y1='12' x2='590.5' y2='16'/%3E%3C/g%3E%3Cg font-family='ui-monospace,Menlo,monospace' font-size='7' fill='%23bdbdbd'%3E%3Ctext x='3' y='7'%3E0%3C/text%3E%3Ctext x='53' y='7'%3E50%3C/text%3E%3Ctext x='103' y='7'%3E100%3C/text%3E%3Ctext x='153' y='7'%3E150%3C/text%3E%3Ctext x='203' y='7'%3E200%3C/text%3E%3Ctext x='253' y='7'%3E250%3C/text%3E%3Ctext x='303' y='7'%3E300%3C/text%3E%3Ctext x='353' y='7'%3E350%3C/text%3E%3Ctext x='403' y='7'%3E400%3C/text%3E%3Ctext x='453' y='7'%3E450%3C/text%3E%3Ctext x='503' y='7'%3E500%3C/text%3E%3Ctext x='553' y='7'%3E550%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  border-bottom: 1px solid #111;
  pointer-events: none;
  z-index: 1;
}

/* Left ruler — couvre tout à gauche (corner inclus), SVG offset */
.misc-bento-streak::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--ruler-size);
  background-color: #2c2c2c;
  background-position: 0 var(--ruler-size);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='600' shape-rendering='crispEdges'%3E%3Cg stroke='%23bdbdbd' stroke-width='1'%3E%3Cline x1='8' y1='0.5' x2='16' y2='0.5'/%3E%3Cline x1='8' y1='50.5' x2='16' y2='50.5'/%3E%3Cline x1='8' y1='100.5' x2='16' y2='100.5'/%3E%3Cline x1='8' y1='150.5' x2='16' y2='150.5'/%3E%3Cline x1='8' y1='200.5' x2='16' y2='200.5'/%3E%3Cline x1='8' y1='250.5' x2='16' y2='250.5'/%3E%3Cline x1='8' y1='300.5' x2='16' y2='300.5'/%3E%3Cline x1='8' y1='350.5' x2='16' y2='350.5'/%3E%3Cline x1='8' y1='400.5' x2='16' y2='400.5'/%3E%3Cline x1='8' y1='450.5' x2='16' y2='450.5'/%3E%3Cline x1='8' y1='500.5' x2='16' y2='500.5'/%3E%3Cline x1='8' y1='550.5' x2='16' y2='550.5'/%3E%3C/g%3E%3Cg stroke='%23777' stroke-width='1'%3E%3Cline x1='12' y1='10.5' x2='16' y2='10.5'/%3E%3Cline x1='12' y1='20.5' x2='16' y2='20.5'/%3E%3Cline x1='12' y1='30.5' x2='16' y2='30.5'/%3E%3Cline x1='12' y1='40.5' x2='16' y2='40.5'/%3E%3Cline x1='12' y1='60.5' x2='16' y2='60.5'/%3E%3Cline x1='12' y1='70.5' x2='16' y2='70.5'/%3E%3Cline x1='12' y1='80.5' x2='16' y2='80.5'/%3E%3Cline x1='12' y1='90.5' x2='16' y2='90.5'/%3E%3Cline x1='12' y1='110.5' x2='16' y2='110.5'/%3E%3Cline x1='12' y1='120.5' x2='16' y2='120.5'/%3E%3Cline x1='12' y1='130.5' x2='16' y2='130.5'/%3E%3Cline x1='12' y1='140.5' x2='16' y2='140.5'/%3E%3Cline x1='12' y1='160.5' x2='16' y2='160.5'/%3E%3Cline x1='12' y1='170.5' x2='16' y2='170.5'/%3E%3Cline x1='12' y1='180.5' x2='16' y2='180.5'/%3E%3Cline x1='12' y1='190.5' x2='16' y2='190.5'/%3E%3Cline x1='12' y1='210.5' x2='16' y2='210.5'/%3E%3Cline x1='12' y1='220.5' x2='16' y2='220.5'/%3E%3Cline x1='12' y1='230.5' x2='16' y2='230.5'/%3E%3Cline x1='12' y1='240.5' x2='16' y2='240.5'/%3E%3Cline x1='12' y1='260.5' x2='16' y2='260.5'/%3E%3Cline x1='12' y1='270.5' x2='16' y2='270.5'/%3E%3Cline x1='12' y1='280.5' x2='16' y2='280.5'/%3E%3Cline x1='12' y1='290.5' x2='16' y2='290.5'/%3E%3Cline x1='12' y1='310.5' x2='16' y2='310.5'/%3E%3Cline x1='12' y1='320.5' x2='16' y2='320.5'/%3E%3Cline x1='12' y1='330.5' x2='16' y2='330.5'/%3E%3Cline x1='12' y1='340.5' x2='16' y2='340.5'/%3E%3Cline x1='12' y1='360.5' x2='16' y2='360.5'/%3E%3Cline x1='12' y1='370.5' x2='16' y2='370.5'/%3E%3Cline x1='12' y1='380.5' x2='16' y2='380.5'/%3E%3Cline x1='12' y1='390.5' x2='16' y2='390.5'/%3E%3Cline x1='12' y1='410.5' x2='16' y2='410.5'/%3E%3Cline x1='12' y1='420.5' x2='16' y2='420.5'/%3E%3Cline x1='12' y1='430.5' x2='16' y2='430.5'/%3E%3Cline x1='12' y1='440.5' x2='16' y2='440.5'/%3E%3Cline x1='12' y1='460.5' x2='16' y2='460.5'/%3E%3Cline x1='12' y1='470.5' x2='16' y2='470.5'/%3E%3Cline x1='12' y1='480.5' x2='16' y2='480.5'/%3E%3Cline x1='12' y1='490.5' x2='16' y2='490.5'/%3E%3Cline x1='12' y1='510.5' x2='16' y2='510.5'/%3E%3Cline x1='12' y1='520.5' x2='16' y2='520.5'/%3E%3Cline x1='12' y1='530.5' x2='16' y2='530.5'/%3E%3Cline x1='12' y1='540.5' x2='16' y2='540.5'/%3E%3Cline x1='12' y1='560.5' x2='16' y2='560.5'/%3E%3Cline x1='12' y1='570.5' x2='16' y2='570.5'/%3E%3Cline x1='12' y1='580.5' x2='16' y2='580.5'/%3E%3Cline x1='12' y1='590.5' x2='16' y2='590.5'/%3E%3C/g%3E%3Cg font-family='ui-monospace,Menlo,monospace' font-size='7' fill='%23bdbdbd'%3E%3Ctext x='7' y='4' transform='rotate(-90 7 4)'%3E0%3C/text%3E%3Ctext x='7' y='54' transform='rotate(-90 7 54)'%3E50%3C/text%3E%3Ctext x='7' y='104' transform='rotate(-90 7 104)'%3E100%3C/text%3E%3Ctext x='7' y='154' transform='rotate(-90 7 154)'%3E150%3C/text%3E%3Ctext x='7' y='204' transform='rotate(-90 7 204)'%3E200%3C/text%3E%3Ctext x='7' y='254' transform='rotate(-90 7 254)'%3E250%3C/text%3E%3Ctext x='7' y='304' transform='rotate(-90 7 304)'%3E300%3C/text%3E%3Ctext x='7' y='354' transform='rotate(-90 7 354)'%3E350%3C/text%3E%3Ctext x='7' y='404' transform='rotate(-90 7 404)'%3E400%3C/text%3E%3Ctext x='7' y='454' transform='rotate(-90 7 454)'%3E450%3C/text%3E%3Ctext x='7' y='504' transform='rotate(-90 7 504)'%3E500%3C/text%3E%3Ctext x='7' y='554' transform='rotate(-90 7 554)'%3E550%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  border-right: 1px solid #111;
  pointer-events: none;
  z-index: 1;
}

/* Streak content above the rulers + guides */
.misc-bento-streak > * { position: relative; z-index: 2; }

/* Hover — guides magenta plus visibles */
.misc-bento-streak:hover {
  --guide-color: #ff00b4;
}

/* Padding asymétrique — spécificité haute pour battre .misc-bento-card { padding } */
.misc-bento-card.misc-bento-streak {
  padding: var(--guide-inset) var(--s5) var(--s5) var(--guide-inset);
}

.streak-big {
  font-family: 'UnifrakturCook', cursive;
  line-height: 1;
  margin-bottom: var(--s1);
}

.streak-big span:first-child {
  font-size: var(--fs-h1);
  color: var(--text);
  letter-spacing: -0.02em;
}

.streak-big-unit {
  font-size: var(--fs-body);
  color: var(--text-secondary);
}

.streak-unit {
  color: var(--text-muted);
}

.streak-rest {
  font-family: 'UnifrakturCook', cursive;
  font-size: var(--fs-body);
  color: var(--text);
  line-height: 1.4;
}

.streak-sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--s2);
}

.misc-bento-games {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
}

.misc-bento-games:has(.game-capsule:hover),
.misc-bento-games:focus-within {
  z-index: 20;
}

.misc-bento-card {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--s5);
}

.misc-bento-music {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.misc-bento-music::before {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: url('logos/horn-apple.png') no-repeat center;
  background-size: contain;
  transform: rotate(-45deg);
  opacity: 0.08;
  pointer-events: none;
}

.misc-bento-music .music-card {
  max-width: none;
  width: 100%;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.misc-bento-music .music-cover-wrapper {
  padding: 0 var(--s6) var(--s3) var(--s6);
}

.misc-bento-music .music-cover {
  width: 100%;
}

.misc-bento-music .music-info {
  padding: 0;
  margin-top: var(--s3);
}

/* Annecy weather card */
.misc-bento-annecy {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.annecy-live {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--s1);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: var(--s1) var(--s2) var(--s1) var(--s2);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.annecy-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 4px #ef4444;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.annecy-webcam {
  position: absolute;
  top: 0;
  left: 0;
  width: 180%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  animation: webcam-pan 30s ease-in-out infinite alternate;
}

@keyframes webcam-pan {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-44%); }
}

.annecy-weather {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: var(--s5);
  transition: color 0.6s ease;
}

.annecy-weather-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  margin-bottom: var(--s3);
  transition: filter 0.6s ease;
}

.annecy-temp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-h2);
  color: var(--text);
  line-height: 1;
  transition: color 0.6s ease;
}

.annecy-condition {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: capitalize;
  margin-top: 2px;
  transition: color 0.6s ease;
}

.annecy-location {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--s2);
  letter-spacing: 0.05em;
  transition: color 0.6s ease;
}

/* Adaptive text — light text on dark backgrounds */
.annecy-weather.on-dark .annecy-temp { color: #fff; }
.annecy-weather.on-dark .annecy-condition,
.annecy-weather.on-dark .annecy-location { color: rgba(255,255,255,0.75); }
.annecy-weather.on-dark .annecy-weather-icon { filter: brightness(0) invert(1); }

/* Adaptive text — dark text on light backgrounds (default) */
.annecy-weather.on-light .annecy-temp { color: var(--text); }
.annecy-weather.on-light .annecy-condition,
.annecy-weather.on-light .annecy-location { color: var(--text-muted); }
.annecy-weather.on-light .annecy-weather-icon { filter: none; }

/* Live badge — adapt on very dark backgrounds */
.annecy-live.on-dark { background: rgba(0,0,0,0.55); }

/* CORS fallback — gradient overlay for guaranteed readability */
.annecy-gradient-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
  pointer-events: none;
}

.misc-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s4);
}

.games-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--s4);
}

.misc-block .stack-chip {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.card-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.card-label svg {
  width: 13px;
  height: 13px;
  opacity: 0.55;
}

/* ===== SOON PLACEHOLDER CARD ===== */
.misc-bento-soon {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.soon-tag {
  align-self: flex-start;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.soon-title {
  font-family: 'UnifrakturCook', 'Times New Roman', serif;
  font-size: var(--fs-h3);
  color: var(--text);
  line-height: 1;
  margin-top: var(--s3);
}

.soon-desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: var(--s2);
}

.soon-spinner {
  position: relative;
  display: inline-block;
  width: 1ch;
  height: 1em;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--text-muted);
  line-height: 1;
}

.soon-spinner > span {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: soonSpin 0.6s infinite steps(1);
}

.soon-spinner > span:nth-child(1) { animation-delay: 0s; }
.soon-spinner > span:nth-child(2) { animation-delay: 0.15s; }
.soon-spinner > span:nth-child(3) { animation-delay: 0.30s; }
.soon-spinner > span:nth-child(4) { animation-delay: 0.45s; }

@keyframes soonSpin {
  0%, 24% { opacity: 1; }
  25%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .soon-spinner > span { animation: none; }
  .soon-spinner > span:nth-child(1) { opacity: 1; }
}

/* ===== MUSIC CARD (Vinyl) ===== */
.music-card {
  max-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.music-cover-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--s4);
  overflow: hidden;
}

.music-cover {
  width: calc(100% - 10px);
  aspect-ratio: 1;
  background: #1a1a1a;
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 50%;
}

.music-card.is-playing .music-cover {
  animation: vinyl-spin 4s linear infinite;
}

.music-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle at center,
      transparent 0px,
      transparent 2px,
      rgba(0,0,0,0.2) 2px,
      rgba(0,0,0,0.2) 3px
    ),
    linear-gradient(
      135deg,
      transparent 25%,
      rgba(255,255,255,0.1) 45%,
      rgba(255,255,255,0.18) 50%,
      rgba(255,255,255,0.1) 55%,
      transparent 75%
    );
  z-index: 1;
}

.music-cover::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f3f3f3;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
  z-index: 2;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-info {
  padding: 0 var(--s4) var(--s3);
  text-align: center;
}

.lastfm-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.lastfm-artist {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

.lastfm-skeleton .music-cover { opacity: 0.3; }

/* ===== GAMES ===== */
.games-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s2);
}

.game-capsule {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: default;
}

.game-capsule img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: all 0.2s;
  display: block;
  border-radius: 6px;
}

.game-capsule:hover img {
  animation: vhs-jitter 0.12s steps(4) infinite;
}

/* VHS scanlines */
.game-capsule::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 6px;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.2) 2px,
    rgba(0,0,0,0.2) 4px
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 2;
}

.game-capsule:hover::before { opacity: 1; }

/* VHS band */
.game-capsule::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  clip-path: inset(0 0 0 0 round 6px);
}

.game-capsule:hover::after {
  opacity: 1;
  animation: vhs-band 0.6s infinite linear;
}

.game-capsule:hover {
  transform: translateY(-2px);
  transition: transform 0.2s;
}

/* Steam-style tooltip */
.game-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1b2838;
  color: #c6d4df;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-md);
  padding: var(--s2) var(--s3);
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.15s ease;
  border: 1px solid #2a475e;
  z-index: 10;
}

.game-tooltip .game-tag {
  color: #66c0f4;
  font-size: var(--fs-sm);
  display: block;
}

.game-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1b2838;
}

.game-capsule:hover .game-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes vhs-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 0); }
  50% { transform: translate(1px, 0); }
  75% { transform: translate(0, 1px); }
  100% { transform: translate(0, 0); }
}

@keyframes vhs-band {
  0% { top: -6px; }
  100% { top: 100%; }
}

/* ===== EXPERIENCE ===== */
.experience-section {
  padding: var(--section-py) 0;
}

.experience-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.experience-item {
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: var(--s5) var(--s6);
  column-gap: var(--s4);
  flex-wrap: wrap;
  cursor: pointer;
}

.experience-item:first-child { border-top: none; }

.experience-item .exp-body { cursor: auto; }

.exp-header { cursor: pointer; flex: 1; min-width: 0; }

/* ===== EXPERIENCE COMPANY LOGO BADGE — rounded square ===== */
.exp-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Inner edge that adapts to the background color */
.exp-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Typographic logo fallback — Agencies (triple A gothic) */
.exp-logo-agencies {
  background: #1a1a1a;
  color: #f5f2e8;
  flex-direction: column;
  gap: 1px;
}
.exp-logo-agencies span {
  font-family: 'UnifrakturCook', 'Times New Roman', serif;
  font-weight: 700;
  font-size: var(--fs-lg);
  line-height: 1;
}
.exp-logo-agencies span:nth-child(2) { opacity: 0.6; }
.exp-logo-agencies span:nth-child(3) { opacity: 0.3; }

@media (max-width: 720px) {
  .exp-logo { width: 40px; height: 40px; }
  .exp-logo-agencies span { font-size: var(--fs-base); }
}

.experience-item:last-child { border-bottom: none; }

.exp-outcome {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.3;
  margin-bottom: 2px;
}

.experience-item:hover {
  background: rgba(0,0,0,0.02);
}

.experience-item:hover .exp-outcome {
  animation: glitchText 200ms steps(2) forwards;
}

@keyframes glitchText {
  0%   { text-shadow: none; transform: none; }
  20%  { text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff; transform: translateX(2px); }
  40%  { text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; transform: translateX(-2px); }
  60%  { text-shadow: -1px 0 #ff00ff; transform: translateX(1px) skewX(-1deg); }
  80%  { text-shadow: 1px 0 #00ffff; transform: translateX(-1px); }
  100% { text-shadow: none; transform: none; }
}

.exp-info {
  font-size: var(--fs-md);
  color: var(--text-muted);
  line-height: 1.4;
}

.exp-company { font-weight: 500; color: var(--text-secondary); }
.exp-acq { font-weight: 400; color: var(--text-muted); font-size: 0.9em; }
.exp-dot { margin: 0 2px; }

.exp-location {
  font-size: var(--fs-base);
  color: var(--text-muted);
  white-space: nowrap;
}
.exp-location::before {
  content: " · ";
  margin: 0 2px;
  color: var(--text-muted);
}

.exp-toggle {
  cursor: pointer;
  font-size: var(--fs-body);
  color: var(--text-muted);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  transition: transform 0.2s;
  position: relative;
}

.experience-item:not(.open):hover .exp-toggle { color: transparent; }

.experience-item:not(.open):hover .exp-toggle::after {
  content: "CLIC!";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', cursive;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  pointer-events: none;
  animation: clicBlink 0.35s steps(2) infinite;
}

@keyframes clicBlink {
  0%, 49% {
    color: #ff0066;
    text-shadow: 1.5px 1.5px 0 #ffcc00, -1.5px -1.5px 0 #00ccff;
    transform: translate(-50%, -50%) rotate(-3deg);
  }
  50%, 100% {
    color: #ffcc00;
    text-shadow: -1.5px -1.5px 0 #ff0066, 1.5px 1.5px 0 #00ccff;
    transform: translate(-50%, -50%) rotate(3deg) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .experience-item:not(.open):hover .exp-toggle::after {
    animation: none;
    color: #ff0066;
  }
}

.exp-date {
  flex: 0 0 auto;
  font-family: 'UnifrakturCook', 'Times New Roman', serif;
  font-size: var(--fs-base);
  line-height: 1;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
}


.experience-item.open .exp-toggle { transform: rotate(45deg); }

.exp-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  grid-column: 1 / -1;
  width: 100%;
}

.experience-item.open .exp-body { max-height: 2000px; }

.exp-body p {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: 1.5;
  margin: var(--s3) 0 var(--s4);
}

.exp-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--text);
  margin-bottom: var(--s5);
  transition: gap 0.2s ease;
}
.exp-cta:hover { gap: var(--s3); }
.exp-cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ===== GALLERY (Image carousel) ===== */
.gallery-wrapper {
  position: relative;
  margin-top: var(--s4);
  width: 100%;
  max-width: 100%;
}

.experience-gallery {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
}

.experience-gallery::-webkit-scrollbar { display: none; }

.experience-gallery .exp-img {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: #f3f3f3;
}

.experience-gallery .exp-img img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s2);
  margin-top: var(--s2);
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--text-muted);
}

.gallery-arrow {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--text);
  transition: opacity 0.2s;
}

.gallery-arrow:hover { opacity: 0.6; }

.gallery-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-counter {
  font-variant-numeric: tabular-nums;
}

/* ===== INVERTED BLOCK ("My craft") ===== */
.inverted-block {
  background: var(--text);
  color: var(--bg);
  padding: var(--section-py) 0;
}

.inverted-block > .wrapper > p {
  font-size: var(--fs-body);
  color: #777;
  line-height: 1.8;
}

.inverted-block .stack-chip {
  background: #2a2a2a;
  border-color: #333;
  color: #fafafa;
}

.inverted-block .stack-chip.dead { opacity: 0.35; }

/* Process grid */
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.process-step {
  padding: var(--s8);
  border-top: 1px solid #333;
}

.process-step:nth-child(even) {
  border-left: 1px solid #333;
}

.process-step:nth-last-child(-n+2) {
  border-bottom: none;
}

/* What's next */
.process-step-next {
  background: rgba(0,0,0,0.2);
}

.section-sub {
  font-size: var(--fs-body);
  color: var(--text-muted);
  margin: 0 0 var(--s6);
  line-height: 1.6;
}

.inverted-block > .wrapper > .section-sub { color: #999; }

.process-num {
  font-family: 'UnifrakturCook', cursive;
  font-size: var(--fs-md);
  color: #555;
  margin-bottom: var(--s2);
}

.process-title {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--bg);
  margin-bottom: var(--s2);
  line-height: 1.3;
}

.process-desc {
  font-size: var(--fs-md);
  color: #888;
  line-height: 1.7;
}

/* Stack as grid card — full width */
.process-step-stack {
  grid-column: 1 / -1;
}

.process-step-stack .stack-chips {
  margin-top: var(--s2);
}

/* ===== INVESTMENTS (inside Experience) ===== */
.investments-banner {
  margin-top: var(--s3);
  padding: var(--s5);
  background: #1a1a1a;
  border-radius: 12px;
}

.investments-title {
  font-size: var(--fs-body);
  font-weight: 600;
  color: #fafafa;
  margin-bottom: var(--s1);
}

.investments-sub {
  font-size: var(--fs-md);
  color: #888;
  line-height: 1.5;
  margin-bottom: var(--s6);
}

.investments-link {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s;
}

.investments-link:hover { color: #fff; }

.investments-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.investment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  flex: 1;
}

.investment-logo {
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.investment-card:hover .investment-logo {
  opacity: 1;
}

.investment-logo img {
  max-width: 80%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.investment-year {
  font-family: 'UnifrakturCook', cursive;
  font-size: var(--fs-xs);
  line-height: 1;
  color: #888;
}


/* ===== SEPARATOR ===== */
.gothic-sep {
  text-align: center;
  padding: var(--s6) 0;
  color: var(--border);
  font-size: var(--fs-lg);
  letter-spacing: 0.3em;
  user-select: none;
  opacity: 0.5;
}

/* ===== FOOTER CTA ===== */
.footer-cta {
  background: var(--text);
  color: var(--bg);
  padding: var(--section-py) 0 var(--s6);
}

html {
  background: var(--text);
}

/* Home has a light hero (top) and a dark footer (bottom). Paint the html
   root with a viewport-fixed 50/50 split so overscroll shows the right
   color at each end — no light-grey band below the footer. */
html[data-version="v4"] {
  background: linear-gradient(to bottom, #f3f3f3 50%, var(--text) 50%);
  background-attachment: fixed;
}

.footer-cta-block {
  text-align: left;
  max-width: 640px;
  margin-bottom: var(--s20);
}

.footer-heading {
  font-family: 'Sora', sans-serif;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--s4);
}

.footer-sub {
  font-size: var(--fs-body);
  color: #888;
  line-height: 1.7;
  margin-bottom: var(--s8);
}

.footer-actions {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  color: var(--bg);
  background: transparent;
  text-decoration: none;
  padding: var(--s3) var(--s5);
  border-radius: 8px;
  border: 1px solid #333;
  transition: border-color 0.2s, background 0.2s;
}

.footer-btn:hover {
  border-color: #666;
  background: rgba(255,255,255,0.05);
}

.footer-btn-primary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--bg);
}

.footer-btn-primary:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
}

.footer-btn svg,
.footer-btn img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: var(--s6);
  border-top: 1px solid #2a2a2a;
  font-size: var(--fs-base);
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.footer-credit {
  font-family: 'UnifrakturCook', cursive;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: var(--s4);
}

/* ===== VISITOR COUNTER (GeoCities) ===== */
.visitor-counter {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-lg);
  color: #555;
}

.visitor-counter .counter-label { opacity: 0.7; }

.visitor-digits {
  display: flex;
  gap: 2px;
}

.visitor-digit {
  background: #111;
  border: 1px solid #333;
  color: #ef4444;
  font-family: 'UnifrakturCook', cursive;
  font-weight: 700;
  font-size: var(--fs-h5);
  line-height: 1;
  width: 18px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 6px #ef4444;
}

/* ICQ Button & Popup */
.footer-btn-icq {
  cursor: pointer;
  border-color: #333;
  background: transparent;
}

.icq-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.icq-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  width: 340px;
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.icq-popup.visible { display: block; }

.icq-popup-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: var(--fs-lg);
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icq-popup-close {
  background: #c0c0c0;
  border: 2px outset #fff;
  color: #000;
  font-size: var(--fs-lg);
  line-height: 1;
  padding: 0 var(--s1);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.icq-popup-close:active { border-style: inset; }

.icq-popup-body {
  padding: var(--s6) var(--s5);
  text-align: center;
}

.icq-popup-logo {
  width: 48px;
  height: 48px;
  margin-bottom: var(--s3);
  image-rendering: auto;
}

.icq-status-big {
  font-size: var(--fs-h4);
  color: #cc0000;
  margin-bottom: var(--s2);
}

.icq-status-sub {
  font-size: var(--fs-lg);
  color: #444;
  line-height: 1.5;
  margin-bottom: var(--s4);
}

.icq-email-btn {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-body);
  color: #fff;
  background: #000080;
  border: 2px outset #aaa;
  padding: var(--s2) var(--s4);
  text-decoration: none;
  cursor: pointer;
}

.icq-email-btn:active { border-style: inset; }

/* IE Badge */
.ie-badge {
  display: inline-block;
  line-height: 0;
}
.ie-badge img {
  width: 95px;
  height: auto;
  display: block;
}
.ie-badge:hover img,
.ie-badge:focus-visible img {
  outline: 2px solid #000080;
  outline-offset: 2px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  cursor: zoom-out;
  overflow: hidden;
}

.lightbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  will-change: transform;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-track.no-anim { transition: none; }

.lightbox-slide {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-slide > img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #fff;
  font-size: var(--fs-h3);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}

.lightbox-nav:hover { opacity: 1; background: rgba(255,255,255,0.16); }
.lightbox-nav[hidden] { display: none; }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  letter-spacing: 0.5px;
  pointer-events: none;
}

@media (max-width: 720px) {
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s4);
  background: var(--text);
  color: var(--bg);
  padding: var(--s2) var(--s4);
  border-radius: 6px;
  font-size: var(--fs-md);
  font-weight: 500;
  z-index: 10001;
  transition: top 0.2s;
}

.skip-link:focus { top: var(--s4); }

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .wrapper { padding: 0 var(--s6); }
  .hero-bg { min-height: 100svh; height: auto; max-height: none; }
  .hero { padding-bottom: 0; }
  .hero-content { padding: var(--s8) 0 var(--s10); }
  .hero h1 { font-size: 10vw; }
  nav .nav-links { gap: var(--s4); }

  .bento { grid-template-columns: 1fr; gap: var(--s3); }
  .card-full { grid-column: span 1; }

  /* Bento mobile — 2 columns */
  .misc-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "streak music"
      "games  soon"
      "annecy annecy";
  }
  .misc-bento-streak { grid-area: streak; }
  .misc-bento-music  { grid-area: music; }
  .misc-bento-games  { grid-area: games; }
  .misc-bento-soon   { grid-area: soon; }
  .misc-bento-annecy { grid-area: annecy; }

  /* Music — small centered vinyl in narrower column */
  .misc-bento-music::before { display: none; }
  .misc-bento-music .music-cover-wrapper {
    padding: 0;
    margin: var(--s2) 0;
  }
  .misc-bento-music .music-cover {
    width: 80px;
  }
  .misc-bento-music .music-info {
    margin-top: var(--s3);
  }

  /* Games — capsules carrées qui s'enchaînent et wrap naturellement */
  .games-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s1);
  }
  .games-list .game-capsule {
    width: 36px;
    aspect-ratio: 1;
  }
  .music-card { max-width: 160px; }
  .footer-bottom { flex-direction: column; gap: var(--s3); align-items: center; }
  .footer-bottom-left { flex-direction: column; gap: var(--s1); }

  .process-grid { grid-template-columns: 1fr; }
  .process-step {
    padding: var(--s6) 0;
    border-left: none;
  }
  .process-step:nth-child(even) {
    border-left: none;
  }
  .process-step-stack {
    padding: var(--s6) 0;
  }
  .process-step-next {
    background: transparent;
  }
  .stack-chips {
    gap: var(--s2);
  }

  /* === MOBILE FIXES === */

  /* Touch targets ≥ 44px */
  .cta-main, .cta-secondary, .cta-links a, .footer-btn {
    min-height: 44px;
  }

  /* CTA group — links flow inline after Let's talk, wrap one-by-one as needed */
  .hero .cta-group {
    row-gap: var(--s2);
    column-gap: var(--s2);
  }
  .cta-book { margin-left: 0; }
  .availability-tag { margin-left: 0; }
  .cta-group:not(.open) .cta-links {
    display: none;
  }
  .cta-group.open .cta-links {
    display: contents;
  }

  /* Experience item — 3-row stack: date / logo+title / info, toggle centered across the whole card */
  .experience-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    grid-template-areas:
      "date  date    toggle"
      "logo  title   toggle"
      "info  info    toggle";
    column-gap: var(--s3);
    row-gap: var(--s2);
    padding: var(--s4) var(--s5);
    align-items: center;
  }
  .exp-date {
    grid-area: date;
    margin: 0;
    font-size: var(--fs-sm);
    align-self: center;
  }
  .exp-toggle {
    grid-area: toggle;
    align-self: center;
    width: auto;
    padding: 0 4px;
    margin: 0;
  }
  .exp-logo { grid-area: logo; align-self: center; }
  .exp-header { display: contents; }
  .exp-outcome {
    grid-area: title;
    align-self: center;
    font-size: 16px;
  }
  .exp-info {
    grid-area: info;
    font-size: 12px;
    line-height: 1.4;
  }
  .exp-location { display: block; margin-top: 2px; }
  .exp-location::before { content: ""; margin: 0; }
  .exp-body { grid-column: 1 / -1; }

  /* Footer CTA actions: stack vertical, full width */
  .footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-btn {
    justify-content: center;
  }

  /* Investments — 2-column grid on mobile */
  .investments-logos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s5) var(--s4);
    justify-content: stretch;
  }
}

/* No-hover devices: disable hover-only effects so they don't stick on tap */
@media (hover: none) {
  .experience-item:hover { background: transparent; }
  .experience-item:hover .exp-outcome { animation: none; }
  .experience-item:not(.open):hover .exp-toggle { color: var(--text-muted); }
  .experience-item:not(.open):hover .exp-toggle::after { content: none; animation: none; }
}

