/* ===========================================================
   PLAYERDETECTION — Design System
   Concept: HUD / target-acquisition interface.
   The "player detection" name is taken literally: portfolio
   projects are framed as detected targets on a scan grid,
   marketplace items as tagged assets in an inventory scan.
=========================================================== */

:root {
  /* Color */
  --bg: #0a0c10;
  --bg-panel: #12161c;
  --bg-panel-raised: #171c24;
  --line: #232a35;
  --line-bright: #3a4552;

  --text: #e7eaee;
  --text-muted: #8b94a3;
  --text-faint: #545e6c;

  --amber: #e8a33d;      /* primary HUD accent — targeting reticle */
  --amber-dim: #7a5a26;
  --teal: #3ddc97;       /* secondary accent — "locked / online" */
  --red: #ff5c5c;        /* alerts, out of stock, errors */

  /* Type */
  --font-display: 'Chakra Petch', 'Rajdhani', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--amber);
  display: inline-block;
  box-shadow: 0 0 6px var(--amber);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand .dot {
  width: 8px; height: 8px;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav-links a {
  color: var(--text-muted);
  transition: color 0.15s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--amber); }
.nav-cart {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1px solid var(--line-bright);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-cart:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 24px;
  border: 1px solid var(--amber);
  background: transparent;
  color: var(--amber);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { background: var(--amber); color: var(--bg); }
.btn-solid {
  background: var(--amber);
  color: var(--bg);
}
.btn-solid:hover { background: #ffb85a; }
.btn-ghost {
  border-color: var(--line-bright);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); background: transparent; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--amber); }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 16px 0 20px;
}
.hero h1 .accent { color: var(--amber); }
.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Radar scan visual */
.radar {
  aspect-ratio: 1;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  position: relative;
  max-width: 380px;
  margin: 0 auto;
  background: radial-gradient(circle, rgba(232,163,61,0.06) 0%, transparent 70%);
}
.radar::before, .radar::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.radar::before { inset: 20%; }
.radar::after { inset: 40%; }
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(232,163,61,0.35) 30deg, transparent 60deg);
  animation: sweep 4s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-blip {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--teal);
}

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-head h2 { font-size: 1.8rem; }

/* ---------- Project / Product cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--amber-dim); transform: translateY(-2px); }
.card-media {
  aspect-ratio: 16/10;
  background: var(--bg-panel-raised);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-tag {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(10,12,16,0.85);
  border: 1px solid var(--line-bright);
  padding: 4px 8px;
  color: var(--amber);
}
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card-body p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 16px; flex: 1; }
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.price { color: var(--teal); font-weight: 600; }
.coord { color: var(--text-faint); font-size: 0.7rem; }

/* ---------- Skills / stack strip ---------- */
.stack-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--line-bright);
  padding: 6px 12px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 60px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--amber);
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state .eyebrow { justify-content: center; margin-bottom: 12px; }

.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border: 1px solid var(--line-bright);
  text-transform: uppercase;
}
.badge-teal { color: var(--teal); border-color: var(--teal); }
.badge-red { color: var(--red); border-color: var(--red); }
