:root {
  --accent: #49E8C5;
  --accent-glow: rgba(73, 232, 197, 0.5);
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #03191D;
}

body.is-loading {
  overflow: hidden;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #03191D;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.loader-logo {
  width: min(170px, 45vw);
  animation: loaderPulse 1.8s ease-in-out infinite;
}

.loader-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(73, 232, 197, 0.15);
  border-top-color: var(--accent);
  animation: loaderSpin 0.9s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 24px 0;
  transition: transform 0.4s ease;
}

.nav-bar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.glass {
  background: rgba(8, 32, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

header.scrolled .glass {
  background: rgba(8, 32, 36, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.logo-chip img {
  height: 34px;
  display: block;
  transition: filter 0.3s ease;
}

.logo-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 232, 197, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-bar > .reveal-left {
  flex-shrink: 0;
}

nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
}

.nav-indicator {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  width: 0;
  border-radius: 999px;
  background: rgba(73, 232, 197, 0.1);
  border: 1px solid var(--accent);
  box-shadow: inset 0 0 10px rgba(73, 232, 197, 0.12);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease;
  z-index: 0;
}

.nav-indicator::before,
.nav-indicator::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--accent);
}

.nav-indicator::before {
  top: -4px;
  left: -4px;
  border-right: none;
  border-bottom: none;
}

.nav-indicator::after {
  bottom: -4px;
  right: -4px;
  border-left: none;
  border-top: none;
}

nav a {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.7;
  padding: 11px 22px;
  border-radius: 999px;
  transition: opacity 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

nav a:hover {
  opacity: 1;
}

nav a.active {
  opacity: 1;
  color: #EAFFFA;
}

/* Reusable HUD corner ticks — reveal on hover */
.hud-ticks {
  position: relative;
}

.hud-ticks::before,
.hud-ticks::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.3s ease;
  pointer-events: none;
}

.hud-ticks::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.hud-ticks::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

.hud-ticks:hover::before,
.hud-ticks:hover::after {
  opacity: 1;
}

.hud-ticks:hover::before {
  transform: translate(-3px, -3px);
}

.hud-ticks:hover::after {
  transform: translate(3px, 3px);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }

.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 90ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 180ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Burger button — hidden on desktop */
.burger {
  position: relative;
  z-index: 1000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 52px;
  height: 52px;
  background: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Article */
.article-header {
  padding: 170px 24px 36px;
  text-align: center;
}

.article-header .kicker {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 246, 245, 0.5);
  font-weight: 600;
  margin-bottom: 12px;
}

.article-header h1 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  color: #F3F6F5;
  line-height: 1.15;
  max-width: 720px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 12.5px;
}

.article-meta-date {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: rgba(243, 246, 245, 0.45);
}

.article-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(243, 246, 245, 0.35);
  flex-shrink: 0;
}

.article-meta-author {
  font-weight: 600;
  color: var(--accent);
}

.article-cover {
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}

.section-article {
  padding: 0 24px 100px;
}

.article-body {
  max-width: 620px;
  margin: 0 auto;
}

.article-body p {
  font-size: clamp(15px, 1.6vw, 17px);
  color: rgba(243, 246, 245, 0.8);
  line-height: 1.9;
  margin-bottom: 24px;
}

.article-body p.article-signature {
  font-style: italic;
  color: rgba(243, 246, 245, 0.55);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.article-back i {
  font-size: 14px;
  transition: transform 0.25s ease;
}

.article-back:hover i {
  transform: translateX(-4px);
}

/* Footer */
.footer {
  padding: 48px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #F3F6F5;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.footer-social:hover {
  opacity: 1;
}

.footer-social i {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(243, 246, 245, 0.55);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-contact:hover {
  color: var(--accent);
}

.footer-contact i {
  font-size: 15px;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(243, 246, 245, 0.45);
  letter-spacing: 0.02em;
}

/* Mobile */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .logo-chip img {
    height: 30px;
  }

  .logo-chip {
    padding: 8px 18px;
  }

  .nav-indicator {
    display: none;
  }

  nav.glass {
    position: fixed;
    inset: 0;
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(5, 20, 23, 0.97);
    border: none;
    border-radius: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: none;
    z-index: 999;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: none;
  }

  nav.open {
    display: flex;
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  nav a {
    width: auto;
    padding: 16px 0;
    font-size: 20px;
  }

  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }

  .scroll-top-ring {
    width: 46px;
    height: 46px;
  }
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 32, 36, 0.8);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #ffffff;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.scroll-top:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.scroll-top i {
  font-size: 18px;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}

.scroll-top:hover i {
  transform: translateY(-2px);
}

.scroll-top-ring {
  position: absolute;
  inset: 0;
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
}

.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}
