/* =========================================================
   Tech Problem Solved — Design System
   Deep slate + electric lime/cyan. Expressive typography.
   ========================================================= */

:root {
  --ink: #0b1220;
  --ink-2: #122038;
  --panel: #162033;
  --slate: #243049;
  --muted: #8b9bb3;
  --line: #2a3a55;
  --paper: #f4f7fb;
  --paper-2: #e8eef6;
  --white: #ffffff;
  --lime: #3dff9a;
  --lime-dim: #22c97a;
  --cyan: #00d4ff;
  --cyan-dim: #00a8cc;
  --warn: #ffb020;
  --danger: #ff5c7a;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 72px;
  --shadow: 0 12px 40px rgba(11, 18, 32, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-dim); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 0 0 .45em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin: 0 0 .55em; }
h3 { font-size: 1.2rem; margin: 0 0 .45em; letter-spacing: -0.02em; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin-bottom: .35em; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--ink {
  background: radial-gradient(1200px 500px at 10% -10%, rgba(61,255,154,.12), transparent 55%),
              radial-gradient(900px 400px at 90% 10%, rgba(0,212,255,.12), transparent 50%),
              var(--ink);
  color: #c9d4e5;
}
.section--ink h2, .section--ink h3 { color: var(--white); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section--ink .lead { color: #a8b7cc; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--lime); color: var(--ink); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), background .2s ease, box-shadow .2s ease;
  text-decoration: none; letter-spacing: -0.01em;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary {
  background: var(--lime); color: var(--ink);
  box-shadow: 0 10px 28px rgba(61, 255, 154, .28);
}
.btn--primary:hover { background: #62ffad; color: var(--ink); }
.btn--cyan {
  background: var(--cyan); color: var(--ink);
  box-shadow: 0 10px 28px rgba(0, 212, 255, .25);
}
.btn--ghost {
  background: transparent; color: var(--white);
  border-color: rgba(255,255,255,.35);
}
.btn--ghost:hover { background: rgba(255,255,255,.08); color: var(--white); }
.btn--outline {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn--outline:hover { border-color: var(--cyan-dim); color: var(--cyan-dim); }
.btn--sm { padding: 9px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 255, 154, 0.12);
}
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--white); font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: -0.03em; text-decoration: none;
}
.brand:hover { color: var(--white); text-decoration: none; }
.brand__logo { width: 36px; height: 36px; }
.brand__mark { color: var(--lime); }
.nav__links {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 6px;
}
.nav__links a {
  color: #c9d4e5; font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
}
.nav__links a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span {
  display: block; width: 22px; height: 2px; background: var(--white);
  margin: 5px 0; transition: transform .2s ease;
}
.nav-search {
  display: flex; align-items: center; gap: 8px;
}
.nav-search input {
  width: 180px; background: var(--panel); border: 1px solid var(--line);
  color: var(--white); border-radius: 8px; padding: 8px 12px; font: inherit;
}
.nav-search input::placeholder { color: var(--muted); }
.nav-search input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }

@media (max-width: 920px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: var(--ink-2); padding: 16px; gap: 4px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform .25s var(--ease), opacity .25s ease;
  }
  .nav__links.is-open {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .nav-search { width: 100%; }
  .nav-search input { width: 100%; flex: 1; }
}

/* Hero — brand first, one composition */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid; align-items: end;
  background: var(--ink);
  overflow: hidden;
  color: var(--white);
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(11,18,32,.82) 0%, rgba(11,18,32,.45) 45%, rgba(11,18,32,.7) 100%),
    url("../images/hero.svg") center / cover no-repeat;
  animation: heroPulse 12s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}
.hero__content {
  position: relative; z-index: 1;
  padding: 72px 0 88px;
  max-width: 720px;
}
.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: .95;
  margin: 0 0 18px;
}
.hero__brand span { color: var(--lime); }
.hero__headline {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 28ch;
}
.hero__support {
  color: #a8b7cc;
  font-size: 1.08rem;
  margin: 0 0 28px;
  max-width: 42ch;
}

/* Category tiles on home — after hero */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.cat-tile {
  display: block;
  padding: 22px 20px;
  background: var(--white);
  border: 1px solid var(--paper-2);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease;
}
.cat-tile:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
}
.cat-tile__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.cat-tile__meta { color: var(--muted); font-size: .92rem; margin: 0; }

