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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
  animation: pageIn 0.5s ease;
}
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

::selection { background: rgba(239,68,68,0.3); }

/* ─── Particles ─── */
#particles {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
#particles canvas { display: block; }

/* ─── Hero Glow ─── */
.hero-glow {
  position: fixed; top: -50%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(239,68,68,0.04), transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ─── Hero Grid Lines ─── */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(239,68,68,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239,68,68,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  animation: gridShift 8s linear infinite;
}
@keyframes gridShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* ─── Main ─── */
main {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
  padding: 80px 20px 60px;
  animation: heroIn 0.6s ease;
  overflow: hidden;
}
@keyframes heroIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.hero-icon { width: 80px; height: 80px; margin-bottom: 6px; }
.hero-icon svg { width: 100%; height: 100%; }

.hero h1 { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.gradient-text {
  background: linear-gradient(135deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tagline { color: #888; font-size: 1rem; max-width: 380px; line-height: 1.5; }

.hero-links { display: flex; gap: 18px; margin-top: 6px; }
.hero-links a {
  color: #555; font-size: 1.3rem;
  transition: color 0.25s ease, transform 0.25s ease;
}
.hero-links a:hover { color: #ef4444; transform: translateY(-2px); }

/* ─── About ─── */
.about {
  text-align: center; color: #999; font-size: 0.9rem; line-height: 1.6;
  max-width: 520px; margin: 0 auto;
  animation: fadeUp 0.5s ease 0.15s backwards;
}
.about strong { color: #ef4444; }
.about-links { margin-top: 12px; }
.about-links a { color: #ef4444; text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: opacity 0.2s; }
.about-links a:hover { opacity: 0.7; }

/* ─── Section Label ─── */
.section-label {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
  color: #555; margin-bottom: 16px;
}

/* ─── Cards ─── */
.projects { display: flex; flex-direction: column; gap: 16px; }

.card {
  position: relative;
  background: #111;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px 22px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.25s ease;
  animation: cardIn 0.5s ease backwards;
}
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.card:hover {
  border-color: rgba(239,68,68,0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(239,68,68,0.08), 0 4px 12px rgba(0,0,0,0.2);
}
.card.featured { border-color: rgba(239,68,68,0.12); }
.card.featured:hover {
  border-color: rgba(239,68,68,0.25);
  box-shadow: 0 12px 40px rgba(239,68,68,0.1), 0 4px 12px rgba(0,0,0,0.2);
}

.card-glow {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(500px circle at 50% -50%, rgba(239,68,68,0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover .card-glow { opacity: 1; }

.card-badge {
  display: inline-block;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: #22c55e; margin-bottom: 12px;
}
.card-badge.wip { color: #f59e0b; }

.card-header { display: flex; align-items: flex-start; gap: 14px; }
.card-img { width: 44px; height: 44px; min-width: 44px; border-radius: 12px; object-fit: cover; }
.card-icon {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.card-header h2 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.card-header p { color: #888; font-size: 0.82rem; line-height: 1.4; }

.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.card-tags span {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.12);
  color: #fca5a5;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  letter-spacing: 0.02em;
}

.card-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.82rem; font-weight: 600;
  transition: all 0.2s ease; cursor: pointer;
  text-decoration: none;
}
.btn.primary {
  background: #5865F2; color: #fff;
}
.btn.primary:hover { background: #4752c4; transform: translateY(-1px); }
.btn.secondary {
  background: rgba(255,255,255,0.06); color: #ddd;
  border: 1px solid rgba(255,255,255,0.08);
}
.btn.secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: #888; border: 1px solid rgba(255,255,255,0.06); }
.btn.ghost:hover { border-color: rgba(255,255,255,0.12); }
.btn.disabled { opacity: 0.5; cursor: default; }
.btn.disabled:hover { transform: none; }

.card-strip {
  position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,0.3), transparent);
}

/* ─── Stylized EvErYtHiNg ─── */
.stylized {
  font-weight: 800;
  background: linear-gradient(135deg, #c084fc, #ef4444, #c084fc);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hueShift 3s ease infinite;
}
@keyframes hueShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── Roadmap ─── */
.roadmap { animation: fadeUp 0.5s ease 0.25s backwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.roadmap-grid { display: flex; flex-direction: column; gap: 12px; }
.roadmap-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.roadmap-item:hover { border-color: rgba(255,255,255,0.08); }

.rm-dot {
  width: 10px; height: 10px; min-width: 10px;
  border-radius: 50%;
  background: #333;
}
.roadmap-item.done .rm-dot { background: #22c55e; }
.roadmap-item.current .rm-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,0.4);
}
.roadmap-item strong { font-size: 0.85rem; font-weight: 600; color: #ccc; display: block; }
.roadmap-item span { font-size: 0.78rem; color: #666; }

/* ─── Footer ─── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 60px 24px;
}
.footer-inner {
  max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.footer-logo { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 6px; color: #666; }
.footer-logo i { color: #ef4444; }
footer p { color: #444; font-size: 0.8rem; }
.footer-credit { opacity: 0.5; }
.footer-credit strong { color: #ef4444; }
.footer-credit a { color: #555; text-decoration: none; transition: color 0.2s; }
.footer-credit a:hover { color: #ef4444; opacity: 1; }

/* ─── Admin ─── */
.admin-gear {
  position: fixed; bottom: 20px; right: 20px; z-index: 99;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #111;
  border: 1px solid rgba(239,68,68,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #444; cursor: pointer; font-size: 0.9rem;
  transition: color 0.3s ease, transform 0.3s ease;
  user-select: none;
}
.admin-gear:hover { color: #ef4444; transform: rotate(60deg); }

.admin-overlay {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none; opacity: 0;
  transition: opacity 0.25s ease;
}
.admin-overlay.show { display: block; opacity: 1; }

.admin-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95);
  z-index: 200;
  display: none; opacity: 0;
  width: 90%; max-width: 360px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.admin-modal.show {
  display: block; opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.admin-modal-content {
  background: #111;
  border: 1px solid rgba(239,68,68,0.12);
  border-radius: 14px;
  padding: 24px;
}
.admin-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.admin-modal-header h3 { font-size: 1rem; color: #fff; display: flex; align-items: center; gap: 8px; }
.admin-modal-header h3 i { color: #ef4444; }
.admin-close { color: #555; cursor: pointer; font-size: 1rem; transition: color 0.2s; }
.admin-close:hover { color: #ef4444; }

.admin-modal-content label { color: #777; font-size: 0.78rem; display: block; margin-bottom: 6px; }
.admin-modal-content input {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.06);
  color: #ddd; margin-bottom: 12px; outline: none; font-size: 0.9rem;
}
.admin-modal-content input:focus { border-color: rgba(239,68,68,0.25); }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  main { padding: 40px 16px; gap: 40px; }
  .hero { padding: 50px 16px 40px; }
  .hero h1 { font-size: 2rem; }
  .hero-icon { width: 60px; height: 60px; }
  .card { padding: 16px 18px; }
  .card-header { flex-direction: column; gap: 10px; }
  .card-icon { width: 36px; height: 36px; min-width: 36px; font-size: 0.9rem; }
  .card-actions { flex-wrap: wrap; }
  .btn { padding: 7px 14px; font-size: 0.78rem; }
  footer { padding: 30px 16px; }
  .roadmap-item { padding: 10px 14px; }
}
