@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0B0E16;
  --surface: #12161f;
  --surface-alt: #171c27;
  --line: #262c3a;
  --ink: #E6E8EF;
  --ink-soft: #8B92A6;
  --accent-hue: 324;               /* magenta default */
  --accent: hsl(var(--accent-hue), 70%, 58%);
  --accent-ink: #0B0E16;
  --radius: 12px;
  --max: 820px;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F3F1F8;
    --surface: #ffffff;
    --surface-alt: #ECE9F3;
    --line: #DAD5E6;
    --ink: #1A1826;
    --ink-soft: #5C5670;
  }
}

* { box-sizing: border-box; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px circle at 10% -5%, hsla(324, 70%, 58%, 0.12), transparent 55%),
    radial-gradient(900px circle at 92% 2%, hsla(181, 70%, 58%, 0.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* Signature 4-color top strip — cycles the store hues */
.sig-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 30;
  background: linear-gradient(90deg,
    hsl(200, 70%, 58%),
    hsl(280, 70%, 58%),
    hsl(40, 70%, 58%),
    hsl(160, 70%, 58%));
}

.mono { font-family: "Space Mono", ui-monospace, monospace; }
.sans { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

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

header.hero {
  padding: 104px 0 64px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: "Space Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 20px;
}

h1 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 68px;
  line-height: 1.02;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.role {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 28px;
}

.lede {
  font-size: 19px;
  color: var(--ink);
  max-width: 62ch;
  margin: 0 0 30px;
}

.contact-row {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--ink-soft);
}

.contact-row a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.contact-row a:hover { border-color: var(--accent); color: var(--accent); }

/* Contact pill */
.contact-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.contact-pill a,
.contact-pill .copy-handle {
  --hue: 324;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.contact-pill svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: hsl(var(--hue), 70%, 58%);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.contact-pill a:hover,
.contact-pill a:focus-visible,
.contact-pill .copy-handle:hover,
.contact-pill .copy-handle:focus-visible {
  color: hsl(var(--hue), 70%, 58%);
  border-color: hsla(var(--hue), 70%, 58%, 0.55);
  background: hsla(var(--hue), 70%, 58%, 0.08);
  box-shadow: 0 6px 20px -10px hsla(var(--hue), 70%, 58%, 0.6);
}

.contact-pill .copy-handle.copied {
  color: hsl(var(--hue), 70%, 58%);
  border-color: hsla(var(--hue), 70%, 58%, 0.55);
}

@media (max-width: 560px) {
  .contact-pill { width: 100%; }
  .contact-pill a,
  .contact-pill .copy-handle { flex: 1 1 auto; justify-content: center; }
}

section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type { border-bottom: none; }

h2 {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin: 0 0 36px;
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 8px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px 1px hsla(var(--accent-hue), 70%, 58%, 0.7);
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 44px;
}

.stat {
  --hue: var(--accent-hue);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--hue), 70%, 58%), transparent);
}

.stat .num {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: hsl(var(--hue), 70%, 58%);
  font-variant-numeric: tabular-nums;
}

.stat .label {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.4;
}

/* Store blocks */
.store-block { margin-bottom: 26px; }

.store-block h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 4px;
}

.store-block .meta {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.store-block p { margin: 0; color: var(--ink-soft); }

.methodology {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin-top: 24px;
  line-height: 1.5;
}

/* Projects — néon estampé cards */
.project {
  --hue: var(--accent-hue);
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  margin-bottom: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--hue), 70%, 58%), transparent);
}

.project:hover {
  transform: translateY(-2px);
  border-color: hsla(var(--hue), 70%, 58%, 0.55);
  box-shadow: 0 10px 32px -14px hsla(var(--hue), 70%, 58%, 0.55);
}

/* Line-art motif, right-anchored, masked so it dissolves toward the text */
.motif {
  position: absolute;
  right: 14px;
  top: 20px;
  width: 108px;
  height: auto;
  fill: none;
  stroke: hsl(var(--hue), 70%, 58%);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-mask-image: linear-gradient(105deg, transparent 8%, #000 70%);
  mask-image: linear-gradient(105deg, transparent 8%, #000 70%);
}

.project:hover .motif { opacity: 0.6; }

.project > * { position: relative; z-index: 1; }

.project h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 2px;
}

.project .pitch { color: var(--ink); margin: 2px 0 12px; max-width: 60ch; }
.project p { color: var(--ink-soft); }

.project-media {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  overflow: hidden;
  margin: 12px 0 14px;
  transition: transform 0.3s ease;
}

.project:hover .project-media { transform: translateY(-2px); }

.project-media img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--line);
  transition: filter 0.3s ease;
}

