/*
 * Tech With Kobina — Shared Stylesheet
 * Included by every page. Page-specific styles live in inline <style> blocks.
 */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:             #ffffff;
  --bg-subtle:      #f8f9fb;
  --bg-muted:       #f1f3f7;
  --border:         #e4e7ed;
  --border-strong:  #c9cdd6;
  --text:           #0f1117;
  --text-2:         #3d4150;
  --text-3:         #6b7385;
  --text-4:         #9ba3b5;
  --brand:          #2563eb;
  --brand-dark:     #1d4ed8;
  --brand-light:    #eff4ff;
  --brand-mid:      #bfcffe;
  --green:          #16a34a;
  --green-bg:       #f0fdf4;
  --amber:          #d97706;
  --amber-bg:       #fffbeb;
  --red:            #dc2626;
  --red-bg:         #fef2f2;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.05);
  --shadow:         0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-md:      0 4px 6px rgba(0,0,0,0.06), 0 10px 30px rgba(0,0,0,0.07);
  --shadow-lg:      0 8px 16px rgba(0,0,0,0.06), 0 24px 64px rgba(0,0,0,0.08);
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --font:           'Inter', system-ui, -apple-system, sans-serif;
  --font-display:   'Bricolage Grotesque', sans-serif;
  --font-mono:      ui-monospace, 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}
[data-theme="dark"] {
  --bg:             #0c0e14;
  --bg-subtle:      #12151e;
  --bg-muted:       #191d28;
  --border:         #252836;
  --border-strong:  #343848;
  --text:           #f0f2f7;
  --text-2:         #b8bdd0;
  --text-3:         #757d95;
  --text-4:         #4a5068;
  --brand:          #4f82f7;
  --brand-dark:     #6b98f9;
  --brand-light:    #141929;
  --brand-mid:      #253060;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.3);
  --shadow:         0 1px 3px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-md:      0 4px 6px rgba(0,0,0,0.4), 0 10px 30px rgba(0,0,0,0.3);
  --shadow-lg:      0 8px 16px rgba(0,0,0,0.4), 0 24px 64px rgba(0,0,0,0.3);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.2s, color 0.2s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Text selection */
::selection { background: var(--brand-light); color: var(--brand); }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-2); }

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
[data-theme="dark"] nav { background: rgba(12,14,20,0.92); }
nav.scrolled { box-shadow: var(--shadow); background: rgba(255,255,255,0.97); }
[data-theme="dark"] nav.scrolled { background: rgba(12,14,20,0.97); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
  margin-left: 0;
}
.nav-right { margin-left: auto; }
.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-muted); }
.nav-links a.active { color: var(--brand); background: var(--brand-light); }

/* ── Learn dropdown ── */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-3);
  background: none; border: none; cursor: pointer;
  transition: color .15s, background .15s;
  font-family: inherit;
}
.nav-dropdown-trigger:hover { color: var(--text); background: var(--bg-muted); }
.nav-dropdown-trigger.active { color: var(--brand); background: var(--brand-light); }
.nav-dropdown-trigger svg { transition: transform .2s ease; flex-shrink: 0; }
.nav-dropdown-trigger.open { color: var(--brand); background: var(--brand-light); }
.nav-dropdown-trigger.open svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .5rem;
  min-width: 460px;
  z-index: 300;
}
.nav-dropdown-menu.open { display: block; animation: ndmIn .15s ease; }

@keyframes ndmIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ndm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.ndm-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  transition: background .12s;
  color: var(--text-2);
}
.ndm-item:hover { background: var(--bg-muted); }
.ndm-item.active { background: var(--brand-light); }
.ndm-item.active .ndm-title { color: var(--brand); }

.ndm-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ndm-icon svg { color: var(--text-3); }
.ndm-item:hover .ndm-icon svg,
.ndm-item.active .ndm-icon svg { color: var(--brand); }

.ndm-content { display: flex; flex-direction: column; gap: 2px; }
.ndm-title { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.2; }
.ndm-desc  { font-size: 12px; color: var(--text-3); line-height: 1.4; }

/* Mobile drawer section label */
.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 14px 4px;
  margin-top: 2px;
}
.nav-mobile-drawer a.drawer-sub { padding-left: 24px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}
.theme-toggle:hover { background: var(--bg-muted); color: var(--text); }

