/* /tech — engineering overview for candidates. Builds on styles.css tokens. */

.tech-page {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.tech-page code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.tech-hero {
  padding: 2.5rem 0 1.5rem;
}

.tech-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.tech-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tech-lede {
  max-width: 44rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.tech-stats {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem;
}

.tech-stats li {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
}

.tech-stats strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  background: linear-gradient(90deg, var(--accent), var(--accent-photo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tech-stats span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tech-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-toc a {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s, border-color 0.15s;
}

.tech-toc a:hover,
.tech-toc a:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

.tech-section {
  padding: 2.5rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

.tech-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
}

.tech-section > p {
  max-width: 48rem;
  color: var(--text-muted);
}

.tech-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(91, 141, 239, 0.08);
  border-radius: 0 10px 10px 0;
}

/* Cards */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.tech-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elevated);
}

.tech-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.tech-card p,
.tech-card ul {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tech-card ul {
  padding-left: 1.1rem;
}

.tech-card li + li {
  margin-top: 0.3rem;
}

.tech-flow {
  margin-top: 0.6rem !important;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem !important;
  color: var(--accent-swap) !important;
}

/* Diagram */
.tech-diagram {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 26, 34, 0.9), rgba(12, 15, 20, 0.9));
  box-shadow: var(--shadow);
}

.tier {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.6rem;
}

.tier-label {
  flex: 0 0 100%;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tier-arrow {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.5rem 0;
}

.node {
  flex: 1 1 9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--node-color, var(--border));
  background: color-mix(in srgb, var(--node-color, #fff) 10%, transparent);
  font-weight: 600;
  font-size: 0.92rem;
}

.node small {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.node--mobile { --node-color: var(--accent-vocab); }
.node--web { --node-color: var(--accent-otg); }
.node--edge { --node-color: var(--accent); }
.node--server { --node-color: var(--accent-workout); }
.node--data { --node-color: var(--accent-swap); }
.node--ai { --node-color: var(--accent-photo); }

/* Table */
.tech-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tech-table th,
.tech-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.tech-table th {
  background: var(--bg-elevated);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tech-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

.tech-table td:not(:first-child) {
  color: var(--text-muted);
}

.tech-table tr:last-child td {
  border-bottom: none;
}

/* Agent org */
.tech-org {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.6rem;
}

.tech-org li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
}

.tech-org li:nth-child(2) { margin-left: 1.25rem; }
.tech-org li:nth-child(3) { margin-left: 2.5rem; }
.tech-org li:nth-child(4) { margin-left: 3.75rem; }

.tech-org p {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.org-level {
  flex: 0 0 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-photo));
  font-weight: 700;
  font-size: 0.9rem;
}

/* Steps */
.tech-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.tech-steps li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tech-steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(91, 141, 239, 0.2);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.tech-steps strong {
  color: var(--text);
}

/* Principles + CTA */
.tech-principles {
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.tech-principles li + li {
  margin-top: 0.45rem;
}

.tech-principles strong {
  color: var(--text);
}

.tech-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, rgba(91, 141, 239, 0.18), transparent),
    var(--bg-elevated);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.tech-cta p {
  margin: 0;
  flex: 1 1 14rem;
  font-weight: 600;
  font-size: 1.15rem;
}

.tech-cta-btn {
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.tech-cta-btn:hover {
  filter: brightness(1.1);
}

@media (max-width: 600px) {
  .tech-org li:nth-child(n) { margin-left: 0; }
  .tech-table td:first-child { white-space: normal; }
}
