/* ============================================
   WrongOrbit — Design tokens
   ============================================ */
:root {
  /* Color */
  --c-primary: #A855F7;
  --c-primary-light: #C084FC;
  --c-primary-dark: #7E22CE;

  --c-bg: #080808;
  --c-surface: #111111;
  --c-surface-hover: #1A1A1A;

  --c-text: #FFFFFF;
  --c-text-secondary: #A1A1AA;
  --c-text-muted: #71717A;

  --c-accent-pink: #EC4899;
  --c-accent-blue: #60A5FA;

  --c-border: rgba(255, 255, 255, 0.08);

  /* Radius */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-btn: 14px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.4);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 200ms;
  --dur-mid: 300ms;

  /* Layout */
  --max-w: 1280px;
  --content-w: 1200px;

  /* Aliases for component use */
  --color-primary: var(--c-primary);
  --color-primary-dark: var(--c-primary-dark);
  --color-bg: var(--c-bg);
  --color-surface: var(--c-surface);
  --color-surface-hover: var(--c-surface-hover);
  --color-text: var(--c-text);
  --color-secondary: var(--c-text-secondary);
  --color-muted: var(--c-text-muted);
  --color-border: var(--c-border);
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; }

/* ============================================
   Base
   ============================================ */
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background-color: var(--c-bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ensure content sits above background fx layers */
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ============================================
   Background FX — Stars / Comets / Orbits
   ============================================ */
#starfield, #shooting-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Stars: dim, subtle, distant */
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: star-twinkle ease-in-out infinite alternate;
}
@keyframes star-twinkle {
  from { opacity: 0.05; }
  to   { opacity: var(--peak, 0.35); }
}

/* Comets: rare, bright head + tapered tail */
.shooting-star {
  position: absolute;
  width: 2.5px; height: 2.5px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 4px 1px rgba(255, 255, 255, 0.9),
    0 0 12px 3px rgba(200, 170, 255, 0.5);
  animation: comet-path linear infinite;
  opacity: 0;
  will-change: transform, opacity;
}
.shooting-star::before {
  content: "";
  position: absolute;
  top: 50%; right: 0;
  width: 140px; height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(200, 170, 255, 0.4) 40%,
    transparent 100%
  );
  border-radius: 999px;
  filter: blur(0.4px);
}
@keyframes comet-path {
  0%   { translate: 0 0; opacity: 0; }
  2%   { opacity: 1; }
  60%  { opacity: 0.9; }
  80%  { translate: var(--dx, 70vw) var(--dy, 35vw); opacity: 0; }
  100% { translate: var(--dx, 70vw) var(--dy, 35vw); opacity: 0; }
}

/* Orbital rings inside hero (scroll with content) */
.hero-orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.orbital-ring {
  position: absolute;
  border-radius: 50%;
  animation: orbit-spin linear infinite;
  top: 50%; left: 60%;
}
@keyframes orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
.orbital-ring--1 {
  width: 100vw; height: 45vw;
  border: 1px solid rgba(168, 85, 247, 0.10);
  animation-duration: 90s;
}
.orbital-ring--2 {
  width: 70vw; height: 32vw;
  border: 1px solid rgba(236, 72, 153, 0.08);
  animation-duration: 140s;
  animation-direction: reverse;
}

@media (prefers-reduced-motion: reduce) {
  .star, .shooting-star, .orbital-ring { animation: none; }
  .star { opacity: 0.2; }
  .shooting-star { display: none; }
}

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 1024px) { .container { padding: 0 24px; } }
@media (max-width: 640px)  { .container { padding: 0 16px; } }

section { padding: 64px 0; }
@media (max-width: 768px) { section { padding: 40px 0; } }

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 { line-height: 1.1; font-weight: 700; }
h1 { font-size: 68px; font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; }
h2 { font-size: 48px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 32px; font-weight: 700; }
h4 { font-size: 24px; font-weight: 600; }

