:root {
  --bg: #030a24;
  --bg-soft: #0b1f4d;
  --accent: #00ffd8;
  --accent-soft: rgba(0,255,230,0.38);
  --accent-strong: #42f7ff;
  --border-soft: rgba(210,255,255,0.12);
  --text-main: #defbff;
  --text-soft: #b8f4ff;
  --text-muted: #72dbff;
  --text-gold: #4ef7ff;
  --text-gold-deep: #1de9ff;
  --radius-card: 28px;
  --card-fill: linear-gradient(165deg, rgba(8,14,52,0.98), rgba(2,10,28,0.96));
  --card-border-gradient: linear-gradient(135deg, rgba(16,255,220,0.18), rgba(12,28,90,0.85), rgba(16,255,220,0.12));
  --card-shadow: 0 25px 55px rgba(4,8,22,0.88), 0 0 20px rgba(4,8,22,0.55);
  --glow-gold: rgba(0,255,213,0.2);
  --glow-ember: rgba(255,0,230,0.18);
  --vh: 1vh;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(circle at 18% 10%, rgba(10,18,60,0.35), rgba(4,8,22,0) 45%),
    radial-gradient(circle at 78% 6%, rgba(12,24,88,0.25), rgba(4,8,22,0) 38%),
    linear-gradient(180deg, #05122f 0%, #030a24 45%, #010a1c 100%);
  background-color: var(--bg);
  color: var(--text-main);
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
}
body::before,
body::after {
  content: "";
  position: fixed;
  width: 45vw;
  height: 45vw;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.25;
  z-index: -3;
  pointer-events: none;
  mix-blend-mode: screen;
  animation:
    auroraFloat 18s ease-in-out infinite,
    auroraSparkle 4s ease-in-out infinite alternate;
  box-shadow: 0 0 60px rgba(8,14,38,0.6);
}
body::before {
  top: -30%;
  left: -20%;
  background: radial-gradient(circle, rgba(14,30,96,0.4), rgba(2,8,22,0));
}
body::after {
  bottom: -30%;
  right: -12%;
  background: radial-gradient(circle, rgba(12,26,96,0.35), rgba(2,8,22,0));
  animation-delay: -6s;
}

.pink-fluid {
  position: fixed;
  inset: -25% -10% auto -10%;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  filter: blur(45px);
  opacity: 0.45;
  mix-blend-mode: screen;
}
.pink-fluid::before,
.pink-fluid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 40%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,36,220,0.5), rgba(255,36,220,0) 50%),
    radial-gradient(circle at 75% 40%, rgba(80,130,255,0.32), rgba(80,130,255,0) 55%),
    radial-gradient(circle at 50% 70%, rgba(0,255,213,0.25), rgba(0,255,213,0) 55%);
  animation: pinkFluidDrift 18s ease-in-out infinite alternate;
}
.pink-fluid::after {
  inset: 10% 5% 5% 15%;
  background:
    radial-gradient(circle at 20% 60%, rgba(255,90,245,0.35), rgba(255,90,245,0) 55%),
    radial-gradient(circle at 70% 25%, rgba(0,220,255,0.28), rgba(0,220,255,0) 50%);
  animation-duration: 22s;
  animation-delay: -6s;
}

@keyframes pinkFluidDrift {
  0% { transform: translate3d(0, -6%, 0) scale(1); opacity: 0.42; }
  50% { transform: translate3d(-2%, 4%, 0) scale(1.04); opacity: 0.5; }
  100% { transform: translate3d(3%, 8%, 0) scale(1.08); opacity: 0.44; }
}

@keyframes auroraFloat {
  0% { transform: translate3d(0,0,0) scale(0.9); opacity: 0.28; }
  40% { transform: translate3d(6%, -4%, 0) scale(1.05); opacity: 0.4; }
  70% { transform: translate3d(-4%, 6%, 0) scale(0.95); opacity: 0.32; }
  100% { transform: translate3d(0,0,0) scale(0.9); opacity: 0.28; }
}
@keyframes auroraSparkle {
  0% { filter: blur(120px); opacity: 0.2; }
  50% { filter: blur(110px); opacity: 0.32; }
  100% { filter: blur(120px); opacity: 0.24; }
}

