/* =============================================
   mathilde-chesneau.com — Architect & Urban Designer
   Light theme, teal/emerald cycling urbanism palette
   ============================================= */

/* --- Design Tokens --- */
:root {
  --bg: #fafaf9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f5f5f4;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --accent-dark: #0f766e;
  --accent-glow: rgba(13,148,136,0.08);
  --warm: #b45309;
  --warm-light: #d97706;
  --gradient-start: #0d9488;
  --gradient-end: #059669;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --font-heading: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- Language System --- */
html[lang="fr"] .lang-en { display: none !important; }
html[lang="en"] .lang-fr { display: none !important; }

/* --- Language Switch --- */
.lang-switch {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
}
.lang-btn {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color .25s;
}
.lang-btn.active { color: #fff; }
.lang-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: var(--accent);
  border-radius: 4px;
  transition: transform .3s var(--ease);
}
.lang-switch[data-active="en"] .lang-slider {
  transform: translateX(100%);
}

/* --- Loader --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s var(--ease), visibility .5s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-bike { width: 140px; animation: lb-float 1.5s ease-in-out infinite 1.1s; }
.lb { animation: lb-draw 0.4s ease-out forwards; }
.lbw { stroke-dasharray: 88; stroke-dashoffset: 88; animation-duration: 0.5s; }
.lbw2 { animation-delay: 0.15s; }
.lbs { stroke-dasharray: 28; stroke-dashoffset: 28; animation-delay: 0.25s; opacity: 0.4; stroke-width: 0.8; }
.lbs2 { animation-delay: 0.3s; }
.lbfr { stroke-dasharray: 250; stroke-dashoffset: 250; animation-delay: 0.35s; animation-duration: 0.6s; }
.lbhd { stroke-dasharray: 30; stroke-dashoffset: 30; animation-delay: 0.7s; animation-duration: 0.25s; }
.lbst { stroke-dasharray: 10; stroke-dashoffset: 10; animation-delay: 0.8s; animation-duration: 0.15s; stroke-width: 3; }
.lbp { stroke-dasharray: 15; stroke-dashoffset: 15; animation-delay: 0.85s; animation-duration: 0.2s; }
.lb-spin-r { transform-origin: 22px 45px; animation: lb-spin 3s linear infinite 1.1s; }
.lb-spin-f { transform-origin: 78px 45px; animation: lb-spin 3s linear infinite 1.1s; }
@keyframes lb-draw { to { stroke-dashoffset: 0; } }
@keyframes lb-spin { to { transform: rotate(360deg); } }
@keyframes lb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* --- Subtle Grid Overlay (architectural) --- */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(0,0,0,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.3) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background .3s, backdrop-filter .3s, padding .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(250,250,249,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-logo .accent { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color .25s;
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width .3s var(--ease);
}
.nav-link:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6rem 2rem 4rem;
  background: var(--bg);
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: center;
}
.hero-content { position: relative; z-index: 1; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(13,148,136,0.15);
  border-radius: 100px;
}
.hero-label svg { flex-shrink: 0; }
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  z-index: 1;
}
.hero-photo-wrapper {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-lg);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo-accent {
  position: absolute;
  bottom: -6px;
  left: 1rem;
  right: 1rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gradient-end));
}
.hero-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-meta-item svg { color: var(--accent); flex-shrink: 0; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13,148,136,0.25);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.btn-secondary:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
}

