/* 343-guilty-spark.io : single stylesheet, no third-party assets */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070b14;
  --bg-alt: #0a101d;
  --surface: #0e1627;
  --surface-2: #121c31;
  --line: #1c2944;
  --line-hi: #2b4470;
  --text: #e8eef7;
  --text-2: #a9b6cb;
  --muted: #7f8faa;
  --cyan: #3fd0ff;
  --cyan-dim: #1a8fbd;
  --amber: #ffb02e;
  --radius: 14px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint engineering grid behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(63, 208, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 208, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: .86em;
  padding: .12em .4em;
  border-radius: 5px;
  background: rgba(63, 208, 255, .09);
  color: #bfeeff;
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 15px; height: 15px; flex: none; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--cyan);
  color: #04121b;
  font-weight: 600;
  transition: top .15s;
}
.skip:focus { top: 12px; }

/* ---------- header ----------
   Opaque by default so it stays readable without JavaScript. The script adds
   "js-top" and only then is the header allowed to be transparent at the top. */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, .8);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: background-color .25s, border-color .25s;
}
.js-top .top:not(.is-stuck) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.top-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand-mark {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #f4fdff 0 22%, var(--cyan) 30% 48%, transparent 52%);
  box-shadow: 0 0 0 1.5px rgba(63, 208, 255, .55);
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .15s, background-color .15s, border-color .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-primary {
  background: var(--cyan);
  color: #04121b;
  box-shadow: 0 0 0 1px rgba(63, 208, 255, .4), 0 8px 28px -10px rgba(63, 208, 255, .6);
}
.btn-primary:hover { background: #6bdcff; }
.btn-ghost {
  border-color: var(--line-hi);
  background: rgba(255, 255, 255, .025);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan-dim); background: rgba(63, 208, 255, .07); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 48px;
}
.hero::before {
  content: "";
  position: absolute;
  right: 0;
  top: -180px;
  width: min(760px, 100%);
  height: 760px;
  background: radial-gradient(circle at 70% 50%, rgba(63, 208, 255, .12), transparent 62%);
  pointer-events: none;
}
.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: 48px;
}
.eyebrow {
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--cyan);
}
h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hl {
  background: linear-gradient(100deg, var(--cyan) 10%, #9be8ff 55%, var(--amber) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h-line { display: block; }
.amp {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -.06em;
  color: var(--cyan);
}
.tagline {
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--text-2);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.cta-center { justify-content: center; }

.hero-art {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  aspect-ratio: 1;
}
.orb { width: 100%; height: 100%; display: block; }
.ring { transform-box: view-box; transform-origin: 200px 200px; }
.ring circle { stroke: var(--cyan); opacity: .55; }
.ring-a { animation: spin 90s linear infinite; }
.ring-b { animation: spin 38s linear infinite reverse; }
.ring-b circle { opacity: .8; }
.ring-c { animation: spin 26s linear infinite; }
.ring-d { animation: spin 16s linear infinite reverse; }
.ring .sat { fill: var(--cyan); stroke: none; opacity: 1; }
.ring .sat-amber { fill: var(--amber); }

/* ---------- sections ---------- */

.sec { padding: 88px 0; position: relative; }
.sec-alt {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg) 85%);
  border-top: 1px solid var(--line);
}
.sec-head { max-width: 780px; margin-bottom: 36px; }
.kicker {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
}
h2 {
  font-size: clamp(1.8rem, 3.3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.sec-lede {
  margin-top: 18px;
  font-size: 1.06rem;
  color: var(--text-2);
  max-width: 68ch;
}
.sec-lede a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(63, 208, 255, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.sec-lede a:hover { text-decoration-color: var(--cyan); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  padding: 3px 10px;
  border: 1px solid rgba(74, 222, 128, .35);
  border-radius: 999px;
  color: #4ade80;
  letter-spacing: .06em;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}
.kicker { line-height: 2.2; }

/* ---------- lab projects ---------- */

.proj-head { margin-bottom: 28px; }
.proj-next { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--line); max-width: none; }
.proj-next .sec-lede { max-width: 68ch; }
.proj-label {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 2.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
}
.proj-name { font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.proj-head .sec-lede { margin-top: 12px; }

/* ---------- experience ---------- */

.xp { display: grid; }
.xp > li {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 12px 40px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.xp-head h3 { font-size: 1.08rem; }
.xp-head p { margin-top: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.xp ul { display: grid; gap: 8px; }
.xp ul li {
  position: relative;
  padding-left: 18px;
  color: var(--text-2);
  font-size: .98rem;
  line-height: 1.55;
}
.xp ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}
.certs {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- diagram ---------- */

.diagram {
  margin-bottom: 26px;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 120% at 50% 0%, rgba(63, 208, 255, .06), transparent 70%),
    var(--surface);
}
.diagram svg { display: block; width: 100%; height: auto; }
.dg-box { fill: #0a1120; stroke: var(--line-hi); stroke-width: 1.2; }
.dg-box-hi { stroke: var(--cyan); fill: rgba(63, 208, 255, .07); }
.dg-box-amber { stroke: rgba(255, 176, 46, .6); fill: rgba(255, 176, 46, .05); }
.dg-label { fill: var(--text); font-family: var(--sans); font-size: 16px; font-weight: 600; }
.dg-sub { fill: var(--text-2); font-family: var(--sans); font-size: 12.5px; }
.dg-note { fill: var(--muted); font-family: var(--mono); font-size: 12px; }
.dg-mono { font-family: var(--mono); }
.dg-label.dg-mono { font-size: 15px; fill: var(--amber); }
.dg-sub.dg-mono { fill: var(--cyan); font-size: 12.5px; }
.dg-line { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-dasharray: 5 6; }
.dg-line-amber { stroke: var(--amber); opacity: .85; }
.dg-head { stroke: var(--cyan); }
.dg-head-amber { stroke: var(--amber); }

/* ---------- cards ---------- */

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 42%);
  transition: border-color .25s, transform .25s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 24px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 208, 255, .7), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.card:hover { border-color: var(--line-hi); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }

.role {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(63, 208, 255, .1);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.role-amber { background: rgba(255, 176, 46, .1); color: var(--amber); }

h3 { font-size: 1.2rem; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
.repo { font-family: var(--mono); font-size: 1.16rem; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
.repo a { display: inline-block; padding: 6px 0; margin: -6px 0; }
.repo a { transition: color .15s; }
.repo a:hover { color: var(--cyan); }
/* the title link covers the whole card */
.repo a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.repo .ico { margin-left: 9px; color: var(--muted); transition: transform .15s, color .15s; }
.card:hover .repo .ico { color: var(--cyan); transform: translate(2px, -2px); }
.repo-plain { font-family: var(--sans); font-size: 1.3rem; letter-spacing: -.02em; }
.card p:not(.role) { margin-top: 12px; color: var(--text-2); font-size: 1.02rem; line-height: 1.6; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  position: relative;
  z-index: 1;
  padding: 10px 0;
  margin: 12px 0 -10px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--cyan);
}
.more .ico { transition: transform .15s; }
.more:hover .ico { transform: translate(2px, -2px); }

/* ---------- pull requests ---------- */

.prlist { display: grid; gap: 12px; }
.prlist li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s;
}
.prlist li:hover { border-color: var(--line-hi); }
.pr-title { flex: 1; font-size: 1.08rem; font-weight: 600; transition: color .15s; }
.pr-title:hover { color: var(--cyan); }
.pr-ver { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.badge {
  flex: none;
  font-family: var(--mono);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.badge .ico { width: 13px; height: 13px; }
.badge-merged { background: rgba(163, 113, 247, .16); color: #c4a5ff; }
/* ---------- contact / footer / 404 ---------- */

.contact { text-align: center; padding-bottom: 104px; }
.contact-in { position: relative; }
.contact .sec-lede { margin-left: auto; margin-right: auto; max-width: 52ch; }

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
}
.notfound .sec-lede { margin-left: auto; margin-right: auto; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--muted);
}
.foot-note { font-family: var(--mono); font-size: 12px; }

/* ---------- motion ---------- */

@keyframes spin { to { transform: rotate(360deg); } }

/* scroll reveal: content is hidden only once the script has confirmed it can show it again */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .grid .reveal:nth-child(2) { transition-delay: .08s; }
.js .grid .reveal:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (min-width: 641px) and (max-width: 1040px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 124px; }
  .hero { padding: 28px 0 28px; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .top-in { flex-wrap: wrap; height: auto; padding-top: 8px; gap: 0 16px; justify-content: space-between; }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 -10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 12px 10px; }
  .btn-sm { padding: 11px 15px; }
  .sec { padding: 64px 0; }
  .diagram { overflow-x: auto; padding: 18px 14px; }
  .diagram svg { width: 760px; max-width: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .xp > li { grid-template-columns: 1fr; }
  .status { margin-left: 0; }
  .prlist li { flex-wrap: wrap; gap: 10px 14px; padding: 16px 18px; }
  .pr-title { flex-basis: 100%; order: 3; }
  .card:hover { transform: none; }
  .eyebrow { font-size: 12.5px; letter-spacing: .02em; }
  .card { padding: 24px 20px; }
  .foot-in { flex-direction: column; }
}

/* ---------- print ---------- */

@media print {
  :root {
    --bg: #fff; --bg-alt: #fff; --surface: #fff; --surface-2: #fff;
    --line: #c9d1dc; --line-hi: #9aa7b8;
    --text: #0b1220; --text-2: #2c3a4f; --muted: #4a5870;
    --cyan: #00618a; --amber: #8a5300;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  body::before, .hero::before, .hero-art, .skip, .nav, .top .btn { display: none; }
  .top { position: static; background: none; border: 0; }
  .hero-in { grid-template-columns: 1fr; }
  .hl { background: none; color: var(--cyan); }
  .sec-alt, .card, .diagram, .prlist li { background: #fff; }
  code { background: none; color: inherit; }
  .dg-box { fill: #fff; }
  .diagram { overflow: visible; }
  .diagram svg { width: 100%; max-width: 100%; }
  .btn-primary { background: none; color: var(--text); border-color: var(--line-hi); }
  .sec { padding: 28px 0; }
  .card, .prlist li, .xp > li { break-inside: avoid; }
  .status { color: #146c2e; border-color: #146c2e; }
  .status::before { background: #146c2e; }
}