.btn-nav-ghost {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.btn-nav-ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-muted);
  color: var(--text);
}
.btn-nav-primary {
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-nav-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow); }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 9px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--bg-muted); border-color: var(--border-strong); }
.nav-hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem;
  z-index: 199;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-md);
  animation: drawerIn 0.18s ease;
}
.nav-mobile-drawer.open { display: flex; }

@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-mobile-drawer a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.15s;
}
.nav-mobile-drawer a:hover { background: var(--bg-muted); color: var(--text); }
.nav-mobile-drawer a.active {
  color: var(--brand);
  background: var(--brand-light);
}
.drawer-divider { height: 1px; background: var(--border); margin: 6px 0; }
.drawer-actions {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}
.drawer-actions a {
  flex: 1;
  text-align: center;
  padding: 9px 14px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}
.drawer-actions .da-ghost {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2) !important;
}
.drawer-actions .da-ghost:hover { background: var(--bg-muted) !important; }
.drawer-actions .da-primary {
  background: var(--brand);
  color: #fff !important;
}
.drawer-actions .da-primary:hover { background: var(--brand-dark) !important; }

/* ── LAYOUT ──────────────────────────────────────────────── */
main { padding-top: 64px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }
.divider { height: 1px; background: var(--border); }
.section-header { max-width: 600px; }
.section-header.center { margin: 0 auto; text-align: center; }
.section-header p { font-size: 16px; color: var(--text-3); margin-top: 0.75rem; line-height: 1.65; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-outline:hover { background: var(--brand-light); }
.btn-white { background: #fff; color: var(--brand); font-weight: 700; }
.btn-white:hover { background: rgba(255,255,255,0.92); transform: translateY(-1px); }
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(220,38,38,0.25);
}
.btn-danger:hover { background: var(--red-bg); }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-blue   { background: var(--brand-light); color: var(--brand); border: 1px solid var(--brand-mid); }
.badge-green  { background: var(--green-bg);    color: var(--green); border: 1px solid #bbf7d0; }
.badge-amber  { background: var(--amber-bg);    color: var(--amber); border: 1px solid #fde68a; }
.badge-gray   { background: var(--bg-muted);    color: var(--text-3); border: 1px solid var(--border); }
.badge .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease infinite;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-lift:hover { transform: translateY(-3px); }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

/* Full footer (landing page) */
.footer-full { padding: 3.5rem 0 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.65;
  margin-top: 0.75rem;
  max-width: 220px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 13.5px; color: var(--text-3); transition: color 0.15s; }
.footer-col ul a:hover { color: var(--brand); }

/* Compact footer (inner pages) */
.footer-compact { padding: 1.5rem 0; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Footer bottom row */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: 13px; color: var(--text-4); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 13px; color: var(--text-4); transition: color 0.15s; }
.footer-links a:hover { color: var(--text-3); }

/* ── PAGE HERO ───────────────────────────────────────────── */
.page-hero {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 200px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 { margin-bottom: 0.6rem; position: relative; }
.page-hero p  { color: var(--text-3); font-size: 15px; max-width: 500px; position: relative; }

/* ── CTA BANNER ──────────────────────────────────────────── */
.cta-banner {
  background: var(--brand);
  border-radius: var(--radius-xl);
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 0;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -5%;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.cta-banner h2 { color: #fff; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.cta-banner p  { color: rgba(255,255,255,0.75); margin-bottom: 2rem; font-size: 16px; position: relative; z-index: 1; }
.cta-banner .cta-actions { position: relative; z-index: 1; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.fade-up { animation: fadeUp 0.55s ease forwards; }
.d1 { animation-delay: 0.05s; opacity: 0; }
.d2 { animation-delay: 0.12s; opacity: 0; }
.d3 { animation-delay: 0.20s; opacity: 0; }
.d4 { animation-delay: 0.28s; opacity: 0; }
.d5 { animation-delay: 0.36s; opacity: 0; }

/* ── SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.06s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.22s; }
.reveal-d4 { transition-delay: 0.30s; }

/* ── GRADIENT TEXT ──────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .btn-nav-ghost { display: none; }
  .btn-nav-primary { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 1.25rem; }
  .container { padding: 0 1.25rem; }
  .section { padding: 3.5rem 0; }
  .section-sm { padding: 2rem 0; }
  .page-hero { padding: 2.5rem 0 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .cta-banner { padding: 2.5rem 1.5rem; border-radius: var(--radius-lg); }
  .section-header p { font-size: 14.5px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-inner { padding: 0 1rem; }
  .container { padding: 0 1rem; }
  .btn-lg { padding: 11px 20px; font-size: 14px; }
}
