/* ==========================================================================
   components.css — nav, buttons, cards, chips, badges, side rail, theme
   switch, footer, contact form, and the mouse mini-game.
   Class names are BEM-ish; legacy hook classes (.navbar, .explore-more-button,
   .mouse-*, form classes, footer ids) are preserved so script.js / locales.js
   / secret-game.js keep working.
   ========================================================================== */

/* Mouse-trail canvas ------------------------------------------------------ */
#mouse-trail-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* ============================ NAVIGATION ================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px var(--gutter) 0;
}

.nav {
  max-width: var(--maxw);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav__logo { display: inline-flex; align-items: center; }
.nav__logo .logo-svg { width: 34px; height: auto; }
.nav__logo .logo-svg path { fill: var(--blue-700); }

.navbar {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 22px);
}

.navbar > a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  padding: 8px 4px;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.navbar > a::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 2px;
  height: 2px;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.navbar > a:hover { color: var(--blue-700); }
.navbar > a:hover::after,
.navbar > a.active::after { transform: scaleX(1); }
.navbar > a.active { color: var(--blue-700); font-weight: 600; }

/* Nav icons — drawn with CSS masks so locales.js textContent updates can't
   remove them. currentColor lets them follow hover/active/theme colours. */
.navbar > a[data-ico] { display: inline-flex; align-items: center; gap: 8px; }
.navbar > a[data-ico]::before {
  content: "";
  width: 17px; height: 17px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  opacity: 0.9;
}
.navbar > a[data-ico="home"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h5v-6h4v6h5V9.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h5v-6h4v6h5V9.5'/%3E%3C/svg%3E");
}
.navbar > a[data-ico="user"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}
.navbar > a[data-ico="grid"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}
.navbar > a[data-ico="skills"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Cpath d='M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Cpath d='M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E");
}
.navbar > a[data-ico="mail"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

.language-select {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

/* Theme switch (keep markup: label.switch > input + .slider) --------------- */
.switch { position: relative; display: inline-flex; width: 58px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider {
  position: absolute; inset: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(120deg, var(--blue-700), var(--cyan-400));
  transition: background 0.3s ease;
}
.switch .circle {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
.switch input:checked ~ .slider { background: linear-gradient(120deg, var(--blue-950), var(--blue-700)); }
.switch input:checked ~ .slider .circle { transform: translateX(28px); }
.switch .icon {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 12px; line-height: 1; z-index: 1; display: inline-flex;
}
.switch .icon.sun { left: 8px; color: #FFD86B; }
.switch .icon.moon { right: 8px; color: #dfe9ff; }
.switch .icon svg { width: 13px; height: 13px; }

/* Hamburger --------------------------------------------------------------- */
.hamburger-button {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--blue-700);
  align-items: center;
  justify-content: center;
}

/* ============================ BUTTONS =================================== */
.btn,
.explore-more-button,
.project-box-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn svg { width: 18px; height: 18px; }

.btn--primary,
.explore-more-button,
.project-box-button {
  background: var(--cta-grad);
  color: var(--cta-ink);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover,
.explore-more-button:hover,
.project-box-button:hover { transform: translateY(-2px); background: var(--cta-grad-hover); box-shadow: 0 16px 30px rgba(11, 79, 168, 0.40); }
.btn--primary:active,
.explore-more-button:active,
.project-box-button:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }

.btn--dark {
  background: var(--blue-700);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--dark:hover { transform: translateY(-2px); background: var(--blue-900); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--card-border);
}
.btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-700); }

/* On dark hero panel */
.btn--ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-dark);
  border-color: var(--on-dark-border);
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.16); }

/* ============================ CARDS ==================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-700);
  background: var(--sky-100);
  border: 1px solid var(--card-border);
  border-radius: var(--r-pill);
  padding: 8px 14px;
}
:root[data-theme="dark"] .chip { background: var(--surface-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--cta-grad);
  color: var(--cta-ink);
}
.badge--dot::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: badge-pulse 1.8s ease-in-out infinite;
}
@keyframes badge-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ============================ SIDE RAIL ================================ */
/* Only shown when the viewport gutter is wide enough to clear the 1200px
   content column; the top nav covers navigation on smaller screens. */
