/* ============================================================
   SUMZIP DESIGN SYSTEM  —  shared.css
   Import on every page:
   <link rel="stylesheet" href="shared.css">
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors - Dark (default) */
  --bg:        #07080f;
  --bg2:       #0e0f1c;
  --bg3:       #161728;
  --border:    rgba(99, 120, 255, 0.12);
  --border2:   rgba(99, 120, 255, 0.22);
  --text:      #eaebff;
  --text2:     #9395b0;
  --text3:     #5c5e7a;
  --accent:    #4f6fff;
  --accent-glow: rgba(79, 111, 255, 0.25);
  --green:     #00d97e;
  --green-glow: rgba(0, 217, 126, 0.2);
  --orange:    #ff5c1a;
  --orange-glow: rgba(255, 92, 26, 0.2);
  --yellow:    #ffc107;
  --red:       #ff3b3b;

  /* Typography */
  --font:      'Outfit', sans-serif;
  --mono:      'JetBrains Mono', monospace;

  /* Spacing */
  --nav-h:     60px;   /* top nav height if used */
  --bnav-h:    68px;   /* bottom nav height */
  --page-max:  860px;
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
}

[data-theme="light"] {
  --bg:        #f2f4ff;
  --bg2:       #ffffff;
  --bg3:       #e8ecff;
  --border:    rgba(79, 111, 255, 0.15);
  --border2:   rgba(79, 111, 255, 0.28);
  --text:      #0a0b1a;
  --text2:     #3d3f60;
  --text3:     #8082a8;
  --accent-glow: rgba(79, 111, 255, 0.12);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  padding-bottom: var(--bnav-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }

/* ── Background effects ────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(79,111,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,111,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
.bg-glow-top {
  position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse, rgba(79,111,255,0.08) 0%, transparent 70%);
}

/* ── Page wrapper ──────────────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px 20px 32px;
}

/* ── Top bar (logo + actions) ──────────────────────────────── */
.top-bar {
  position: sticky; top: 0; z-index: 90;
  background: rgba(7, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex; align-items: center;
}
[data-theme="light"] .top-bar { background: rgba(242,244,255,0.88); }
.top-bar-inner {
  max-width: var(--page-max);
  margin: 0 auto; width: 100%;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--mono);
  font-size: 1.1rem; font-weight: 700;
  color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.logo-cursor {
  display: inline-block; width: 8px; height: 16px;
  background: var(--accent); border-radius: 2px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--border2); }

/* ── Bottom navigation ─────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bnav-h);
  background: rgba(7, 8, 15, 0.95);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}
[data-theme="light"] .bottom-nav { background: rgba(242,244,255,0.95); }

.bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 8px 4px;
  color: var(--text3);
  transition: color 0.2s; border-radius: var(--radius-sm);
  text-decoration: none;
}
.bn-item.active { color: var(--accent); }
.bn-item:hover { color: var(--text2); }
.bn-icon { font-size: 1.3rem; line-height: 1; }
.bn-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.card-link { display: block; text-decoration: none; color: inherit; }

/* ── Badges / tags ─────────────────────────────────────────── */
.tag {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 500;
  padding: 3px 8px; border-radius: 100px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); display: inline-flex; align-items: center; gap: 4px;
}
.tag-accent { background: rgba(79,111,255,0.1); border-color: rgba(79,111,255,0.25); color: var(--accent); }
.tag-green  { background: rgba(0,217,126,0.1);  border-color: rgba(0,217,126,0.25);  color: var(--green); }
.tag-orange { background: rgba(255,92,26,0.1);  border-color: rgba(255,92,26,0.25);  color: var(--orange); }
.tag-red    { background: rgba(255,59,59,0.1);  border-color: rgba(255,59,59,0.25);  color: var(--red); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.7rem 1.4rem; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  border: none; transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer; text-decoration: none;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 36px var(--accent-glow); }
.btn-ghost {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border);
}
.btn-full { width: 100%; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

/* ── Section headings ──────────────────────────────────────── */
.section-label {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.section-label::before { content: '//'; color: var(--orange); }
h2.section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }

/* ── Alert / info boxes ────────────────────────────────────── */
.alert-box {
  border-radius: var(--radius); padding: 1rem 1.2rem;
  display: flex; gap: 12px; align-items: flex-start;
  margin: 1rem 0;
}
.alert-box .alert-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.alert-box .alert-body { font-size: 0.85rem; line-height: 1.7; color: var(--text2); }
.alert-box .alert-body strong { color: var(--text); }
.alert-danger { background: rgba(255,92,26,0.08); border: 1px solid rgba(255,92,26,0.25); }
.alert-success { background: rgba(0,217,126,0.08); border: 1px solid rgba(0,217,126,0.25); }
.alert-info    { background: rgba(79,111,255,0.08); border: 1px solid rgba(79,111,255,0.25); }

/* ── Form elements ─────────────────────────────────────────── */
.input {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); font-size: 0.95rem;
  padding: 0.75rem 1rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--text3); }
label.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text2); display: block; margin-bottom: 6px; }
.form-group { margin-bottom: 1rem; }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text3); font-size: 0.78rem; font-family: var(--mono);
  margin: 1.2rem 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Progress bar ──────────────────────────────────────────── */
.progress-bar {
  height: 6px; background: var(--bg3);
  border-radius: 100px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* ── Read badge (article cards) ────────────────────────────── */
.read-badge {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: #000; font-weight: 700; flex-shrink: 0;
}

/* ── Scroll animations ─────────────────────────────────────── */
.anim {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.anim.visible { opacity: 1; transform: none; }
.anim-d1 { transition-delay: 0.1s; }
.anim-d2 { transition-delay: 0.2s; }
.anim-d3 { transition-delay: 0.3s; }

/* ── Utility ───────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text2); }
.text-small { font-size: 0.82rem; }
.text-mono { font-family: var(--mono); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.fw-700 { font-weight: 700; }
.w-full { width: 100%; }
