@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #090b10;
  --bg2: #0e1118;
  --bg3: #13161f;
  --border: rgba(255,255,255,0.07);
  --accent: #00f0a0;
  --accent2: #0066ff;
  --text: #e8eaf0;
  --muted: #5a6080;
  --card: #10131c;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Noise 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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(9,11,16,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ── HAMBURGER ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

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

/* ── MAIN ── */
main { flex: 1; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  background: var(--bg2);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-socials { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.footer-socials a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-socials a:hover { color: var(--accent); }
.footer-socials svg { width: 18px; height: 18px; fill: currentColor; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #000; font-weight: 500; }
.btn-primary:hover { background: #00ffa8; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,240,160,0.25); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: rgba(0,240,160,0.07); transform: translateY(-2px); }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* ── CARD ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card:hover { border-color: rgba(0,240,160,0.25); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }

/* ── TAGS ── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(0,240,160,0.08);
  border: 1px solid rgba(0,240,160,0.2);
  color: var(--accent);
  border-radius: 3px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ══════════════════════════════════════════
   TABLET (≤900px)
══════════════════════════════════════════ */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; padding: 1.8rem 1.5rem; }
}

/* ══════════════════════════════════════════
   MOBILE (≤640px) — hamburger kicks in
══════════════════════════════════════════ */
@media (max-width: 640px) {

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 57px;
    left: 0; right: 0;
    background: rgba(9,11,16,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    z-index: 99;
  }

  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.8rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links a::after { display: none; }

  .btn { padding: 0.65rem 1.2rem; font-size: 0.75rem; }
  footer { padding: 1.5rem 1.2rem; gap: 1rem; }
  .footer-socials { gap: 0.9rem; }
}

/* ══════════════════════════════════════════
   SMALL MOBILE (≤400px)
══════════════════════════════════════════ */
@media (max-width: 400px) {
  .nav-logo { font-size: 0.95rem; }
  body { font-size: 14px; }
}