.side-nav { display: none; }
@media (min-width: 1360px) { .side-nav { display: flex; } }
.side-nav {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px;
  border-radius: var(--r-pill);
  /* Blue liquid glass */
  background: linear-gradient(160deg, rgba(180, 224, 255, 0.32), rgba(11, 79, 168, 0.16));
  border: 1px solid rgba(170, 214, 255, 0.50);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 14px 34px rgba(10, 36, 99, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.60),
    inset 0 -8px 18px rgba(11, 79, 168, 0.08);
  isolation: isolate;
}
:root[data-theme="dark"] .side-nav {
  background: linear-gradient(160deg, rgba(49, 110, 190, 0.34), rgba(8, 20, 44, 0.42));
  border-color: rgba(120, 180, 255, 0.28);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.50),
    inset 0 1px 1px rgba(160, 200, 255, 0.25),
    inset 0 -8px 18px rgba(49, 198, 239, 0.08);
}

/* Sliding highlight — the "hero" move that follows the active item */
.side-nav__indicator {
  position: absolute;
  top: 0; left: 7px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--cta-grad);
  box-shadow: 0 6px 16px rgba(11, 79, 168, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transform: translateY(7px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.3s ease, height 0.3s ease, left 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.side-nav-item {
  position: relative;
  z-index: 1;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

/* .side-nav-dot is now the icon, masked from --i (set per data-ico) */
.side-nav-dot {
  width: 18px; height: 18px;
  border: 0; border-radius: 0;
  background-color: var(--blue-700);
  -webkit-mask: var(--i, none) center / contain no-repeat;
  mask: var(--i, none) center / contain no-repeat;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease;
}
:root[data-theme="dark"] .side-nav-dot { background-color: #bcd4f5; }
.side-nav-item:hover .side-nav-dot { transform: scale(1.14); }
.side-nav-item.active .side-nav-dot { background-color: #fff; transform: none; }

/* Label as a glass tooltip to the left */
.side-nav-label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.side-nav-item:hover .side-nav-label,
.side-nav-item:focus-visible .side-nav-label { opacity: 1; transform: translateY(-50%); }

/* Click ripple */
.side-nav__ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(49, 198, 239, 0.55), rgba(49, 198, 239, 0) 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: sn-ripple 0.6s ease-out forwards;
  z-index: 2;
}
@keyframes sn-ripple { to { transform: translate(-50%, -50%) scale(2.6); opacity: 0; } }

/* Pop when the active item changes */
.side-nav-item.is-switching .side-nav-dot { animation: sn-pop 0.5s ease; }
@keyframes sn-pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* Per-section icons (mask images) */
.side-nav-item[data-ico="home"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h5v-6h4v6h5V9.5'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="user"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="grid"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="chip"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Cpath d='M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="mail"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="heart"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-6.5-4.2-9-8.2C1.4 9 2.7 5.8 6 5.8c2 0 3.2 1.2 4.5 2.7C11.8 7 13 5.8 15 5.8c3.3 0 4.6 3.2 3 6-2.5 4-9 8.2-9 8.2z'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="star"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.5 5.4 5.9.7-4.4 4 1.2 5.8L12 16.9 6.8 19l1.2-5.8-4.4-4 5.9-.7z'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="chat"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 5H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h4v4l4-4h8a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="layers"]{ --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 5-9 5-9-5 9-5z'/%3E%3Cpath d='M3 13l9 5 9-5'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="palette"]{ --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='8.5' cy='10' r='1.1'/%3E%3Ccircle cx='12' cy='8' r='1.1'/%3E%3Ccircle cx='15.5' cy='10' r='1.1'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="globe"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3a15 15 0 0 1 0 18a15 15 0 0 1 0-18'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="list"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3.5 6h.01M3.5 12h.01M3.5 18h.01'/%3E%3C/svg%3E"); }
.side-nav-item[data-ico="form"]  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3Cpath d='M8 13h8M8 17h5'/%3E%3C/svg%3E"); }

/* ============================ FOOTER =================================== */
footer {
  background: var(--blue-950);
  color: var(--on-dark);
  padding: clamp(48px, 7vw, 80px) var(--gutter) 28px;
  margin-top: clamp(48px, 8vw, 100px);
}
.footer-content {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}
.footer-section h3 {
  font-family: var(--font-label);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 18px;
}
.footer-section a { color: var(--on-dark-muted); transition: color 0.2s ease; }
.footer-section a:hover { color: var(--on-dark); }
.footer-section li { margin-bottom: 10px; }
.footer-section p { color: var(--on-dark-muted); margin-bottom: 10px; }
.social-icons { display: flex; gap: 22px; }
.social-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.social-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--on-dark-border);
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-icon:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.social-icon img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.social-name { font-size: 0.8rem; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--on-dark-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--on-dark-muted);
}
.footer-bottom a { color: var(--cyan-400); }

/* ============================ CONTACT FORM ============================= */
.contact-formular {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 4vw, 44px);
}
.form-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field-full { margin-bottom: 20px; }
.form-label {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-required { color: var(--blue-500); }
.form-input {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(14, 127, 224, 0.14);
}
.form-input.error { border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.12); }
.form-textarea { resize: vertical; min-height: 150px; }
.form-error { color: #E5484D; font-size: 0.82rem; }
.form-char-count { font-size: 0.78rem; color: var(--text-muted); align-self: flex-end; }
.form-footer { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.recaptcha-notice { font-size: 0.76rem; color: var(--text-muted); }
.recaptcha-notice a { color: var(--blue-700); text-decoration: underline; }
.form-alert {
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.form-alert.error { background: rgba(229, 72, 77, 0.12); color: #C6383C; border: 1px solid rgba(229, 72, 77, 0.3); }
.form-alert.success { background: rgba(40, 167, 69, 0.12); color: #1E7A34; border: 1px solid rgba(40, 167, 69, 0.3); }
.form-submit-btn { min-width: 160px; }
.btn-loader { display: inline-flex; align-items: center; justify-content: center; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r-sm);
  background: rgba(40, 167, 69, 0.12);
  color: #1E7A34;
}
.success-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: #2AA745; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Back-to-top ------------------------------------------------------------- */
.back-to-top-button-container {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  color: var(--text-muted);
  flex-wrap: wrap;
  text-align: center;
}
.back-to-top-button {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--blue-700);
  box-shadow: var(--shadow-btn);
  transition: transform 0.2s ease;
}
.back-to-top-button:hover { transform: translateY(-3px); }
.back-to-top-button .svgIcon { width: 20px; fill: #fff; }

/* ============================ MOUSE MINI-GAME ========================== */
.mouse-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mouse-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}
.mouse-hint {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  text-align: center;
}
.mouse-image {
  width: clamp(84px, 12vw, 120px);
  cursor: pointer;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
  transform: translateX(-50%);
  position: relative;
  left: 50%;
}
.mouse-image:hover { transform: translateX(-50%) translateY(-4px) rotate(-4deg); }

.mouse-game-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 16, 42, 0.82);
  border-radius: var(--r-md);
  z-index: 5;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.mouse-game-content { padding: 20px; }
.mouse-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mouse-game-cell {
  width: 58px; height: 58px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--on-dark-border);
  border-radius: 10px;
  transition: background 0.15s ease;
}
.mouse-game-cell:hover:not(.cell-locked) { background: rgba(255, 255, 255, 0.18); }
.mouse-game-cell.cell-marked { color: var(--cyan-400); }
.mouse-game-message {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--on-dark);
  text-align: center;
  max-width: 220px;
}
.mouse-game-button {
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--cta-grad);
  color: var(--cta-ink);
  font-weight: 600;
}

/* ============================ RESPONSIVE NAV =========================== */
@media (max-width: 900px) {
  .hamburger-button { display: inline-flex; }
  .navbar {
    position: fixed;
    top: calc(var(--nav-h) + 22px);
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .navbar.active { opacity: 1; transform: none; pointer-events: auto; }
  .navbar > a { padding: 12px 10px; border-radius: var(--r-sm); }
  .navbar > a:hover { background: var(--surface-2); }
  .navbar > a::after { display: none; }
  .side-nav { display: none; }
}

.desktop-only { display: inline-flex; }
.mobile-only { display: none; }
@media (max-width: 900px) {
  .desktop-only { display: none; }
  .mobile-only { display: inline-flex; }
}

@media (max-width: 560px) {
  .form-group { grid-template-columns: 1fr; }
}