a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
a:hover {
  color: var(--text-main);
  text-shadow: 0 0 14px rgba(0,255,213,0.3);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(140deg, rgba(8,14,46,0.94), rgba(2,8,22,0.85));
  border-bottom: 1px solid rgba(210,255,255,0.08);
  box-shadow:
    0 25px 50px rgba(4,8,22,0.8),
    0 0 22px rgba(255,24,230,0.16);
  padding-top: env(safe-area-inset-top, 0);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
  color: transparent;
  background: linear-gradient(115deg, rgba(255,24,230,0.95), rgba(0,220,255,0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 18px rgba(0,255,213,0.2),
    0 0 32px rgba(4,8,22,0.55);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.nav-link {
  padding: .35rem .95rem;
  border-radius: 999px;
  font-size: .82rem;
  text-decoration: none;
  border: 1px solid rgba(0,255,213,0.55);
  background: linear-gradient(135deg, rgba(10,18,60,0.95), rgba(4,10,32,0.9));
  box-shadow:
    0 0 0 1px rgba(0,255,213,0.25),
    inset 0 0 12px rgba(210,255,255,0.04),
    0 0 14px rgba(255,24,230,0.14);
  color: var(--text-gold);
  text-shadow:
    0 0 6px rgba(210,255,255,0.18),
    0 0 12px rgba(0,255,213,0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 25px rgba(4,8,22,0.65),
    inset 0 0 14px rgba(0,255,213,0.18),
    0 0 20px rgba(255,24,230,0.18);
}

.nav-link-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  color: #ff00f0;
}
.nav-link-games {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  color: #d9fff8;
  border-color: rgba(0,255,213,0.35);
  margin-left: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.nav-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06f6ff;
  transform: translateX(-60%);
  margin-left: -6px;
  box-shadow:
    0 0 0 7px rgba(0,255,255,0.08),
    0 0 10px rgba(0,255,255,0.65),
    0 0 20px rgba(0,255,255,0.35);
  animation: navLivePulse 1s ease-in-out infinite alternate;
  display: inline-block;
}
.nav-game-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(0,255,213,0.85), rgba(0,120,160,0.85));
  border: 1px solid rgba(0,255,213,0.35);
  transform: none;
  margin-left: -4px;
  box-shadow:
    inset 0 0 4px rgba(4,8,22,0.6),
    0 0 6px rgba(0,255,213,0.25);
  animation: none;
  display: inline-block;
}
.nav-game-dot::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  top: 3px;
  left: 3px;
}
@keyframes navLivePulse {
  0% { transform: scale(0.85); opacity: 0.65; }
  100% { transform: scale(1.1); opacity: 1; }
}
@keyframes navGamePulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.05); opacity: 0.9; }
}

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 1.1rem;
  touch-action: manipulation;
}

/* Layout */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem calc(3.5rem + env(safe-area-inset-bottom, 0));
}

html.nav-open,
html.nav-open body {
  overflow: hidden;
}

html.nav-open.nav-open-ios,
body.nav-open-ios {
  overflow: auto;
}

.section {
  padding: 3.2rem 0 2.2rem;
  position: relative;
}
.section#competences {
  margin-top: 5rem;
}
.section::before {
  content: "";
  position: absolute;
  top: 5%;
  bottom: 5%;
  left: 0;
  width: 120px;
  background: linear-gradient(180deg, rgba(3,10,32,0), rgba(12,28,90,0.25), rgba(3,10,32,0));
  opacity: 0.4;
  filter: blur(40px);
  pointer-events: none;
}
.section::after {
  content: "";
  position: absolute;
  top: 15%;
  bottom: 15%;
  right: 0;
  width: 140px;
  background: linear-gradient(180deg, rgba(3,10,32,0), rgba(12,22,88,0.3), rgba(3,10,32,0));
  opacity: 0.35;
  filter: blur(45px);
  pointer-events: none;
}
.section > * {
  position: relative;
  z-index: 1;
}