.body-lg { font-size: 20px; }
.small   { font-size: 14px; }
.caption { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.muted     { color: var(--c-text-muted); }
.secondary { color: var(--c-text-secondary); }

.text-purple {
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 1024px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
}
@media (max-width: 640px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: scale(1.02); }

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
}
.btn-primary:hover { box-shadow: var(--shadow-glow); }

.btn-secondary {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover { background: var(--c-surface-hover); }

.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 1, 15, 0.6);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
}
.logo img { height: 48px; width: auto; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  color: var(--c-text-secondary);
  font-size: 15px;
  transition: color var(--dur-fast) var(--ease);
}
.nav a:hover { color: var(--c-text); }

@media (max-width: 768px) {
  .nav { display: none; }
}

/* ============================================
   Hero
   ============================================ */
.hero { padding: 80px 0 0; overflow: hidden; position: relative; }
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .tag-row { justify-content: center; } }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-text-secondary);
  text-transform: uppercase;
}
.tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-primary);
  box-shadow: 0 0 8px var(--c-primary);
}

.hero h1 { margin-bottom: 24px; }
.hero p.lead {
  font-size: 18px;
  color: var(--c-text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}
@media (max-width: 900px) { .hero p.lead { margin-left: auto; margin-right: auto; } }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .hero-actions { justify-content: center; } }


.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: -1px; /* flush with section base; planet is cropped at the bottom */
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(168, 85, 247, 0.4), transparent 60%);
  filter: blur(50px);
  z-index: -1;
}
/* Orbital ring */
.hero-art::after {
  content: "";
  position: absolute;
  width: 110%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) rotate(-18deg);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  z-index: -1;
  filter: blur(0.5px);
}
.hero-art img {
  width: 100%;
  max-width: 680px;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 60px rgba(168, 85, 247, 0.35));
}

/* ============================================
   Mission strip (Experiment / Launch / Explore / Repeat)
   ============================================ */
.mission {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (max-width: 768px)  { .mission { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .mission { grid-template-columns: 1fr; } }

.mission-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px;
  border-right: 1px solid var(--c-border);
}
.mission-item:last-child { border-right: none; }
@media (max-width: 768px) {
  .mission-item:nth-child(2) { border-right: none; }
  .mission-item:nth-child(-n+2) { border-bottom: 1px solid var(--c-border); }
}
@media (max-width: 480px) {
  .mission-item { border-right: none; border-bottom: 1px solid var(--c-border); }
  .mission-item:last-child { border-bottom: none; }
}
.mission-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.2);
  display: grid; place-items: center;
  margin-bottom: 4px;
  color: var(--c-primary-light);
}
.mission-icon svg {
  width: 18px; height: 18px;
  stroke-width: 1.75;
}
.mission-item h4 { font-size: 18px; }
.mission-item p {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ============================================
   Projects
   ============================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-head a {
  color: var(--c-primary-light);
  font-size: 14px;
  font-weight: 500;
}
.section-head a:hover { color: var(--c-primary); }

.projects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .projects { grid-template-columns: 1fr; } }

/* Projects grid variants */
.projects-2 { grid-template-columns: repeat(2, 1fr); }
.projects-3 { grid-template-columns: repeat(3, 1fr); }
.projects-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .projects-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .projects-2, .projects-3 { grid-template-columns: 1fr; }
  .projects-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .projects-4 { grid-template-columns: 1fr; }
}

/* Category label */
.projects-category-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.projects-category-label svg { width: 14px; height: 14px; }

/* ── Project card ──────────────────────────── */
.project-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: transform var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.28);
  background: var(--c-surface-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* "In development" card: dimmed, no hover lift */
.project-card.is-dev {
  opacity: 0.55;
  border-style: dashed;
}
.project-card.is-dev:hover {
  transform: none;
  opacity: 0.7;
  box-shadow: none;
}

/* Card head: icon + badge aligned to edges */
.pc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* Status badge (top-right) */
.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.pc-badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}
.pc-badge.live {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #34D399;
}
.pc-badge.dev {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #FCD34D;
}

