/* ── Variables ─────────────────────────────────────────────────────── */
:root {
  --bg:          #060b14;
  --bg-soft:     #0c1625;
  --card-bg:     #0d1a2d;
  --text:        #edf5ff;
  --muted:       #7a9bbf;
  --accent:      #00b7ff;
  --accent-soft: #47d0ff;
  --bg-rgb:      6, 11, 20;
  --accent-rgb:  0, 183, 255;
  --accent-soft-rgb: 71, 208, 255;
  --border:      rgba(71, 208, 255, 0.28);
  --border-hot:  rgba(71, 208, 255, 0.70);
  --shadow:      rgba(0, 183, 255, 0.22);
  --panel-gradient: linear-gradient(160deg, rgba(13, 26, 45, 0.95), rgba(6, 11, 20, 0.97));
  --panel-shadow: 0 0 40px rgba(0, 183, 255, 0.06), inset 0 0 32px rgba(1, 3, 8, 0.6);
  --panel-shadow-hover: 0 0 28px rgba(0, 183, 255, 0.12), inset 0 0 32px rgba(1, 3, 8, 0.6);
  --space-xs:    0.5rem;
  --space-sm:    0.75rem;
  --space-md:    1rem;
  --space-lg:    1.2rem;
  --space-card-y: 1rem;
  --card-radius: 12px;
  --card-padding-y: 1rem;
  --card-padding-x: 1rem;
  --corner-size: 22px;
  --divider-node-size: 6px;
  --hero-padding-top: clamp(2.4rem, 5vw, 4.25rem);
  --hero-padding-bottom: clamp(2.7rem, 5vw, 4.2rem);
  --transition:  0.28s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Canvas background ─────────────────────────────────────────────── */
#km-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
  pointer-events: none;
}

/* ── Base ──────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
}

/* ── Header ────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 5%;
  background: rgba(3, 8, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  color: var(--accent-soft);
  font-weight: bold;
  text-decoration: none;
}

.nav { display: flex; flex-wrap: wrap; gap: 1rem; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: color var(--transition), text-shadow var(--transition);
}

.nav a:hover {
  color: var(--accent-soft);
  text-shadow: 0 0 10px var(--shadow);
}

/* ── Section wrapper ───────────────────────────────────────────────── */
.section {
  padding: clamp(3.5rem, 6vw, 5.5rem) 5%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Section divider ───────────────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-soft-rgb), 0.32), transparent);
}

.section-divider-node {
  width: var(--divider-node-size);
  height: var(--divider-node-size);
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0.5;
  box-shadow: 0 0 var(--divider-node-size) rgba(var(--accent-soft-rgb), 0.5);
  flex-shrink: 0;
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: var(--hero-padding-top);
  padding-bottom: var(--hero-padding-bottom);
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  inset: -12% auto auto 8%;
  width: min(760px, 85vw);
  height: 460px;
  background: radial-gradient(ellipse at center,
    rgba(0, 183, 255, 0.16) 0%,
    rgba(0, 183, 255, 0.05) 42%,
    transparent 74%);
  pointer-events: none;
  z-index: 0;
}