/* Palette typographique dorée */
h1, h2, h4, h5, h6 {
  margin: 0 0 .7rem;
  color: var(--text-main);
  text-shadow:
    0 12px 30px rgba(4,8,22,0.65),
    0 0 18px rgba(0,255,213,0.35);
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.2rem;
  background: linear-gradient(115deg, rgba(255,24,230,0.95), rgba(0,220,255,0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 {
  font-size: 2.3rem;
  color: var(--text-main);
}

p {
  margin: 0 0 .7rem;
  line-height: 1.55;
  color: var(--text-soft);
  font-size: .96rem;
}

ul {
  margin: .1rem 0 .4rem;
  padding-left: 1.2rem;
  color: var(--text-soft);
  font-size: .95rem;
}

strong,
em {
  color: var(--text-main);
  text-shadow: 0 0 12px rgba(0,255,213,0.2);
}

label,
small {
  color: var(--text-soft);
}

/* Hero */

.hero {
  padding-top: 1.2rem;
  margin-top: -2rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.hero-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: .45rem;
  padding: .5rem 1.55rem;
  border-radius: 999px;
  font-size: .88rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(210,255,255,0.15);
  background: linear-gradient(135deg, rgba(10,20,70,0.9), rgba(3,10,30,0.85));
  box-shadow:
    inset 0 0 12px rgba(210,255,255,0.05),
    0 12px 24px rgba(4,8,22,0.55),
    0 0 18px rgba(255,24,230,0.18);
  margin: 0 auto 0.9rem;
}
.hero-pill-label {
  background: linear-gradient(115deg, rgba(255,24,230,0.95), rgba(0,220,255,0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 0 14px rgba(0,255,213,0.25),
    0 0 32px rgba(4,8,22,0.55);
}

.hero-title {
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
  line-height: 1.04;
  margin-bottom: 0.55rem;
  letter-spacing: 0.06em;
  word-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow:
    0 10px 24px rgba(4,8,22,0.7),
    0 0 14px rgba(0,255,213,0.15);
  white-space: nowrap;
}

.hero-sub {
  max-width: 610px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-main);
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Source Code Pro", "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow:
    0 6px 16px rgba(4,8,22,0.65),
    0 0 14px rgba(0,255,255,0.22);
}

@media (max-width: 960px) {
  .hero-title {
    white-space: normal;
    word-spacing: 0.1em;
    letter-spacing: 0.035em;
  }
}

.hero-actions {
  margin-top: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.hero-cta-group {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-width: 220px;
  align-items: stretch;
}

.hero-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(210,255,255,0.15);
  color: var(--text-gold);
  text-decoration: none;
  font-size: .88rem;
  letter-spacing: 0.01em;
  width: 100%;
  background: linear-gradient(160deg, rgba(8,14,52,0.95), rgba(3,10,30,0.85));
  box-shadow:
    0 10px 35px rgba(4,8,22,0.75),
    inset 0 0 20px rgba(210,255,255,0.04);
  text-shadow:
    0 0 6px rgba(210,255,255,0.18),
    0 0 12px rgba(0,255,213,0.32);
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.hero-cta:hover {
  border-color: rgba(0,255,213,0.4);
  color: var(--text-gold);
  box-shadow:
    0 18px 40px rgba(4,8,22,0.8),
    0 0 30px rgba(0,255,213,0.25);
  transform: translateY(-2px);
}
.hero-cta-linkedin {
  background: linear-gradient(160deg, rgba(8,14,52,0.95), rgba(3,10,30,0.85));
}
.hero-cta-linkedin:hover {
  border-color: rgba(0,255,213,0.4);
  box-shadow:
    0 18px 40px rgba(4,8,22,0.8),
    0 0 30px rgba(0,255,213,0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem;
  border: 1px solid rgba(210,255,255,0.18);
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(10,18,66,0.95), rgba(2,10,24,0.85));
  color: var(--text-main);
  box-shadow:
    0 12px 28px rgba(4,8,22,0.75),
    inset 0 0 18px rgba(210,255,255,0.08);
}

.btn-outline {
  background: rgba(8,14,46,0.4);
  border: 1px solid rgba(210,255,255,0.18);
  color: var(--text-soft);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.4rem 0 .6rem;
}

.card,
.pill-card {
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  background:
    var(--card-fill) padding-box,
    var(--card-border-gradient) border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    var(--card-shadow),
    0 0 18px rgba(255,24,230,0.16);
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.pill-card {
  display: block;
  padding: .8rem 1.1rem;
  text-decoration: none;
  font-size: .88rem;
  color: var(--text-main);
}

.pill-card strong {
  font-size: .95rem;
  background: linear-gradient(115deg, rgba(255,24,230,0.95), rgba(0,220,255,0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pill-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 22px rgba(0,255,213,0.28),
    0 30px 46px rgba(4,8,22,0.7);
}
.pill-card::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle, rgba(120,255,245,0.22), rgba(0,255,213,0));
  transform: rotate(35deg);
  opacity: 0.6;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.pill-card:hover::after {
  transform: rotate(10deg) translateX(-10%);
  opacity: 0.95;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.6rem;
}

.tag {
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(210,255,255,0.08);
  background: rgba(8,14,52,0.8);
  font-size: .8rem;
  text-decoration: none;
  color: var(--text-soft);
}

.tag:hover {
  border-color: rgba(0,255,213,0.6);
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  text-align: center;
}

.hero-photo-card {
  width: 260px;
  height: 260px;
  border-radius: 28px;
  padding: .7rem;
  border: 2px solid rgba(0,255,213,0.55);
  background: radial-gradient(circle at top left, rgba(0,255,213,0.25), rgba(3,10,32,0.96));
  box-shadow:
    0 25px 50px rgba(4,8,22,0.85),
    0 0 40px rgba(0,255,213,0.2);
  opacity: 0;
  transform: scale(1.08);
  position: relative;
  overflow: hidden;
  animation: heroPhotoReveal 1.6s ease-out forwards;
  animation-delay: 0.5s;
}

.hero-photo-card::after {
  content: none;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  filter: none;
  transition: transform 1.2s ease;
}

.hero-photo::selection {
  background: transparent;
}

body.loaded .hero-photo-card::after {
  opacity: 0;
}

body.loaded .hero-photo {
  transform: scale(1.01);
}

@keyframes heroPhotoReveal {
  0% { opacity: 0; transform: scale(1.2) translateY(20px); filter: blur(4px); }
  40% { opacity: 0.6; transform: scale(1.08) translateY(5px); filter: blur(2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Grid & cards */

.grid {
  display: grid;
  gap: 1.3rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .8rem;
  font-size: .88rem;
}

.table th,
.table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid rgba(210,255,255,0.08);
}

.table th {
  text-align: left;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.card {
  display: block;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--text-main);
}
.card::before {
  content: "";
  position: absolute;
  inset: -40% 15% auto;
  height: 70%;
  background: radial-gradient(circle, rgba(135,255,248,0.42), rgba(3,10,32,0));
  opacity: 0.5;
  filter: blur(12px);
  transition: transform .4s ease, opacity .4s ease;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 30% -30% -40%;
  background: radial-gradient(circle, rgba(0,255,213,0.32), rgba(3,10,32,0));
  opacity: 0.4;
  transform: rotate(20deg);
  transition: transform .4s ease, opacity .4s ease;
  pointer-events: none;
}

.card h3 {
  margin-top: 0;
  margin-bottom: .4rem;
 	font-size: 1.02rem;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow:
    0 0 22px rgba(0,255,213,0.32),
    0 32px 52px rgba(4,8,22,0.82);
}
.card:hover::before {
  transform: translateY(10%) scale(1.1);
  opacity: 0.65;
}
.card:hover::after {
  transform: translateY(-10%) rotate(5deg);
  opacity: 0.55;
}

.small {
  font-size: .84rem;
  color: var(--text-muted);
}

.card .small a,
.card .small a:visited {
  color: var(--text-main);
  background: rgba(210,255,255,0.12);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.card .small a:hover,
.card .small a:focus-visible {
  background: rgba(210,255,255,0.22);
  box-shadow: 0 0 14px rgba(0,255,213,0.45);
}
.card .small .source-link,
.card .small .source-link:visited {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  border-radius: 16px;
  padding: 0.45rem 0.75rem;
}
.card .small .source-link + .source-link {
  margin-top: 0.45rem;
}
.card .small .source-link .source-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(190,255,255,0.85);
}
.card .small .source-link .source-cta {
  font-size: 0.85rem;
  font-weight: 600;
}
.project-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1rem;
  }

.project-links a {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(198, 138, 255, 0.4);
    color: #f7e5ff;
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(73, 30, 114, 0.25);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    animation: pulse-violet 4s infinite;
  }

.project-links a:hover {
    border-color: rgba(198, 138, 255, 0.8);
    background: rgba(198, 138, 255, 0.15);
    transform: scale(1.04);
  }

.project-links a {
  animation: pulse-violet 4s infinite;
}

@keyframes pulse-violet {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 24, 230, 0.3);
  }
  50% {
    box-shadow: 0 0 18px 10px rgba(120, 40, 255, 0.15);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 24, 230, 0.3);
  }
}

.project-spotlight {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(2,8,24,0.85);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  max-width: 800px;
  margin: 0 auto;
}

.project-spotlight h2 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(115deg, rgba(255,24,230,0.95), rgba(0,220,255,0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-spotlight p {
  color: var(--text-soft);
  line-height: 1.6;
}

.project-spotlight ul {
  padding-left: 1.2rem;
  margin: 1rem 0 0;
  color: var(--text-soft);
}

/* CV */

.cv-frame {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(210,255,255,0.08);
  margin-top: 1rem;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(12,22,84,0.95), rgba(2,10,26,0.9));
  box-shadow:
    0 25px 45px rgba(4,8,22,0.75),
    0 0 20px rgba(255,24,230,0.16);
}
  .cv-view {
    width: 100%;
    height: 480px;
    border: 0;
    display: block;
    background: #081a3a;
    pointer-events: none;
    user-select: none;
    filter: blur(4px);
    transform: scale(1.02);
  }
.cv-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  background: radial-gradient(circle at 30% 20%, rgba(8,14,46,0.35), rgba(4,8,22,0)) rgba(2,8,22,0.78);
  opacity: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
  border-radius: 18px;
  border: 1px solid rgba(210,255,255,0.12);
  overflow: hidden;
  mix-blend-mode: normal;
  box-shadow: inset 0 0 45px rgba(4,8,22,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
}
.cv-veil:hover {
  opacity: 1;
  background: radial-gradient(circle at 40% 30%, rgba(8,14,52,0.28), rgba(4,8,22,0)) rgba(4,8,22,0.82);
}
.cv-hint {
  font-size: 0.92rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(6,12,42,0.85);
  border: 1px solid rgba(210,255,255,0.12);
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  box-shadow:
    0 0 22px rgba(4,8,22,0.7),
    inset 0 0 14px rgba(210,255,255,0.05);
}

/* Footer */

.footer {
  border-top: 1px solid rgba(210,255,255,0.08);
  padding: 1rem 1.5rem 2rem;
  max-width: 1120px;
  margin: 0 auto;
  font-size: .8rem;
  color: var(--text-soft);
  text-align: left;
  text-shadow:
    0 0 6px rgba(0,255,213,0.12),
    0 10px 18px rgba(4,8,22,0.55);
}

/* Responsive */

@media (max-width: 860px) {
  .nav {
    padding-top: calc(env(safe-area-inset-top, 0) + 0.6rem);
    padding-bottom: 0.5rem;
  }
  .nav-inner {
    padding: 0.75rem 1rem;
  }
  body {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  }
  .hero-layout {
    grid-template-columns: minmax(0,1fr);
  }
  .hero-right {
    align-items: center;
    justify-content: center;
  }
  .hero-cta-group {
    width: 100%;
    max-width: 320px;
  }
  .hero-right .hero-actions {
    justify-content: center;
  }
  .container {
    padding-top: 4.2rem;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0.35rem;
    right: 0.35rem;
    padding: 1rem;
    gap: 0.65rem;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(8,12,52,0.96), rgba(2,10,28,0.92));
    border: 1px solid rgba(210,255,255,0.15);
    box-shadow: 0 30px 45px rgba(4,8,22,0.85);
    z-index: 10;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-height: min(70vh, 420px);
    overflow-y: auto;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    text-align: center;
  }
  .nav-link.nav-link-stats {
    display: flex;
  }
  .nav-link.nav-link-games {
    display: flex;
    margin-left: 0;
  }
  .nav-live-dot {
    transform: none;
    margin-left: 0;
    position: relative;
    left: 0;
  }
  .nav-game-dot {
    transform: none;
    margin-left: 0;
    position: relative;
    left: 0;
  }
  .burger {
    display: block;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0) + 1.2rem);
    right: 1rem;
    bottom: auto;
    z-index: 30;
    background: linear-gradient(140deg, rgba(12,22,68,0.95), rgba(6,12,42,0.95));
    border: 1px solid rgba(0,255,213,0.45);
    box-shadow:
      0 12px 30px rgba(4,8,22,0.85),
      0 0 14px rgba(0,255,213,0.32);
    color: var(--text-main);
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
  }
  .burger-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
  }
  .burger-icon span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(0,255,213,0.8), rgba(255,24,230,0.9));
    box-shadow:
      0 0 10px rgba(0,255,213,0.4),
      0 0 18px rgba(255,24,230,0.2);
  }
}
}








