/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0b0f;
  --bg2: #0f1117;
  --bg3: #151821;
  --surface: #1a1e2a;
  --border: #252b3b;
  --accent: #4fd1c5;
  --accent2: #f6ad55;
  --text: #e2e8f0;
  --muted: #718096;
  --navy: #1a2240;
  --font-display: 'DM Serif Display', serif;
  --font-body: 'DM Mono', monospace;
  --font-ui: 'Syne', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ===== NOISE TEXTURE OVERLAY ===== */
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.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ===== GRID BACKGROUND ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 209, 197, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 209, 197, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s var(--ease-out);
}

.nav.scrolled { padding: 0.85rem 3rem; }

.nav-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
}

.nav-title span { color: var(--accent); }

.nav-list {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-list li a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}

.nav-list li a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav-list li a:hover { color: var(--text); }
.nav-list li a:hover::after { width: 100%; }
.nav-list li a.active { color: var(--accent); }
.nav-list li a.active::after { width: 100%; }

/* hamburger hidden on desktop */
#nav-check { display: none; }
.nav-btn { display: none; }

/* ===== FOOTER ===== */
.copy-right-sec {
  padding: 1.5rem 3rem;
  background: var(--bg2);
  color: var(--muted);
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  margin-top: auto;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== MOBILE NAV ===== */
@media (max-width: 640px) {
  .nav { padding: 1rem 1.5rem; }
  .nav.scrolled { padding: 0.75rem 1.5rem; }

  .nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    cursor: pointer;
    z-index: 10;
  }
  .nav-btn label { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
  .nav-btn label span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    transition: all 0.3s;
  }

  .nav-list {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    background: var(--bg);
    height: 0;
    overflow: hidden;
    transition: height 0.4s var(--ease-out);
  }
  .nav-list li a { font-size: 1.1rem; }

  #nav-check:checked ~ .nav-list { height: 100vh; }
  #nav-check:checked ~ .nav-btn label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #nav-check:checked ~ .nav-btn label span:nth-child(2) { opacity: 0; }
  #nav-check:checked ~ .nav-btn label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
