/* ════════════════ THEME VARIABLES ════════════════ */
:root {
  --bg: #050810;
  --bg2: #080d18;
  --surface: #0d1525;
  --surface2: #111c32;
  --accent: #00e5ff;
  --accent2: #7b2fff;
  --accent3: #ff6b35;
  --accent4: #a8ff78;
  --text: #e8edf8;
  --text-muted: #6b7a99;
  --border: rgba(0, 229, 255, .12);
  --glow: rgba(0, 229, 255, .15);
  --nav-bg: rgba(5, 8, 16, .92);
  --nav-border: rgba(0, 229, 255, .12);
  --card-bg: #0d1525;
  --shadow: rgba(0, 0, 0, .5);
}

[data-theme="light"] {
  --bg: #f0f4ff;
  --bg2: #e4eaf8;
  --surface: #fff;
  --surface2: #f0f5ff;
  --accent: #0099bb;
  --accent2: #6020cc;
  --accent3: #e85520;
  --accent4: #3a8c1a;
  --text: #0d1525;
  --text-muted: #4a5a78;
  --border: rgba(0, 153, 187, .2);
  --glow: rgba(0, 153, 187, .1);
  --nav-bg: rgba(255, 255, 255, .96);
  --nav-border: rgba(0, 0, 0, .1);
  --card-bg: #fff;
  --shadow: rgba(0, 0, 0, .1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background .4s, color .4s;
}

[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .4;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 229, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  transition: opacity .4s;
}

[data-theme="light"] .grid-bg {
  opacity: .2;
}

/* ════════════════ NAV ════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 60px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  transition: background .4s, border-color .4s, box-shadow .3s;
}

.nav-logo {
  text-decoration: none;
  display: flex;
}

.navbar-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all .25s;
  letter-spacing: .01em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(128, 128, 128, .08);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.btn-nav-login {
  padding: 9px 22px;
  background: var(--accent);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .25s;
  letter-spacing: .02em;
  box-shadow: 0 0 24px rgba(0, 229, 255, .25);
  white-space: nowrap;
}

.btn-nav-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(0, 229, 255, .4);
}

/* ── Theme Toggle (new icon-button design) ── */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
  flex-shrink: 0;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, .08);
  box-shadow: 0 0 16px rgba(0, 229, 255, .15);
}

.ti-icon {
  position: absolute;
  font-size: 1.2rem;
  transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
  line-height: 1;
}

.ti-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.ti-sun {
  opacity: 0;
  transform: rotate(90deg) scale(.5);
}

[data-theme="light"] .ti-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(.5);
}

[data-theme="light"] .ti-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(245, 158, 11, .35);
  background: rgba(245, 158, 11, .06);
}

[data-theme="light"] .theme-toggle:hover {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, .2);
}

/* ── Burger ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: all .2s;
  z-index: 1001;
  flex-shrink: 0;
}

.nav-burger:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, .06);
}

.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .35s cubic-bezier(.68, -.6, .32, 1.6);
  transform-origin: center;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu ── */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--nav-border);
  padding: 20px 24px 28px;
  z-index: 999;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .3s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.nav-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}

.nav-mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.nav-mobile-menu ul a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 10px;
  transition: all .2s;
  border: 1px solid transparent;
}

.nav-mobile-menu ul a:hover,
.nav-mobile-menu ul a.active {
  color: var(--accent);
  background: rgba(0, 229, 255, .06);
  border-color: rgba(0, 229, 255, .15);
}

.nav-mobile-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-mobile-bottom .btn-nav-login {
  flex: 1;
  justify-content: center;
  display: inline-flex;
}

/* ─── REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s, transform .7s;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════ FOOTER ════════════════ */
footer {
  position: relative;
  z-index: 1;
  background: #05080f;
  border-top: 1px solid rgba(0, 229, 255, .1);
}

[data-theme="light"] footer {
  background: #0d1525;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 60px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 50px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  color: #e8edf8;
}

.footer-logo span {
  color: var(--accent);
}

.footer-tagline {
  color: #6b7a99;
  font-size: .88rem;
  line-height: 1.65;
  font-weight: 300;
  max-width: 260px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7a99;
  text-decoration: none;
  transition: all .25s;
  background: rgba(13, 21, 37, .6);
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 229, 255, .06);
  transform: translateY(-2px);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  color: #e8edf8;
  letter-spacing: .02em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.footer-links a {
  color: #6b7a99;
  text-decoration: none;
  font-size: .85rem;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a::before {
  content: '';
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .2s;
  flex-shrink: 0;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:hover::before {
  width: 12px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 50px auto 0;
  padding: 24px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  flex-wrap: wrap;
}

.footer-copy {
  color: #4a5568;
  font-size: .78rem;
  font-family: 'Space Mono', monospace;
  letter-spacing: .03em;
}

.footer-tech {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tech-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-family: 'Space Mono', monospace;
  font-size: .6rem;
  letter-spacing: .06em;
  border: 1px solid rgba(0, 229, 255, .15);
  color: #6b7a99;
}

.tech-badge:hover {
  border-color: rgba(0, 229, 255, .4);
  color: var(--accent);
}

/* ════════════════ ANIMATIONS ════════════════ */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s, transform .7s;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════ RESPONSIVE ════════════════ */
@media(max-width:1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media(max-width:900px) {
  nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-mobile-menu {
    display: block;
  }

  #themeToggle {
    display: none;
  }

  .footer-inner {
    padding: 48px 24px 0;
  }

  .footer-bottom {
    padding: 20px 24px;
    flex-direction: column;
    text-align: center;
  }

  .footer-tech {
    justify-content: center;
  }
}

@media(max-width:600px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1/-1;
  }
}

@media(max-width:480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}