.cv-access-note {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(115deg, rgba(255,24,230,0.95), rgba(0,220,255,0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.3rem 0 0.8rem;
  text-shadow:
    0 0 14px rgba(0,255,213,0.2),
    0 0 30px rgba(4,8,22,0.4);
}

/* --- Mini games --- */
.game-hub-modal .game-hub-dialog {
  max-width: min(1100px, 96vw);
  max-height: min(92vh, 880px);
  height: min(92vh, 880px);
  padding: 0.9rem;
}

.game-hub-modal .game-hub-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.game-hub-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  align-items: start;
}

.game-player,
.game-leaderboard {
  border-radius: 1rem;
  border: 1px solid rgba(0,255,213,0.2);
  background: linear-gradient(160deg, rgba(8,14,52,0.95), rgba(2,10,30,0.92));
  padding: 0.75rem;
  box-shadow:
    0 16px 32px rgba(4,8,22,0.6),
    inset 0 0 16px rgba(0,255,213,0.05);
}

.game-player {
  width: min(520px, 50%);
  justify-self: center;
}

.game-player-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(210,255,255,0.75);
}

.game-player-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
  align-items: center;
}

.game-player-input {
  flex: 1;
  border-radius: 0.7rem;
  border: 1px solid rgba(210,255,255,0.18);
  background: rgba(6,12,42,0.85);
  color: var(--text-main);
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  font-family: inherit;
}

