/* ============================================================
   OneWeirdDeveloper — stylesheet
   ============================================================ */

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

:root {
  --bg:           #07070f;
  --surface:      #0e0e1c;
  --card:         #121220;
  --border:       #1c1c34;
  --border-hover: #2e2e54;
  --primary:      #7c3aed;
  --primary-dim:  rgba(124, 58, 237, 0.18);
  --primary-glow: rgba(124, 58, 237, 0.35);
  --cyan:         #06b6d4;
  --orange:       #f97316;
  --green:        #10b981;
  --amber:        #f59e0b;
  --text:         #e2e8f0;
  --muted:        #64748b;
  --radius:       12px;
  --mono:         'Space Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ─────────────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary);
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
  vertical-align: middle;
}

@keyframes blink { 50% { opacity: 0; } }

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 7rem 2rem 5.5rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 4px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 1.25rem;
}

/* Glitch effect */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-top 5s infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 45%, 0 45%);
}

.glitch::after {
  color: var(--orange);
  animation: glitch-bot 5s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 78%, 0 78%);
}

@keyframes glitch-top {
  0%, 88%, 100% { transform: none; opacity: 0; }
  90% { transform: translate(-4px, 1px); opacity: 0.85; }
  92% { transform: translate(3px, -1px); opacity: 0.85; }
  94% { transform: none; opacity: 0; }
}

@keyframes glitch-bot {
  0%, 86%, 100% { transform: none; opacity: 0; }
  88% { transform: translate(4px, 2px); opacity: 0.85; }
  90% { transform: translate(-3px, -1px); opacity: 0.85; }
  92% { transform: none; opacity: 0; }
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 24px var(--primary-glow);
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 0 36px var(--primary-glow);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

/* ── Sections ────────────────────────────────────────────────── */

.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-wrap + .section-wrap {
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Filter bar ──────────────────────────────────────────────── */

.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.filter-btn {
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-transform: capitalize;
  font-family: var(--sans);
  letter-spacing: 0.3px;
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ── Projects grid ───────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.25rem;
}

/* ── Project card ────────────────────────────────────────────── */

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 40px rgba(124, 58, 237, 0.18);
}

/* Preview area */
.card-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}

.card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s;
  display: block;
}

.project-card:hover .card-preview img {
  transform: scale(1.05);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--surface) 0%, #181830 100%);
}

/* Play / View overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.project-card:hover .card-overlay { opacity: 1; }

.play-btn {
  padding: 0.55rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 1.5px;
  box-shadow: 0 0 24px var(--primary-glow);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: var(--mono);
}

.play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 36px var(--primary-glow);
}

/* Badges */
.card-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--cyan);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--mono);
  backdrop-filter: blur(4px);
}

/* Card body */
.card-body {
  padding: 1.1rem 1.15rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-body h3 {
  font-size: 0.975rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.card-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.55;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}

.tag {
  padding: 0.12rem 0.48rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.66rem;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.3px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.meta-year {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.card-dates {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
}

.date-item {
  white-space: nowrap;
}

.date-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cyan);
  margin-right: 0.25rem;
}

.status-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-active   { background: rgba(16,185,129,0.14); color: var(--green); }
.status-wip      { background: rgba(245,158,11,0.14); color: var(--amber); }
.status-archived { background: rgba(100,116,139,0.1); color: var(--muted); }

/* ── About section ───────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-text p strong { color: var(--text); }

.about-text p:last-child { margin-bottom: 0; }

.stack-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-item {
  padding: 0.3rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.3px;
}

/* ── How to add projects callout ─────────────────────────────── */

.add-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.add-callout h4 {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.add-callout ol {
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.add-callout code {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--card);
  color: var(--cyan);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ── Footer ──────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.3px;
}

.social-links a:hover { color: var(--primary); }

.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Loading / empty states ──────────────────────────────────── */

.state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.state-box .state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.state-box p { font-size: 0.875rem; margin-top: 0.4rem; }

.state-box code {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.6;
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 0.75rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .hero { padding: 4.5rem 1.5rem 3.5rem; }
  .section-wrap { padding: 3rem 1.25rem; }
  footer { padding: 2rem 1.25rem; }
}
