/* ═══════════════════════════════════════════════════════════
   LAYOUT — navigation, mobile menu, footer
   Shared by every page.
   ═══════════════════════════════════════════════════════════ */

.mobile-menu {
  display: flex;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 950;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
  pointer-events: none;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.mobile-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-menu__list a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.mobile-menu__list a:hover {
  color: var(--purple);
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu {
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease;
    transform: none;
  }
  .mobile-menu.is-open {
    transform: none;
  }
}

/* Skip link — hidden off-screen, revealed on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--purple);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
}

/* The global focus ring in base.css rounds every corner; this element is
   flush with the top edge of the page and keeps its own shape. */
.skip-link:focus-visible {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  transition:
    background 0.3s,
    border-color 0.3s,
    backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}

/* Nav container: logo | [centered links] | lang | resume | hamburger */
.nav-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
}
.logo {
  flex: 0 0 auto;
}
.logo svg {
  flex-shrink: 0;
}

/* Nav links absolutely centered within the nav bar */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 30px;
  width: max-content;
  margin: 0;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--text);
}
.nav-link.is-active {
  color: var(--purple);
}

/* Language toggle */
.lang-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 3%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 3%, transparent);
}
.lang-toggle__btn {
  appearance: none;

  /* These are links between two pages, so they take the page font like the
     rest of the navigation instead of the browser's default control font. */
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  min-width: 34px;
  height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
/* Same reason as the skip link: keep the pill shape under the focus ring. */
.lang-toggle__btn:focus-visible {
  border-radius: 8px;
}

.lang-toggle__btn:hover {
  color: var(--text);
}
.lang-toggle__btn.is-active {
  color: var(--text);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--purple) 92%, transparent),
    color-mix(in srgb, var(--violet) 92%, transparent)
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text) 4%, transparent) inset,
    0 8px 18px color-mix(in srgb, var(--violet) 22%, transparent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 15px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transition: all 0.25s;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu styles live in NavMobileMenu.vue */
@media (width <= 900px) {
  .nav-links {
    position: static;
    transform: none;
    width: auto;
    gap: 18px;
  }
  .lang-toggle {
    margin-left: auto;
    margin-right: 8px;
  }
}
@media (width <= 768px) {
  .nav-container {
    padding: 0 20px;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;

    /* Expand touch target to ≥44×44px while keeping the visual bar area intact */
    width: 22px;
    height: 15px;
    padding: 14.5px 11px;
    box-sizing: content-box;
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .navbar {
    transition: none;
  }
  .hamburger span {
    transition: none;
  }
  .skip-link {
    transition: none;
  }
}

.footer-cta {
  padding: 92px 0 56px;
  position: relative;
}
.footer-cta::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 56px;
  margin-bottom: 42px;
}
.footer-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.footer-headline {
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.footer-headline-top {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.footer-headline-gap {
  margin-left: 0.22em;
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-actions .btn-primary,
.footer-actions .btn-ghost {
  min-height: 48px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 650;
  border-radius: 12px;
}
.who-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.who-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 58%, transparent);
}
.who-box p {
  font-size: 17px;
  line-height: 1.68;
  color: color-mix(in srgb, var(--text) 76%, transparent);
  max-width: 46ch;
  text-wrap: pretty;
}
.footer-socials {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}
.footer-socials a {
  color: var(--muted);
  transition:
    color 0.2s,
    transform 0.2s;
}
.footer-socials a:hover {
  color: var(--purple);
  transform: translateY(-1px);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: color-mix(in srgb, var(--text) 52%, transparent);
}
.footer-bottom span:last-child {
  text-align: right;
}

/* Footer responsive */
@media (width <= 1024px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
  }
  .footer-headline {
    max-width: none;
  }
  .who-box p {
    max-width: 38ch;
  }
}
@media (width <= 640px) {
  .footer-cta {
    padding: 80px 0 46px;
  }
  .footer-headline {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 0.96;
    margin-bottom: 20px;
    max-width: none;
  }
  .footer-headline br {
    display: none;
  }
  .footer-headline-top {
    white-space: normal;
    display: block;
  }
  .text-grad {
    white-space: nowrap;
  }
  .footer-actions .btn-primary,
  .footer-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .who-box p {
    font-size: 15px;
    max-width: none;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
  }
  .footer-bottom span:last-child {
    text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  .footer-socials a {
    transition: color 0.2s;
  }
  .footer-socials a:hover {
    transform: none;
  }
}

.not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--nav-h, 64px));
  padding: var(--nav-h, 64px) 0;
}
.not-found__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.not-found__code {
  font-size: clamp(80px, 15vw, 140px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--purple), var(--violet));
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}
.not-found__heading {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  color: var(--text);
}
.not-found__desc {
  font-size: 16px;
  color: var(--muted);
  max-width: 400px;
  text-wrap: pretty;
}
.not-found__cta {
  margin-top: 8px;
}

/* The root 404 has no language in its URL, so it offers both. */
.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
