/* SetPointCyber -- design system
   Palette: near-black background, teal/cyan-green primary accent with a
   blue secondary -- terminal/circuit-board feel rather than industrial
   amber. Two accents used together in gradients and glows, not one flat
   color. */

:root {
  --bg: #060a09;
  --bg-raised: #0d1413;
  --bg-raised-2: #101a19;
  --border: #1c2b29;
  --text: #e6f2ef;
  --text-dim: #93a8a4;
  --text-faint: #566b67;
  --accent: #2de0b0;
  --accent-2: #3ba3f0;
  --accent-dim: #1a7a5c;
  --accent-glow: rgba(45, 224, 176, 0.14);
  --accent-2-glow: rgba(59, 163, 240, 0.14);
  --gradient: linear-gradient(120deg, var(--accent), var(--accent-2));
  --danger: #e0625a;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w: 1080px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Faint circuit-grid backdrop across the whole page -- kept low-opacity so
   it reads as texture, not decoration competing with content. Note:
   background-color (not the `background` shorthand) so it doesn't wipe out
   the grid image below it. */
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

p { color: var(--text-dim); margin: 0 0 1em; }

.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 6px 1px var(--accent-glow); opacity: 1; }
  50% { box-shadow: 0 0 12px 4px var(--accent-2-glow); opacity: 0.75; }
}

/* --- Nav --- */

header.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 10, 9, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.brand:hover { text-decoration: none; }
.brand .accent { color: var(--accent); }

nav.links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
}

nav.links a {
  color: var(--text-dim);
}
nav.links a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* --- Hero --- */

.hero {
  padding: 120px 0 90px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 800px 460px at 12% -10%, var(--accent-glow), transparent 60%),
    radial-gradient(ellipse 700px 420px at 90% 10%, var(--accent-2-glow), transparent 55%);
}

.hero-title span { color: var(--accent); }

.hero-sub {
  font-size: 1.15rem;
  max-width: 620px;
  margin-bottom: 2em;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--gradient);
  color: #04140f;
  border-color: transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px 2px var(--accent-2-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-ghost:hover {
  border-color: var(--accent-dim);
  background: var(--bg-raised);
  box-shadow: 0 0 16px 0 var(--accent-glow);
}

/* --- Sections --- */

section { padding: 90px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

.section-head { max-width: 640px; margin-bottom: 48px; }

/* --- Bio --- */

.bio-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.bio-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bio-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

.bio-certs {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 16px;
  width: 200px;
}

.bio-certs h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.bio-certs ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bio-certs li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
  cursor: default;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.bio-certs li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-dim);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.bio-certs li:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow), 0 0 18px var(--accent-2-glow);
}
.bio-certs li:hover::before {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.bio-certs a {
  font-family: var(--mono);
  font-size: 0.7rem;
}

.bio-copy p { color: var(--text); }

.bio-highlights {
  list-style: none;
  margin: 1.6em 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bio-highlights li {
  padding-left: 20px;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.bio-highlights li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.bio-highlights strong { color: var(--text); }
.bio-copy p:last-child { margin-bottom: 0; }

/* --- Skills (matrix-rain backdrop) --- */

#skills {
  position: relative;
  overflow: hidden;
}

#skills > .wrap {
  position: relative;
  z-index: 1;
}

.matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-card {
  background: var(--bg-raised);
  padding: 26px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.skill-card-wide { grid-column: span 2; }
.skill-card:hover {
  background: var(--bg-raised-2);
  box-shadow: inset 0 1px 0 0 var(--accent-dim);
}

.skill-card h3 {
  color: var(--text);
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.95rem;
}

.skill-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-card li {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding-left: 16px;
  position: relative;
}

.skill-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-dim);
}

.skill-card li strong { color: var(--text); }

/* --- Case study teaser --- */

.case-teaser {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--bg-raised), var(--bg-raised-2));
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  overflow: hidden;
}
.case-teaser::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
}

.case-teaser h3 { font-size: 1.6rem; color: var(--text); }

.case-stats {
  display: flex;
  gap: 32px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.case-stat .num {
  font-family: var(--mono);
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 600;
  display: block;
}
.case-stat .label {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Featured Build section: a live force-directed graph of real behavior
   names/risk tiers (js/main.js) instead of a static screenshot -- faded
   top/bottom so the heading and section edges stay clean, more visible in
   the middle band behind the card gaps. */
#foundry {
  position: relative;
  overflow: hidden;
}
.behavior-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#foundry::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg) 100%);
  z-index: 0;
  pointer-events: none;
}
#foundry > .wrap {
  position: relative;
  z-index: 1;
}

.foundry-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
}

.foundry-feature {
  background: var(--bg-raised);
  padding: 32px;
  transition: background 0.2s ease;
}
.foundry-feature:hover { background: var(--bg-raised-2); }
.foundry-feature h3 { color: var(--text); font-size: 1.15rem; }
.foundry-feature p { font-size: 0.92rem; margin-bottom: 0; }

@media (max-width: 780px) {
  .foundry-features { grid-template-columns: 1fr; }
}

/* --- Contact --- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input, .field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.field textarea { resize: vertical; min-height: 120px; }

.contact-links { display: flex; flex-direction: column; gap: 18px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
}
.contact-link { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.contact-link:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 16px 0 var(--accent-glow);
  text-decoration: none;
}

.contact-link .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
}

#form-status {
  font-family: var(--mono);
  font-size: 0.85rem;
  min-height: 1.2em;
}
#form-status.ok { color: var(--accent); }
#form-status.err { color: var(--danger); }

/* --- Footer --- */

footer {
  padding: 32px 0;
  color: var(--text-faint);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Case study page specific --- */

.case-hero {
  padding: 70px 0 50px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  display: inline-block;
  margin-bottom: 28px;
}

.case-body { padding: 60px 0; }

.case-body h2 {
  margin-top: 2.4em;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
}
.case-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.case-body p, .case-body li { color: var(--text-dim); }
.case-body strong { color: var(--text); }

.case-body ul { padding-left: 1.2em; }
.case-body li { margin-bottom: 0.5em; }

.pull-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0;
}
.pull-stats div { background: var(--bg-raised); padding: 20px; }
.pull-stats .num { font-family: var(--mono); font-size: 1.5rem; color: var(--accent); display: block; }
.pull-stats .label { font-size: 0.78rem; color: var(--text-faint); }

pre.code-block {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* --- Placeholder marker: anything needing real content from Glen before
   launch. Loud on purpose so it can't get missed/shipped by accident. --- */
.placeholder {
  background: rgba(217, 99, 78, 0.1);
  border: 1px dashed var(--danger);
  border-radius: var(--radius);
  padding: 2px 8px;
  color: #e8a396;
  font-style: normal;
}

/* --- Responsive --- */

@media (max-width: 780px) {
  nav.links { display: none; }
  .nav-toggle { display: block; }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-side { flex-direction: row; align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .bio-photo { width: 120px; height: 120px; }
  .bio-certs { width: auto; flex: 1; min-width: 200px; }
  .case-teaser { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