.game-player-input:focus,
.game-player-input:focus-visible {
  outline: 2px solid rgba(0,255,213,0.6);
  border-color: rgba(0,255,213,0.6);
}

.game-player-hint {
  margin: 0.4rem 0 0;
  font-size: 0.7rem;
  color: rgba(255,170,230,0.9);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255,24,230,0.3);
}

.game-leaderboard-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
}

.game-leaderboard-summary::-webkit-details-marker {
  display: none;
}
.game-leaderboard-summary::marker {
  content: '';
}

.game-leaderboard-summary::after {
  content: '▾';
  font-size: 0.85rem;
  color: rgba(210,255,255,0.65);
  transition: transform 0.2s ease;
}

.game-leaderboard[open] .game-leaderboard-summary::after {
  transform: rotate(180deg);
}

.game-leaderboard-summary::after {
  content: 'v';
}

.game-leaderboard-summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.game-leaderboard-kicker {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(210,255,255,0.6);
}

.game-leaderboard-title {
  margin: 0;
  font-size: 0.9rem;
  background: linear-gradient(115deg, rgba(255,24,230,0.9), rgba(0,220,255,0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.game-leaderboard-body {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-leaderboard-actions {
  display: flex;
  justify-content: flex-end;
}

.game-leaderboard-legend {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr 0.8fr;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(210,255,255,0.65);
}

.game-leaderboard-list {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.35rem;
  max-height: min(220px, 26vh);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.score-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr 0.8fr;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(0,255,213,0.12);
  background: rgba(6,12,42,0.65);
  font-size: 0.78rem;
  align-items: center;
}

.score-name {
  font-weight: 700;
  color: #48ffd4;
}

.score-game {
  color: rgba(210,255,255,0.75);
}

.score-points,
.score-record {
  font-weight: 600;
  color: var(--text-main);
}

.score-empty {
  font-size: 0.8rem;
  color: rgba(210,255,255,0.7);
}

.game-leaderboard-status {
  margin: 0.5rem 0 0;
  font-size: 0.7rem;
  color: rgba(255,170,230,0.85);
}

.game-hub-dialog.needs-name .game-hub-grid {
  opacity: 0.35;
  pointer-events: none;
}

.game-hub-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(210,255,255,0.7);
}

.game-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.8rem;
  align-items: start;
  flex: 1;
  min-height: 0;
  grid-auto-rows: 1fr;
}

.game-card {
  border: 1px solid rgba(0,255,213,0.22);
  border-radius: 1rem;
  padding: 0.6rem 0.7rem;
  text-align: left;
  background: linear-gradient(150deg, rgba(8,14,52,0.95), rgba(2,10,30,0.92));
  color: var(--text-main);
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow:
    0 16px 32px rgba(4,8,22,0.65),
    inset 0 0 16px rgba(0,255,213,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 0;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0,255,213,0.75);
  box-shadow:
    0 20px 35px rgba(4,8,22,0.75),
    0 0 20px rgba(0,255,213,0.25);
  outline: none;
}

.game-card-title {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.game-card-desc {
  display: block;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-stage {
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-height: 0;
}

.game-hub-dialog.is-playing .game-hub-grid {
  display: none;
}

.game-hub-dialog.is-playing .game-hub-top {
  display: none;
}

.game-hub-dialog.is-playing .game-stage {
  display: flex;
}

.game-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.game-stage-title {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.game-stage-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(210,255,255,0.6);
}

.game-stage-title h3 {
  margin: 0;
  font-size: 0.92rem;
  background: linear-gradient(115deg, rgba(255,24,230,0.9), rgba(0,220,255,0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.game-panel {
  display: none;
}

.game-panel.active {
  display: block;
}

.game-panel-intro {
  margin: 0 0 0.35rem;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.game-panel-taunt {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: rgba(255,160,230,0.8);
}

.game-status {
  margin: 0.25rem 0;
  color: #d8fff6;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 12px rgba(0,255,213,0.35),
    0 0 18px rgba(255,24,230,0.2);
}

.game-status.is-win,
.game-status.is-lose {
  font-size: 1.15rem;
  font-weight: 800;
}

.game-status.is-win {
  color: #48ffd4;
  text-shadow: 0 0 14px rgba(72,255,212,0.55);
}

.game-status.is-lose {
  color: #ff8bd8;
  text-shadow: 0 0 14px rgba(255,139,216,0.55);
}

.game-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  font-size: 0.72rem;
  color: rgba(210,255,255,0.75);
  margin: 0.2rem 0 0.35rem;
}

.game-detail span {
  font-weight: 700;
  color: var(--text-main);
}

.game-top3 {
  margin: 0.3rem 0 0.45rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(0,255,213,0.18);
  background: rgba(6,12,42,0.65);
}

.game-top3-title {
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(210,255,255,0.6);
}

.game-top3-list {
  margin-top: 0.25rem;
  display: grid;
  gap: 0.2rem;
}

.game-top3-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-main);
}

.game-top3-rank {
  font-weight: 700;
  color: #48ffd4;
}

.game-top3-name {
  flex: 1;
  font-weight: 600;
  color: var(--text-main);
}

.game-top3-score {
  font-weight: 700;
  color: rgba(210,255,255,0.8);
}

.game-top3-empty {
  font-size: 0.72rem;
  color: rgba(210,255,255,0.55);
}

.game-score {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.game-btn {
  border-radius: 999px;
  border: 1px solid rgba(0,255,213,0.45);
  background: linear-gradient(140deg, rgba(10,20,70,0.95), rgba(6,12,42,0.92));
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    0 12px 24px rgba(4,8,22,0.6),
    0 0 18px rgba(0,255,213,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-btn:hover,
.game-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0,255,213,0.85);
  box-shadow:
    0 16px 30px rgba(4,8,22,0.7),
    0 0 22px rgba(0,255,213,0.3);
  outline: none;
}

.game-btn.ghost {
  background: rgba(6,12,42,0.7);
  border-color: rgba(210,255,255,0.22);
}

.game-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 0.45rem;
  margin: 0.6rem auto 0.4rem;
  max-width: 300px;
}

.ttt-cell {
  aspect-ratio: 1;
  border-radius: 0.8rem;
  border: 1px solid rgba(0,255,213,0.3);
  background: rgba(6,12,42,0.7);
  color: var(--text-main);
  font-size: 2rem;
  font-family: "Share Tech Mono", "Courier New", monospace;
  cursor: pointer;
  box-shadow: inset 0 0 14px rgba(0,255,213,0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ttt-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(0,255,213,0.6);
}

.ttt-cell.is-x {
  color: #32f1ff;
  text-shadow: 0 0 16px rgba(50,241,255,0.6);
}

.ttt-cell.is-o {
  color: #ff71e6;
  text-shadow: 0 0 16px rgba(255,113,230,0.6);
}

.snake-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.snake-grid {
  display: grid;
  grid-template-columns: repeat(var(--snake-cols, 12), minmax(0, 1fr));
  gap: 2px;
  background: rgba(6,12,42,0.7);
  padding: 0.45rem;
  border-radius: 1rem;
  border: 1px solid rgba(0,255,213,0.2);
  max-width: min(300px, 32vh);
  margin: 0.35rem auto;
  aspect-ratio: 1;
}

.is-iphone .snake-grid {
  max-width: min(260px, 28vh);
}

.snake-touch {
  display: none;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 0.35rem;
  justify-content: center;
  margin: 0.3rem auto 0.2rem;
}

.snake-touch[hidden] {
  display: none !important;
}

.is-iphone .snake-touch {
  display: grid;
  grid-template-columns: repeat(3, 38px);
  grid-template-rows: repeat(3, 38px);
  gap: 0.25rem;
  margin: 0.2rem auto 0.25rem;
}

.snake-touch-btn {
  width: 44px;
  height: 44px;
  border-radius: 0.8rem;
  border: 1px solid rgba(0,255,213,0.25);
  background: linear-gradient(160deg, rgba(10,24,76,0.95), rgba(4,10,32,0.9));
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(4,8,22,0.45), inset 0 0 12px rgba(0,255,213,0.06);
  touch-action: manipulation;
}

.is-iphone .snake-touch-btn {
  width: 38px;
  height: 38px;
  font-size: 0.9rem;
}

.snake-touch-btn:active {
  transform: translateY(1px);
}

.snake-touch-btn[data-snake-dir="up"] { grid-column: 2; grid-row: 1; }
.snake-touch-btn[data-snake-dir="left"] { grid-column: 1; grid-row: 2; }
.snake-touch-btn[data-snake-dir="right"] { grid-column: 3; grid-row: 2; }
.snake-touch-btn[data-snake-dir="down"] { grid-column: 2; grid-row: 3; }

.snake-cell {
  background: rgba(4,8,22,0.85);
  border-radius: 0.25rem;
  aspect-ratio: 1;
}

.snake-cell.is-snake {
  background: linear-gradient(135deg, rgba(0,255,213,0.85), rgba(6,120,200,0.8));
  box-shadow: 0 0 10px rgba(0,255,213,0.35);
}

.snake-cell.is-head {
  background: linear-gradient(135deg, rgba(255,24,230,0.9), rgba(0,255,213,0.95));
}

.snake-cell.is-food {
  background: radial-gradient(circle, rgba(255,102,204,0.95), rgba(255,0,220,0.35));
  box-shadow: 0 0 12px rgba(255,0,220,0.6);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: min(300px, 32vh);
  margin: 0.35rem auto;
}

.memory-card {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,255,213,0.2);
  background: rgba(6,12,42,0.85);
  color: transparent;
  font-size: 1.3rem;
  font-family: "Share Tech Mono", "Courier New", monospace;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.memory-card.is-flipped,
.memory-card.is-matched {
  color: var(--text-main);
  background: linear-gradient(160deg, rgba(10,24,76,0.95), rgba(4,10,32,0.9));
  border-color: rgba(0,255,213,0.6);
}

.memory-card.is-matched {
  box-shadow: 0 0 14px rgba(0,255,213,0.35);
}

.connect4-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  max-width: min(360px, 34vh);
  margin: 0.35rem auto;
  padding: 0.4rem;
  border-radius: 1rem;
  background: rgba(6,12,42,0.7);
  border: 1px solid rgba(0,255,213,0.2);
}

.connect4-cell {
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background: rgba(4,8,22,0.85);
  box-shadow: inset 0 0 12px rgba(0,255,213,0.15);
  cursor: pointer;
}

.connect4-cell.is-player {
  background: radial-gradient(circle, rgba(255,90,120,0.9), rgba(255,24,230,0.55));
  box-shadow: 0 0 16px rgba(255,24,230,0.5);
}

.connect4-cell.is-ai {
  background: radial-gradient(circle, rgba(0,255,213,0.9), rgba(10,120,200,0.6));
  box-shadow: 0 0 16px rgba(0,255,213,0.5);
}

.taquin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  max-width: min(300px, 32vh);
  margin: 0.35rem auto;
}

.taquin-tile {
  aspect-ratio: 1;
  border-radius: 0.65rem;
  border: 1px solid rgba(0,255,213,0.25);
  background: linear-gradient(160deg, rgba(10,24,76,0.95), rgba(4,10,32,0.9));
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.taquin-tile.is-empty {
  visibility: hidden;
}

.game-celebration {
  position: relative;
  width: min(100%, 320px);
  min-height: 84px;
  margin: 0.35rem auto 0.45rem;
  border-radius: 0.9rem;
  border: 1px dashed rgba(0,255,213,0.2);
  background: radial-gradient(circle at top, rgba(10,24,76,0.85), rgba(6,12,42,0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
}

.game-celebration.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: matchesCelebrationFloat 0.9s ease both;
}

.game-celebration.is-win {
  border-color: rgba(72,255,212,0.45);
}

.game-celebration.is-lose {
  border-color: rgba(255,139,216,0.45);
}

.game-celebration-smiley {
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 0 16px rgba(0,255,213,0.35);
}

.game-celebration.is-show .game-celebration-smiley {
  animation: matchesSmilePop 1.05s ease both;
}

.game-celebration.is-win .game-celebration-smiley {
  color: #48ffd4;
  text-shadow: 0 0 18px rgba(72,255,212,0.6);
}

.game-celebration.is-lose .game-celebration-smiley {
  color: #ff8bd8;
  text-shadow: 0 0 18px rgba(255,139,216,0.6);
}

.game-celebration-fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.game-celebration.show-fireworks .game-celebration-fireworks {
  opacity: 1;
}

.game-celebration-fireworks span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 999px;
  background: var(--spark, #48ffd4);
  transform: translate(-50%, -50%) scale(0.2);
  box-shadow: 0 0 8px rgba(72,255,212,0.6);
}

.game-celebration.show-fireworks .game-celebration-fireworks span {
  animation: matchesFireworkBurst 0.9s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

.game-celebration-fireworks span:nth-child(1) {
  --tx: -56px;
  --ty: -24px;
  --delay: 0s;
  --size: 5px;
  --spark: #48ffd4;
}

.game-celebration-fireworks span:nth-child(2) {
  --tx: -32px;
  --ty: 30px;
  --delay: 0.05s;
  --size: 6px;
  --spark: #ff8bd8;
}

.game-celebration-fireworks span:nth-child(3) {
  --tx: -12px;
  --ty: -46px;
  --delay: 0.1s;
  --size: 4px;
  --spark: #ffd86b;
}

.game-celebration-fireworks span:nth-child(4) {
  --tx: 18px;
  --ty: 40px;
  --delay: 0.12s;
  --size: 5px;
  --spark: #7cf2ff;
}

.game-celebration-fireworks span:nth-child(5) {
  --tx: 44px;
  --ty: -10px;
  --delay: 0.16s;
  --size: 6px;
  --spark: #48ffd4;
}

.game-celebration-fireworks span:nth-child(6) {
  --tx: 62px;
  --ty: 18px;
  --delay: 0.2s;
  --size: 5px;
  --spark: #ff8bd8;
}

.game-celebration-fireworks span:nth-child(7) {
  --tx: -22px;
  --ty: -6px;
  --delay: 0.08s;
  --size: 4px;
  --spark: #7cf2ff;
}

.game-celebration-fireworks span:nth-child(8) {
  --tx: 6px;
  --ty: -52px;
  --delay: 0.14s;
  --size: 5px;
  --spark: #ffd86b;
}

.game-celebration-fireworks span:nth-child(9) {
  --tx: -6px;
  --ty: 48px;
  --delay: 0.18s;
  --size: 4px;
  --spark: #48ffd4;
}

.game-celebration-fireworks span:nth-child(10) {
  --tx: 30px;
  --ty: -32px;
  --delay: 0.22s;
  --size: 6px;
  --spark: #ff8bd8;
}

@keyframes matchesCelebrationFloat {
  0% { opacity: 0; transform: translateY(-8px) scale(0.96); }
  55% { opacity: 1; transform: translateY(2px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes matchesSmilePop {
  0% { opacity: 0; transform: scale(0.2) rotate(-12deg); }
  40% { opacity: 1; transform: scale(1.15) rotate(6deg); }
  70% { transform: scale(0.96) rotate(-4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes matchesFireworkBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(1); }
}

.matches-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  margin: 0.4rem 0;
}

.match-stick {
  width: 10px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,190,120,0.95), rgba(255,90,120,0.85));
  box-shadow: 0 0 8px rgba(255,90,120,0.4);
}

.match-stick.is-off {
  opacity: 0.2;
  filter: grayscale(1);
}

.matches-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rps-score {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.rps-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rps-last {
  margin: 0.2rem 0 0.3rem;
  font-size: 0.78rem;
  color: rgba(210,255,255,0.7);
}

.aim-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.aim-area {
  position: relative;
  margin: 0.45rem auto;
  width: min(320px, 92%);
  height: min(180px, 28vh);
  border-radius: 1rem;
  border: 1px solid rgba(0,255,213,0.2);
  background: radial-gradient(circle at 20% 20%, rgba(255,24,230,0.12), rgba(6,12,42,0.85));
  overflow: hidden;
}

.aim-target {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle, rgba(255,90,200,0.95), rgba(255,24,230,0.55));
  box-shadow: 0 0 18px rgba(255,24,230,0.6);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.08s ease, opacity 0.2s ease;
}

.aim-target.is-active {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .game-hub-dialog {
    width: 96%;
  }
  .game-hub-top {
    grid-template-columns: 1fr;
  }
  .game-player {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }
  .game-stage-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.6rem;
  }
  .game-leaderboard-legend,
  .score-row {
    grid-template-columns: 1.2fr 0.8fr 0.6fr 0.8fr;
  }
  .snake-grid,
  .taquin-grid,
  .memory-grid {
    max-width: min(100%, 32vh);
  }
  .connect4-grid {
    max-width: min(100%, 34vh);
  }
  .aim-area {
    height: min(170px, 26vh);
    width: min(300px, 92%);
  }
}
