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

:root {
  --bg:        #0b0b0f;
  --surface:   #13131a;
  --border:    #22222e;
  --accent:    #c8f135;       /* electric lime */
  --accent2:   #6e59f7;       /* violet */
  --text:      #e8e8f0;
  --muted:     #6b6b80;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius:    12px;
  --gutter:    clamp(20px, 5vw, 80px);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* NOISE TEXTURE */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.028;
  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)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── HIDDEN HELPER ─────────────────────────────────────────── */
.hidden { display: none !important; }

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.bracket { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-error {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #ff6b6b;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 12px 24px;
  margin: 0 var(--gutter);
  border-radius: 8px;
  margin-top: 16px;
}

.auth-error button {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0 0 16px;
}

.user-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-primary {
  background: var(--accent);
  color: #0b0b0f;
}
.btn-primary:hover {
  background: #d8ff3a;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200,241,53,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn.large {
  font-size: 0.95rem;
  padding: 13px 30px;
  border-radius: 8px;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  padding: clamp(60px, 10vw, 120px) var(--gutter) clamp(50px, 8vw, 90px);
  max-width: 860px;
  position: relative;
}

/* Subtle gradient blob behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -80px;
  width: 600px;
  height: 500px;
  background: radial-gradient(ellipse at 30% 40%, rgba(110,89,247,0.12), transparent 65%);
  pointer-events: none;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-tag::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
}

.accent { color: var(--accent); }

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-note {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.hero-welcome {}
.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(200,241,53,0.07);
  border: 1px solid rgba(200,241,53,0.25);
  color: var(--accent);
  font-size: 0.82rem;
  padding: 10px 18px;
  border-radius: 40px;
}

/* ── PROJECTS ──────────────────────────────────────────────── */
.projects {
  padding: 20px var(--gutter) 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── CARD ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,241,53,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.card:hover {
  border-color: #2e2e42;
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.card.locked {
  border-color: var(--border);
  opacity: 0.75;
}

.card.locked:hover {
  border-color: rgba(110,89,247,0.4);
  opacity: 1;
}

/* Unlocked state */
.card.unlocked {
  opacity: 1;
  border-color: rgba(200,241,53,0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.card-status {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}

.card-status.online {
  background: rgba(200,241,53,0.08);
  color: var(--accent);
  border-color: rgba(200,241,53,0.2);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lock-icon { font-size: 1rem; }

.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.card-locked-desc {
  font-style: italic;
}

.card-meta {
  font-size: 0.72rem;
  color: #3d3d52;
  font-family: var(--font-mono);
}

.card-meta.blurred {
  filter: blur(4px);
  user-select: none;
}

/* When card is unlocked, reveal the blurred meta */
.card.unlocked .card-meta.blurred {
  filter: none;
}

.card-link, .unlock-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: letter-spacing 0.2s;
}

.card-link:hover, .unlock-btn:hover {
  letter-spacing: 0.04em;
}

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--gutter);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-auth strong {
  color: var(--text);
}

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag    { animation: fadeUp 0.5s ease both; }
.hero-title  { animation: fadeUp 0.5s 0.1s ease both; }
.hero-sub    { animation: fadeUp 0.5s 0.2s ease both; }
.hero-cta,
.hero-welcome{ animation: fadeUp 0.5s 0.3s ease both; }

.card {
  animation: fadeUp 0.45s ease both;
}
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