.hero-circuit-mask {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(6, 11, 20, 0.97) 0%,
      rgba(6, 11, 20, 0.9) 34%,
      rgba(6, 11, 20, 0.54) 66%,
      rgba(6, 11, 20, 0.2) 100%),
    linear-gradient(180deg, rgba(71, 208, 255, 0.06), transparent 58%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

.hero-copy {
  max-width: 860px;
}

.hero-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.hero-avatar-wrap {
  flex: 0 0 auto;
  margin: 0;
}

.hero-avatar {
  width: clamp(158px, 20vw, 240px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid rgba(var(--accent-soft-rgb), 0.65);
  background: linear-gradient(145deg, rgba(8, 18, 31, 0.98), rgba(4, 9, 19, 0.88));
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.16),
    0 0 22px rgba(var(--accent-rgb), 0.34),
    0 0 48px rgba(var(--accent-rgb), 0.12),
    0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Corner bracket decoration */
.hero-frame {
  position: absolute;
  inset: 0.75rem;
  pointer-events: none;
  z-index: 0;
}

.hero-frame-corner {
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  border-style: solid;
  border-color: rgba(var(--accent-soft-rgb), 0.35);
}

.hero-frame-corner--top-left { top: 0; left: 0;  border-width: 1px 0 0 1px; }
.hero-frame-corner--top-right { top: 0; right: 0; border-width: 1px 1px 0 0; }
.hero-frame-corner--bottom-left { bottom: 0; left: 0;  border-width: 0 0 1px 1px; }
.hero-frame-corner--bottom-right { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.eyebrow {
  position: relative;
  z-index: 1;
  color: var(--accent-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 0.9rem;
  opacity: 0.85;
}

h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  line-height: 1.1;
  color: var(--text);
  font-weight: bold;
}

.accent-name {
  color: var(--accent-soft);
  text-shadow: 0 0 32px rgba(71, 208, 255, 0.38);
}

.hero-title {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.55rem;
  font-weight: normal;
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  margin-top: 0.9rem;
  color: rgba(237, 245, 255, 0.84);
  max-width: 760px;
  font-size: 0.9rem;
  line-height: 1.75;
}

.pill-grid span {
  border: 1px solid rgba(71, 208, 255, 0.32);
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  color: var(--accent-soft);
  background: rgba(0, 183, 255, 0.08);
  font-size: 0.79rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.pill-grid span:hover {
  background: rgba(0, 183, 255, 0.14);
  border-color: rgba(71, 208, 255, 0.55);
  box-shadow: 0 0 16px rgba(0, 183, 255, 0.14);
}

.hero-focus {
  margin-top: 0.95rem;
  max-width: 760px;
}

.hero-badges {
  margin-top: 1rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  margin-top: 1.7rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── CTA buttons ───────────────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  color: var(--bg);
  background: var(--accent);
  font-family: inherit;
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.72rem 1.3rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--shadow);
}

.cta-outline {
  color: var(--accent-soft);
  background: transparent;
}

.cta-outline:hover {
  background: rgba(71, 208, 255, 0.08);
}

/* ── Section headings ──────────────────────────────────────────────── */
h2 {
  color: var(--accent-soft);
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.6rem;
  max-width: 850px;
  font-size: 0.94rem;
}

/* ── Repo panel ────────────────────────────────────────────────────── */
.detail-panel {
  margin-top: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-gradient);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.detail-panel:hover {
  border-color: rgba(var(--accent-soft-rgb), 0.45);
  box-shadow: var(--panel-shadow-hover);
}

.pcb-divider .section-divider-line {
  background:
    linear-gradient(90deg, transparent, rgba(var(--accent-soft-rgb), 0.48), transparent),
    repeating-linear-gradient(90deg, transparent 0 56px, rgba(var(--accent-soft-rgb), 0.15) 56px 58px);
}

/* ── Contact panel / scanline ──────────────────────────────────────── */
.contact-panel {
  position: relative;
  overflow: hidden;
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(71, 208, 255, 0.55) 50%, transparent 100%);
  animation: scanmove 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes scanmove {
  0%   { top: 0%;   opacity: 0; }
  4%   { opacity: 1; }
  96%  { opacity: 0.25; }
  100% { top: 100%; opacity: 0; }
}

/* ── Panel header ──────────────────────────────────────────────────── */
.detail-panel-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem var(--space-lg);
  background: rgba(var(--accent-soft-rgb), 0.06);
  border-bottom: 1px solid var(--border);
}

.detail-panel-header-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: #001522;
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
}

/* Pulse dot inside ACTIVE badge */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #001e30;
  position: relative;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(0, 22, 38, 0.5);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.info-chip {
  font-size: 0.68rem;
  color: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.13rem 0.42rem;
  letter-spacing: 0.04em;
}

/* ── Panel body ────────────────────────────────────────────────────── */
.detail-panel-body {
  display: block;
}

.detail-panel-content { padding: 1.3rem var(--space-lg); }

.contact-title {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  margin-bottom: 0.3rem;
}

.contact-actions {
  margin-top: 0.6rem;
}

.detail-panel-aside {
  border-left: 1px solid rgba(var(--accent-soft-rgb), 0.16);
  padding: 1.2rem;
  display: grid;
  place-items: center;
}

/* ── Contact card content ──────────────────────────────────────────── */
.profile-name {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  margin-bottom: 0.2rem;
  font-weight: bold;
  color: var(--accent-soft);
  text-shadow: 0 0 12px rgba(var(--accent-soft-rgb), 0.25);
}

.profile-role {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.9rem;
}

.section-copy {
  color: var(--text);
  opacity: 0.9;
  line-height: 1.7;
}

.section-copy + .section-copy { margin-top: var(--space-md); }

.contact-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.contact-list li { display: grid; gap: 0.15rem; }

.contact-list span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-list a {
  color: var(--accent-soft);
  word-break: break-word;
  text-decoration: none;
  transition: opacity var(--transition);
}

.contact-list a:hover { opacity: 0.75; }

/* ── Metrics grid ──────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.95rem;
  margin-top: 1.4rem;
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--panel-gradient);
  padding: var(--card-padding-y) var(--card-padding-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.capability-card {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--panel-gradient);
  padding: var(--card-padding-y) var(--card-padding-x);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.metric-card:hover,
.capability-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hot);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.22);
}

.metric-card p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

.metric-title {
  color: var(--accent-soft);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: bold;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
  animation: none;
}

.metric-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

/* ── Specialization card grid ──────────────────────────────────────── */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: 1.2rem;
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: 1.2rem;
}