.project:hover .project-media img,
.project:hover .fleet-graph { filter: brightness(1.06); }

.media-caption {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 12px;
  margin: 0;
}

/* LLM fleet: node graph (MCP hub routing to GPU/CPU/cloud) */
.fleet-graph { width: 100%; height: 190px; display: block; }
.fleet-edge { stroke: var(--line); stroke-width: 1.5; transition: stroke 0.4s, opacity 0.4s; }
.fleet-edge--cloud { stroke-dasharray: 4 4; opacity: 0.5; }
.fleet-edge.active { stroke: hsl(var(--hue), 70%, 58%); opacity: 1; }
.fleet-edge.down { stroke: #e0555f; }
.fleet-hub circle { fill: var(--surface-alt); stroke: var(--ink-soft); stroke-width: 1.5; }
.fleet-hub text { fill: var(--ink); font-family: "Space Mono", ui-monospace, monospace; font-size: 9px; text-anchor: middle; }
.fleet-vnode circle { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; transition: stroke 0.4s, fill 0.4s; }
.fleet-vnode text { fill: var(--ink-soft); font-family: "Space Mono", ui-monospace, monospace; font-size: 9px; text-anchor: middle; transition: fill 0.4s; }
.fleet-vnode--cloud circle { stroke-dasharray: 3 3; }
.fleet-vnode.active circle { stroke: hsl(var(--hue), 70%, 58%); fill: hsla(var(--hue), 70%, 58%, 0.14); }
.fleet-vnode.active text { fill: hsl(var(--hue), 70%, 58%); }
.fleet-vnode.down circle { stroke: #e0555f; }
.fleet-vnode.down text { fill: #e0555f; }
.fleet-status { font-family: "Space Mono", ui-monospace, monospace; font-size: 11px; color: var(--ink-soft); text-align: center; padding: 8px 12px 12px; margin: 0; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .fleet-edge, .fleet-vnode circle, .fleet-vnode text { transition: none; }
}

.device-chrome {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  background: #0d0d0d;
}

.device-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
}

.flagship {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--hue), 70%, 58%);
  border: 1px solid hsla(var(--hue), 70%, 58%, 0.6);
  border-radius: 10px;
  padding: 3px 9px;
  margin-left: 10px;
  vertical-align: middle;
}

.stack {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: hsl(var(--hue), 70%, 58%);
  text-transform: uppercase;
  margin-top: 10px;
}

/* Section rail nav (scrollspy) */
.rail {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 10;
}

.rail a {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  transition: color 0.2s, border-color 0.2s;
}

.rail a:hover,
.rail a.active {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 1180px) {
  .rail { display: none; }
}

.ticker { font-variant-numeric: tabular-nums; }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.skills-grid > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
}

.skills-grid h4 {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 12px;
}

.skills-grid ul { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.skills-grid li { margin-bottom: 6px; color: var(--ink-soft); }

/* Education */
.edu-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.edu-row:first-of-type { border-top: none; }

.edu-row .when {
  font-family: "Space Mono", ui-monospace, monospace;
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.lang-row {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  flex-wrap: wrap;
}

.lang-row span { color: var(--ink-soft); }
.lang-row strong { color: var(--ink); font-weight: 700; }

footer {
  padding: 48px 0 80px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

footer a { color: var(--ink-soft); }
footer a:hover { color: var(--accent); }

.lang-toggle {
  position: fixed;
  top: 18px;
  right: 24px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  cursor: pointer;
  z-index: 20;
}

.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 40;
  font-family: "Space Mono", ui-monospace, monospace;
}

.skip-link:focus { left: 12px; top: 14px; }

@media (max-width: 560px) {
  header.hero { padding: 80px 0 40px; }
  h1 { font-size: 46px; }
  .lede { font-size: 17px; }
  .lang-toggle { top: 14px; right: 14px; }
}