/* Card body: name + description — flex-grows to push footer down */
.pc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.pc-body h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-text);
}
.pc-body p {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.55;
}

/* Card footer: separated by top border */
.pc-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--c-border);
  padding-top: 16px;
}

/* Primary install CTA — fills available space */
.pc-install {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: var(--r-btn);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-primary-light);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.pc-install:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.45);
  color: #fff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

/* Secondary links: muted text, right side */
.pc-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.pc-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-muted);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
  border-bottom: 1px solid transparent;
}
.pc-link:hover {
  color: var(--c-text-secondary);
  border-bottom-color: var(--c-text-muted);
}

/* Icon: image */
.pc-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: #1c1c1e;
  border: 1px solid var(--c-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  padding: 4px;
}

/* Icon: placeholder */
.pc-icon-placeholder {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: #1c1c1e;
  border: 1px solid var(--c-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  display: grid; place-items: center;
  color: var(--c-text-muted);
  flex-shrink: 0;
}
.pc-icon-placeholder svg { width: 22px; height: 22px; stroke-width: 1.5; }

/* Legacy selectors kept for backward compat */
.project-icon-img  { display: none; }
.project-icon-placeholder { display: none; }
.project-footer    { display: none; }

/* ============================================
   About
   ============================================ */
.about-section { position: relative; overflow: hidden; }
.about-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5%;
  width: 55%;
  height: 100%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
}
.about-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.about-art img {
  max-width: 540px;
  width: 100%;
  filter: drop-shadow(0 16px 56px rgba(168, 85, 247, 0.45));
  position: relative;
  z-index: 1;
}
.about-content { position: relative; }
.about-content .caption { color: var(--c-primary-light); margin-bottom: 20px; }
.about-content h2 { margin-bottom: 24px; font-size: 52px; }
@media (max-width: 1100px) { .about-content h2 { font-size: 44px; } }
@media (max-width: 700px)  { .about-content h2 { font-size: 34px; } }
.about-content p {
  color: var(--c-text-secondary);
  margin-bottom: 32px;
  font-size: 18px;
  line-height: 1.65;
}

/* ============================================
   Newsletter band
   ============================================ */
.newsletter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 32px 40px;
  background:
    radial-gradient(circle at 0% 50%, rgba(168, 85, 247, 0.25), transparent 50%),
    radial-gradient(circle at 100% 50%, rgba(236, 72, 153, 0.15), transparent 50%),
    var(--c-surface);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--r-lg);
}
@media (max-width: 768px) {
  .newsletter { grid-template-columns: 1fr; text-align: center; }
}
.newsletter h3 { font-size: 22px; margin-bottom: 4px; }
.newsletter p  { color: var(--c-text-muted); font-size: 14px; }
.newsletter-form { display: flex; gap: 8px; }
@media (max-width: 768px) { .newsletter-form { justify-content: center; } }
.newsletter-form input {
  padding: 14px 18px;
  border-radius: var(--r-btn);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  min-width: 240px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.newsletter-form input:focus { border-color: var(--c-primary); }
.newsletter-form input::placeholder { color: var(--c-text-muted); }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--c-border);
  margin-top: 64px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 24px; }
.footer-nav a {
  color: var(--c-text-muted);
  font-size: 14px;
  transition: color var(--dur-fast) var(--ease);
}
.footer-nav a:hover { color: var(--c-text); }
.footer-copy { color: var(--c-text-muted); font-size: 13px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-secondary);
  transition: all var(--dur-fast) var(--ease);
}
.footer-social a:hover {
  background: var(--c-surface-hover);
  color: var(--c-primary-light);
  border-color: rgba(168, 85, 247, 0.3);
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.float { animation: float 6s ease-in-out infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 700ms var(--ease) both; }