.card-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  color: var(--accent-soft);
  margin-bottom: 0.55rem;
  opacity: 0.82;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.capability-card h3 {
  color: var(--accent-soft);
  margin-bottom: 0.45rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.capability-card p {
  color: var(--text);
  opacity: 0.88;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

.industries-grid {
  margin-top: 1rem;
  margin-bottom: 1.2rem;
}

.emergency-panel {
  border-color: rgba(var(--accent-soft-rgb), 0.5);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.2),
    0 0 34px rgba(var(--accent-rgb), 0.18),
    inset 0 0 32px rgba(1, 3, 8, 0.56);
}

.assignment-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assignment-list li {
  color: var(--text);
  opacity: 0.9;
  line-height: 1.5;
}

.profile-chip-grid {
  margin-top: 1.1rem;
}

/* ── Single column panel content ───────────────────────────────────── */
.single-column { max-width: 960px; }

/* ── Trait chip grid ───────────────────────────────────────────────── */
.pill-grid {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-grid--no-margin {
  margin-top: 0;
}

/* ── Footer ────────────────────────────────────────────────────────── */
footer {
  padding: 2.5rem 5%;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

.footer-version {
  margin-top: 0.4rem;
  font-size: 0.70rem;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: 0.08em;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strengths-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .assignment-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: clamp(2.1rem, 8vw, 3rem) 5%;
  }

  .header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .hero {
    padding-top: 1.35rem;
    padding-bottom: 2rem;
  }

  .hero-circuit-mask {
    background: linear-gradient(180deg,
      rgba(6, 11, 20, 0.96) 0%,
      rgba(6, 11, 20, 0.82) 54%,
      rgba(6, 11, 20, 0.58) 100%);
  }

  .pill-grid span {
    font-size: 0.75rem;
  }

  .hero-heading {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-copy h1,
  .hero-copy .hero-title,
  .hero-copy .hero-subtitle,
  .hero-copy .hero-focus {
    text-align: center;
  }

  .eyebrow {
    text-align: center;
  }

  .nav {
    gap: 0.5rem;
    justify-content: flex-end;
  }

  .nav a {
    font-size: 0.8rem;
  }

  .capability-grid,
  .strengths-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .card-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
  }

  .capability-card p,
  .metric-card p,
  .section-copy {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .cta {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-frame-corner {
    display: none;
  }
}