/* --- Sections --- */
.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
  position: relative;
  z-index: 1;
}
.section--alt { background: var(--bg-surface); }
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}
.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 3rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* --- About --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.about-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.about-text strong { color: var(--text); }
.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.highlight-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.highlight-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
}
.highlight-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.highlight-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Expertise --- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.expertise-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity .3s;
}
.expertise-card:hover::before { opacity: 1; }
.expertise-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--accent-glow);
  color: var(--accent);
}
.expertise-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.expertise-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --- Experience Timeline --- */
.timeline { position: relative; padding-left: 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  display: flex;
  gap: 2rem;
  padding-bottom: 2.5rem;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  color: var(--accent);
}
.timeline-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s, box-shadow .3s;
}
.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}
.timeline-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.timeline-company {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.timeline-company a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.timeline-company a:hover { color: var(--accent-dark); }
.timeline-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* --- Tags --- */
.tag {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  border: 1px solid rgba(13,148,136,0.12);
}
.tag--warm {
  background: rgba(180,83,9,0.06);
  color: var(--warm);
  border-color: rgba(180,83,9,0.12);
}

/* --- Education --- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.education-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.education-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.education-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.education-degree {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.education-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 600px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
}
.contact-card h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: var(--text);
}
.contact-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Legal Page --- */
.legal-content { max-width: 700px; }
.legal-block { margin-bottom: 2.5rem; }
.legal-block h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.legal-block p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.inline-link:hover { color: var(--accent-dark); }

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero-photo-wrapper { max-width: 280px; }
  .about-content { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { max-width: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 5rem 1.5rem 3rem; }
  .container { padding: 0 1.5rem; }
  .expertise-grid { grid-template-columns: 1fr; }
  .education-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .timeline::before { left: 23px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-meta { flex-direction: column; gap: 0.5rem; }
  .timeline-item { flex-direction: column; gap: 1rem; }
  .timeline::before { display: none; }
}

/* --- Hero Background Canvas --- */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* --- Game Button --- */
.btn-game {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.btn-game:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
}

/* --- Game Overlay --- */
.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.game-overlay.active { opacity: 1; visibility: visible; }
body.game-active { overflow: hidden; }
.game-container {
  position: relative;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 900px;
  max-width: 95vw;
}
.game-container canvas {
  display: block;
  width: 100%;
  height: auto;
}
.game-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1;
}
.game-close:hover { background: rgba(0,0,0,0.6); }

/* --- Game Panel (game over overlay) --- */
.gp {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(28,25,23,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: #fff;
  z-index: 2;
}
.gp.active { display: flex; }
.gp h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}
.gp-score {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #14b8a6;
  margin-bottom: 0.2rem;
}
.gp-best {
  font-size: 0.9rem;
  color: #a8a29e;
  margin-bottom: 0.3rem;
}
.gp-hit {
  font-size: 0.85rem;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}
.gp-record-holder {
  font-size: 0.85rem;
  color: #a8a29e;
  margin-bottom: 1rem;
}
.gp-name-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: 260px;
}
.gp-name-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color .2s;
}
.gp-name-row input::placeholder { color: rgba(255,255,255,0.35); }
.gp-name-row input:focus { border-color: var(--accent); }
.gp-btn {
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.gp-btn:hover { transform: scale(1.04); }
.gp-btn:active { transform: scale(0.97); }
.gp-btn-save {
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}
.gp-btn-replay {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.2);
  width: 100%;
  max-width: 260px;
  margin-bottom: 1rem;
}
.gp-board {
  width: 100%;
  max-width: 260px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 0.8rem;
  color: #d6d3d1;
}
.gp-board table { width: 100%; border-collapse: collapse; }
.gp-board th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #78716c;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gp-board td { padding: 0.2rem 0; }
.gp-board td:first-child { text-align: left; }
.gp-board td:last-child { text-align: right; font-weight: 600; color: #14b8a6; }
.gp-board tr.gp-me td { color: #fbbf24; }

/* --- Game Mobile Fullscreen --- */
@media (max-width: 768px) {
  .game-overlay.active { align-items: stretch; }
  .game-container {
    border-radius: 0;
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .game-container {
    justify-content: center;
    background: #1c1917;
  }
  .game-container canvas {
    max-width: none;
    width: 100%;
    flex: none;
    object-fit: contain;
  }
  .gp h3 { font-size: 1.3rem; }
  .gp-score { font-size: 1.4rem; }
}

/* --- Custom Cursor (desktop only) --- */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor, body.custom-cursor * { cursor: none !important; }
  body.custom-cursor .game-overlay, body.custom-cursor .game-overlay * { cursor: auto !important; }
}
.cursor-wheel {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  transition: width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease);
  will-change: transform;
}
.cursor-wheel.hover {
  width: 38px;
  height: 38px;
  margin-left: -19px;
  margin-top: -19px;
}
.cursor-wheel svg { width: 100%; height: 100%; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .hero-bg { display: none; }
}