/* Breadcrumbs */
.breadcrumbs {
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 20px;
  padding: 20px 0 0;
}
.breadcrumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/"; margin-left: 6px; color: var(--line);
}
.breadcrumbs a { color: var(--cyan-dim); }

/* Article */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding-bottom: 64px;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0 0 24px;
}
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: .78rem;
  padding: 6px 10px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2); font-weight: 600;
}
.chip--lime { background: rgba(61,255,154,.18); color: #0a7a4a; }
.chip--cyan { background: rgba(0,212,255,.15); color: #007a94; }

.prose h2 { margin-top: 1.6em; }
.prose .step {
  margin: 28px 0;
  padding: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.prose .step.is-visible { opacity: 1; transform: none; }
.step__head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 12px;
}
.step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--lime-dim);
  min-width: 2ch;
}
.step__title { margin: 0; font-size: 1.25rem; }
.step__figure {
  margin: 0 0 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
}
.step__figure img { width: 100%; }
.step__figure figcaption {
  font-size: .85rem; color: var(--muted);
  padding: 8px 12px; background: var(--paper-2); border-top: 1px solid var(--paper-2);
}

.sidebar-box {
  background: var(--white);
  border: 1px solid var(--paper-2);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.sidebar-box h3 { font-size: 1rem; margin-bottom: 10px; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list a {
  display: block; padding: 8px 0;
  border-bottom: 1px solid var(--paper-2);
  color: var(--ink); font-weight: 600; font-size: .95rem;
}
.related-list a:hover { color: var(--cyan-dim); text-decoration: none; }

/* Hub lists */
.hub-list { list-style: none; margin: 0; padding: 0; }
.hub-list li {
  border-bottom: 1px solid var(--paper-2);
  margin: 0;
}
.hub-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px 4px; color: var(--ink); font-weight: 600; text-decoration: none;
}
.hub-list a:hover { color: var(--cyan-dim); }
.hub-list__meta { color: var(--muted); font-weight: 500; font-size: .9rem; white-space: nowrap; }

.subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 24px 0 40px;
}
.subcat-link {
  display: block;
  padding: 16px 18px;
  background: var(--white);
  border-left: 3px solid var(--lime);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink); font-family: var(--font-display); font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.subcat-link:hover { background: var(--paper-2); text-decoration: none; border-color: var(--cyan); color: var(--ink); }
.subcat-link small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); margin-top: 4px; }

/* Ad slots */
.ad-slot {
  min-height: 90px;
  margin: 28px 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--muted); font-size: .85rem; background: rgba(255,255,255,.4);
}
.ad-slot--sidebar { min-height: 250px; }

/* Search */
.search-page input[type="search"] {
  width: 100%; max-width: 560px;
  font: inherit; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: 10px;
  background: var(--white);
}
.search-page input:focus { outline: 2px solid var(--cyan); border-color: var(--cyan); }
.search-results { margin-top: 28px; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #a8b7cc;
  padding: 56px 0 28px;
  border-top: 1px solid rgba(61,255,154,.15);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 36px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-footer h3 {
  color: var(--white); font-size: 1rem; margin-bottom: 12px;
}
.site-footer a { color: #a8b7cc; }
.site-footer a:hover { color: var(--lime); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand {
  font-family: var(--font-display); font-weight: 700;
  color: var(--white); font-size: 1.2rem; letter-spacing: -0.03em;
}
.footer-brand span { color: var(--lime); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}

/* Utility pages */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0 48px;
}
.page-hero .lead { color: #a8b7cc; }
.form-grid { display: grid; gap: 14px; max-width: 520px; }
.form-grid label { font-weight: 600; display: grid; gap: 6px; }
.form-grid input, .form-grid textarea, .form-grid select {
  font: inherit; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white);
}
.form-grid textarea { min-height: 140px; resize: vertical; }

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--paper-2);
  padding: 14px 0;
}
.faq summary {
  font-family: var(--font-display); font-weight: 700;
  cursor: pointer; letter-spacing: -0.02em;
}
.faq details p { margin: 10px 0 0; color: var(--slate); }

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero__bg { animation: none; }
}
