/* ══════════════════════════════════════════════════════
   IN-SIGHT — Tech subpage styles  (tech.css)
   ══════════════════════════════════════════════════════ */

/* ── Back breadcrumb ──────────────────────────────────── */
.tech-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 32px;
  transition: color .15s;
}
.tech-back:hover { color: var(--accent); }

/* ── Category tag ─────────────────────────────────────── */
.tech-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lo);
  border: 1px solid var(--border-a);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 20px;
}

/* ── Tech hero ────────────────────────────────────────── */
.tech-hero {
  padding: calc(var(--nav-h) + 72px) 0 72px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.tech-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(0,180,255,.06) 0%, transparent 70%);
  pointer-events: none;
}
.tech-title {
  font-size: clamp(32px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: clamp(-1.5px, -0.03em, -2.5px);
  margin-bottom: 20px;
}
.tech-lead {
  font-size: clamp(15px, 1.7vw, 19px);
  color: var(--txt-2);
  line-height: 1.72;
  max-width: 580px;
}

/* ── Body layout ─────────────────────────────────────── */
.tech-body { padding: 72px 0 120px; }

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}

/* ── Main content articles ───────────────────────────── */
.tech-article {
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 44px;
}
.tech-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.tech-article h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.4px;
  margin-bottom: 14px;
  color: var(--txt);
}
.tech-article p {
  font-size: 15px;
  color: var(--txt-2);
  line-height: 1.82;
  margin-bottom: 14px;
}
.tech-article p:last-child { margin-bottom: 0; }
.tech-article ul,
.tech-article ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.tech-article li {
  font-size: 15px;
  color: var(--txt-2);
  line-height: 1.78;
  margin-bottom: 8px;
}
.tech-article li strong { color: var(--txt); font-weight: 500; }
.tech-article h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
  margin: 20px 0 8px;
  letter-spacing: -.2px;
}

/* ── Code / monospace block ──────────────────────────── */
.tech-code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(0,180,255,.035);
  border: 1px solid var(--border-a);
  border-radius: var(--r-sm);
  padding: 18px 22px;
  overflow-x: auto;
  margin: 18px 0;
  line-height: 1.8;
  color: var(--accent);
  white-space: pre;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.tech-code::-webkit-scrollbar { height: 4px; }
.tech-code::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Flow steps ──────────────────────────────────────── */
.flow-steps { list-style: none; padding: 0; counter-reset: flow; margin: 20px 0; }
.flow-steps li {
  counter-increment: flow;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--txt-2);
  line-height: 1.72;
}
.flow-steps li::before {
  content: counter(flow, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-lo);
  border: 1px solid var(--border-a);
  border-radius: 6px;
  padding: 3px 9px;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 1px;
}
.flow-steps li strong { color: var(--txt); font-weight: 500; }

/* ── Sidebar ─────────────────────────────────────────── */
.tech-sidebar { position: sticky; top: calc(var(--nav-h) + 28px); }

.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 16px;
}
.spec-card:last-child { margin-bottom: 0; }

.spec-card-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.spec-list { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: none; padding-bottom: 0; }
.spec-row:first-child { padding-top: 0; }
.spec-key {
  font-size: 10px;
  font-weight: 500;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.spec-val {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--txt);
  line-height: 1.5;
}

/* ── Related tech pills in sidebar ──────────────────────*/
.related-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.related-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  background: transparent;
  transition: color .15s, border-color .15s, background .15s;
  text-decoration: none;
  cursor: pointer;
}
.related-pill:hover {
  color: var(--accent);
  border-color: var(--border-a);
  background: var(--accent-lo);
}

/* ── Highlight box ──────────────────────────────────────*/
.tech-highlight {
  background: rgba(0,180,255,.05);
  border: 1px solid var(--border-a);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--txt-2);
  line-height: 1.72;
}
.tech-highlight strong { color: var(--txt); font-weight: 500; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 920px) {
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .tech-sidebar { position: static; }
}
@media (max-width: 520px) {
  .tech-hero { padding-top: calc(var(--nav-h) + 52px); }
  .tech-body  { padding: 52px 0 80px; }
}

/* ── Light mode overrides ─────────────────────────────── */
[data-theme="light"] .tech-hero::before {
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(0,122,204,.07) 0%, transparent 70%);
}
[data-theme="light"] .tech-code {
  background: rgba(0,122,204,.04);
  border-color: rgba(0,122,204,.18);
  color: #007acc;
}
[data-theme="light"] .tech-highlight {
  background: rgba(0,122,204,.05);
  border-color: rgba(0,122,204,.22);
  border-left-color: #007acc;
}
[data-theme="light"] .spec-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
[data-theme="light"] .flow-steps li::before {
  background: rgba(0,122,204,.07);
  border-color: rgba(0,122,204,.2);
}
