/* ─── Design tokens ─── */
:root {
  --bg:           #0d0f14;
  --surface:      #161a24;
  --surface-2:    #1e2332;
  --accent:       #3b82f6;
  --accent-glow:  #3b82f630;
  --accent-2:     #10b981;
  --accent-2-glow:#10b98130;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --border:       #2e3550;
  --radius:       0.75rem;
  --radius-sm:    0.4rem;
  --font:         system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --max-w:        72rem;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ─── Utilities ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2563eb; box-shadow: 0 0 0 4px var(--accent-glow); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; font-weight: 500; }
.btn-ghost:hover { color: var(--text); }

/* ─── Nav ─── */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 3.75rem;
  background: var(--bg); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.wordmark { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.nav-bar nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-bar nav a { padding: 0.4rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-muted); transition: color 0.15s; }
.nav-bar nav a:hover { color: var(--text); }
.nav-bar nav a.btn-ghost:hover { color: var(--text); }

/* ─── Hero ─── */
#hero {
  position: relative; overflow: hidden; min-height: 100svh;
  display: flex; align-items: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #0f1a35 0%, var(--bg) 70%);
}
.hero-globe {
  position: absolute; right: -4rem; top: 50%; transform: translateY(-50%);
  width: min(540px, 55vw); opacity: 0.18; pointer-events: none;
}
.hero-globe svg { width: 100%; height: auto; }
.globe-ring { stroke: var(--accent); }
.globe-dot { fill: var(--accent); }
.globe-line { stroke: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .hero-globe { animation: globe-drift 28s ease-in-out infinite alternate; }
}
@keyframes globe-drift { from { transform: translateY(-50%) rotate(-2deg); } to { transform: translateY(-52%) rotate(2deg); } }

.hero-content { position: relative; z-index: 1; padding-top: 4rem; padding-bottom: 4rem; max-width: 40rem; }
.hero-badge {
  display: inline-block; margin-bottom: 1.25rem;
  padding: 0.25rem 0.75rem; border-radius: 2rem;
  background: var(--accent-glow); border: 1px solid var(--accent);
  color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 34rem; margin-bottom: 2.25rem; line-height: 1.7; }
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); }
.hero-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.hero-note a:hover { color: #93c5fd; }

/* ─── Sections ─── */
.section { padding: 6rem 0; }
.section--surface { background: var(--surface); }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.6rem; }
.section-sub { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 3.5rem; }

/* ─── Cards (what it is) ─── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.section--surface .card { background: var(--surface-2); }
.card-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm);
  background: var(--accent-glow); border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; color: var(--accent);
}
.card-icon svg { width: 1.25rem; height: 1.25rem; }
.card-icon--green { background: var(--accent-2-glow); border-color: var(--accent-2); color: var(--accent-2); }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 1.25rem; }
.card-example {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--surface-2); border-left: 3px solid var(--accent);
  padding: 0.6rem 0.85rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted); line-height: 1.5;
}
.section--surface .card-example { background: var(--surface); }
.card-example--green { border-color: var(--accent-2); }

/* ─── Screenshots gallery ─── */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.shot {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.shot:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); transform: translateY(-2px); }
.shot--wide { grid-column: 1 / -1; }
.shot img { width: 100%; height: auto; display: block; background: #0a0c10; }
.shot figcaption { padding: 0.85rem 1.1rem; color: var(--text-muted); font-size: 0.88rem; border-top: 1px solid var(--border); }
/* Graceful fallback: an empty framed placeholder until the real capture is added. */
.shot--missing img { display: none; }
.shot--missing { min-height: 14rem; display: flex; align-items: center; justify-content: center; position: relative; }
.shot--missing::before {
  content: "Screenshot coming soon";
  color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem;
  opacity: 0.6;
}
.shot--missing figcaption { position: absolute; bottom: 0; left: 0; right: 0; }
.shots-note { margin-top: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.shots-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.shots-note a:hover { color: #93c5fd; }

/* ─── Features grid (technology) ─── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 2rem 3rem; }
.feature { display: flex; gap: 1.1rem; align-items: flex-start; }
.feature-icon {
  flex-shrink: 0; width: 2.5rem; height: 2.5rem;
  background: var(--accent-glow); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.feature-icon svg { width: 1.15rem; height: 1.15rem; }
.feature-icon--green { background: var(--accent-2-glow); border-color: var(--accent-2); color: var(--accent-2); }
.feature h4 { font-size: 0.97rem; font-weight: 700; margin-bottom: 0.3rem; }
.feature p { color: var(--text-muted); font-size: 0.88rem; }

/* ─── Stack tags ─── */
.stack-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 3.5rem; }
.stack-tags span {
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 0.35rem 0.8rem; border-radius: 2rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}

/* ─── About ─── */
.about-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 1.1rem; max-width: 42rem; }
.about-text strong { color: var(--text); font-weight: 700; }
.about-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.about-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.about-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.about-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.about-list li { position: relative; padding-left: 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.about-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5rem;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--accent-2);
}

/* ─── CTA / contact band ─── */
.section--cta {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 50%, #0a1628 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-inner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.5rem; }
.cta-inner > p { color: var(--text-muted); margin-bottom: 2rem; max-width: 38rem; margin-left: auto; margin-right: auto; }
.contact-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; justify-content: center; }

/* ─── Footer ─── */
.footer { padding: 2.5rem 1.5rem; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }
.footer-links a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--accent); }

/* ─── Scroll animations ─── */
.fade-up { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: var(--delay, 0s); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .fade-up { opacity: 1; transform: none; transition: none; } }

/* ─── Responsive ─── */
@media (max-width: 820px) {
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .nav-bar nav a:not(.btn-ghost) { display: none; }
  .hero-globe { display: none; }
  .shots { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}
