:root {
  --green: #2bf08a;
  --red: #ff4466;
  --dark: #07090d;
  --bg: #0b0f14;
  --card: #121821;
  --text: #dbe4ec;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, .logo { font-family: "Baloo 2", "Nunito", sans-serif; line-height: 1.15; }

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.5rem;
  background: rgba(7, 9, 13, 0.92);
  border-bottom: 1px solid rgba(43, 240, 138, 0.25);
  backdrop-filter: blur(6px);
}
.nav a { color: #fff; text-decoration: none; font-weight: 700; }
.nav nav { display: flex; gap: 1.2rem; }
.nav nav a:hover { color: var(--green); }
.logo { font-size: 1.4rem; color: var(--red) !important; }

.hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  color: #fff;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 60px, transparent 60px 120px),
    radial-gradient(circle at 20% 10%, rgba(43, 240, 138, 0.18), transparent 50%),
    radial-gradient(circle at 85% 90%, rgba(255, 68, 102, 0.16), transparent 50%),
    var(--dark);
}
.avatar {
  width: 170px; height: 170px; margin: 0 auto 1.2rem;
  border-radius: 50%; overflow: hidden;
  border: 5px solid var(--green);
  box-shadow: 0 0 28px rgba(43, 240, 138, 0.45), 0 0 60px rgba(255, 68, 102, 0.2);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback { display: none; font-family: "Baloo 2", sans-serif; font-size: 5rem; font-weight: 800; color: var(--red); }
.avatar.no-photo .avatar-fallback { display: block; }

.eyebrow { font-size: 1.3rem; font-weight: 800; color: var(--red); }
.hero h1 { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; letter-spacing: 2px; }
.tagline { font-size: clamp(1.1rem, 3vw, 1.6rem); margin: 0.3rem 0 1.6rem; font-weight: 600; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 2rem; }
.hero-badges span {
  background: rgba(43, 240, 138, 0.08);
  border: 2px solid rgba(43, 240, 138, 0.45);
  padding: 0.4rem 1rem; border-radius: 999px; font-weight: 700;
}
.btn {
  display: inline-block; background: var(--green); color: var(--dark);
  box-shadow: 0 0 18px rgba(43, 240, 138, 0.35);
  padding: 0.8rem 1.8rem; border-radius: 999px;
  font-weight: 800; text-decoration: none;
  transition: transform 0.15s;
}
.btn:hover { transform: translateY(-3px) scale(1.04); }

.section { max-width: 1000px; margin: 0 auto; padding: 3.5rem 1.5rem 0; }
.section h2 {
  font-size: 2.2rem; margin-bottom: 1.2rem; color: #fff;
  display: inline-block; border-bottom: 5px solid var(--red);
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 1.5rem; border: 1px solid rgba(43, 240, 138, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.grid .card:hover { transform: translateY(-5px); border-color: rgba(43, 240, 138, 0.5); box-shadow: 0 0 22px rgba(43, 240, 138, 0.2); }
.card h3 { margin-bottom: 0.5rem; color: var(--green); font-size: 1.35rem; }
.card ul { padding-left: 1.2rem; }
.card li { margin-bottom: 0.4rem; }
.where { font-weight: 800; color: var(--red); margin-bottom: 0.6rem; font-size: 0.9rem; }

.about p { margin-bottom: 1rem; font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin-top: 1.5rem; text-align: center; }
.stats div { background: var(--bg); border: 1px solid rgba(255, 68, 102, 0.25); border-radius: 14px; padding: 1rem 0.5rem; }
.num { display: block; font-family: "Baloo 2", sans-serif; font-size: 2.4rem; font-weight: 800; color: var(--green); }
.stats span:last-child { font-weight: 700; font-size: 0.9rem; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 !important; }
.chips li {
  background: rgba(43, 240, 138, 0.1); color: var(--green); border: 1px solid rgba(43, 240, 138, 0.3); border-radius: 999px;
  padding: 0.3rem 0.9rem; font-weight: 700; margin: 0 !important;
}

footer { text-align: center; padding: 3rem 1rem; margin-top: 4rem; background: var(--dark); color: #fff; font-weight: 700; border-top: 1px solid rgba(255, 68, 102, 0.3); }

.card a { color: var(--red); font-weight: 800; word-break: break-all; }
.made { font-size: 0.85rem; opacity: 0.75; margin-top: 0.3rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s; }
.reveal.show { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .nav nav { gap: 0.7rem; font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Extra cool effects ---------- */

/* Animated gradient glowing name */
.hero h1 {
  background: linear-gradient(90deg, var(--green), #fff, var(--red), var(--green));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shine 6s linear infinite;
  filter: drop-shadow(0 0 18px rgba(43, 240, 138, 0.35));
}
@keyframes shine { to { background-position: 300% 0; } }

/* Slowly moving grid in the hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -50% 0 0 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(43, 240, 138, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 240, 138, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(60deg);
  animation: grid 8s linear infinite;
  mask-image: linear-gradient(to top, #000 10%, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%);
}
@keyframes grid { to { background-position: 0 48px; } }
.hero > * { position: relative; }

/* Floating profile picture */
.avatar { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Typing cursor */
.cursor { color: var(--green); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Scroll progress bar */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: linear-gradient(90deg, var(--green), var(--red));
  box-shadow: 0 0 10px var(--green);
}

/* Mouse glow */
#glow {
  position: fixed; top: 0; left: 0; width: 320px; height: 320px; z-index: 0;
  margin: -160px 0 0 -160px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 240, 138, 0.10), transparent 65%);
  transition: opacity 0.3s;
}
.section, footer { position: relative; z-index: 1; }

/* 3D tilt cards */
.grid .card { transform-style: preserve-3d; will-change: transform; }

/* Buttons and badges */
.btn:hover { box-shadow: 0 0 28px rgba(43, 240, 138, 0.7); }
.hero-badges span { transition: transform 0.2s, box-shadow 0.2s; }
.hero-badges span:hover { transform: translateY(-4px); box-shadow: 0 0 16px rgba(255, 68, 102, 0.5); border-color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero::before, .avatar, .cursor { animation: none; }
}

/* Countries I learned from */
.learn-intro { font-weight: 700; margin-bottom: 1rem; font-size: 1.1rem; }
.countries li { font-size: 1.1rem; padding: 0.4rem 1.1rem; transition: transform 0.2s, box-shadow 0.2s; }
.countries li:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 0 14px rgba(255, 68, 102, 0.5); border-color: var(--red); }

/* Clickable country tags */
.countries li { padding: 0 !important; }
.countries li a {
  display: block; padding: 0.4rem 1.1rem; color: var(--green);
  text-decoration: none; font-weight: 800; word-break: normal;
}
.countries li:hover a { color: #fff; }

/* Country pages */
.country-hero { padding: 4rem 1.5rem 3.5rem; }
.big-flag { font-size: 6rem; line-height: 1; margin-bottom: 0.5rem; animation: float 4s ease-in-out infinite; }
.country-hero h1 { font-size: clamp(3rem, 11vw, 6rem); }
.card ul li::marker { color: var(--green); }
.nav nav a { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .big-flag { animation: none; } }

.languages { margin-bottom: 1rem; }

.ghost { visibility: hidden; }

/* Clickable interest cards */
.card.link { position: relative; cursor: pointer; }
.card.link a.stretched { color: inherit; text-decoration: none; word-break: normal; }
.card.link a.stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card.link .learn-more { display: inline-block; margin-top: 0.8rem; font-weight: 800; color: var(--red); font-size: 0.9rem; }
.card.link:hover .learn-more { color: #fff; }

/* Games page */
.tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
.tab {
  font-family: inherit; font-weight: 800; font-size: 1rem; cursor: pointer;
  background: rgba(43, 240, 138, 0.08); color: var(--green);
  border: 2px solid rgba(43, 240, 138, 0.45); border-radius: 999px;
  padding: 0.5rem 1.3rem; transition: transform 0.15s, box-shadow 0.15s;
}
.tab:hover { transform: translateY(-2px); box-shadow: 0 0 14px rgba(43, 240, 138, 0.4); }
.tab.active { background: var(--green); color: var(--dark); }
.game-card { max-width: 700px; margin: 0 auto; }
.game-card .game-title { font-size: 1.6rem; border: none; margin-bottom: 0.4rem; display: block; color: var(--green); }
.hud { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-weight: 800; margin-bottom: 0.7rem; }
.hud-score { color: #fff; }
.hud-best { color: var(--red); }
#game {
  display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 10; margin: 0 auto;
  border-radius: 14px; border: 2px solid rgba(43, 240, 138, 0.4);
  box-shadow: 0 0 22px rgba(43, 240, 138, 0.2); touch-action: none; cursor: crosshair; outline: none;
}
#game:focus { border-color: var(--green); }
.game-message { margin-top: 0.8rem; font-weight: 800; font-size: 1.1rem; min-height: 1.6rem; color: #fff; }
.game-help { margin: 0.4rem 0 1rem; opacity: 0.85; }
button.btn { font-family: inherit; font-size: 1rem; border: none; cursor: pointer; }
