/* dfrance.dev: one stylesheet, no build step. */

/* Self-hosted fonts (latin subsets, variable weight). Licensed under the SIL Open Font License; see assets/fonts/OFL-*.txt. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/inter-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('../fonts/space-grotesk-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-var.woff2') format('woff2'); }

:root {
  --bg: #0E1117;
  --surface: #161B22;
  --surface-2: #1C222B;
  --line: #30363D;
  --text: #E6E8EB;
  --muted: #9AA3AE;
  --accent: #5E97C8;
  --accent-deep: #13202E;
  --pass: #3FB950;
  --pass-deep: #122117;
  --warn: #D29922;

  --display: 'Space Grotesk', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --col: 760px;
  --wide: 1080px;
  --radius: 16px;
  --track-x: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(94, 151, 200, .16), transparent 60%),
    radial-gradient(#1F2630 1.2px, transparent 1.2px);
  background-size: auto, 28px 28px;
  background-attachment: fixed, scroll;
  color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #8DB8E0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
strong { color: var(--text); font-weight: 600; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* ---------- Stage bar (sticky nav) ---------- */
.stagebar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 17, 23, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.stagebar .inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; height: 60px;
}
.stagebar .home {
  font-family: var(--display); font-weight: 700; color: var(--text);
  text-decoration: none; white-space: nowrap; font-size: 16px;
}
.stagebar ol {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none;
  min-width: 0; /* lets the stage list scroll instead of widening the page on phones */
}
.stagebar ol::-webkit-scrollbar { display: none; }
.stagebar li { display: flex; align-items: center; }
.stagebar li + li::before {
  content: ""; width: 14px; height: 2px; background: var(--line); margin-right: 4px;
  transition: background .4s;
}
.stagebar li.passed + li::before, .stagebar li.passed::before { background: var(--pass); }
.stagebar a {
  display: flex; align-items: center; gap: 6px;
  font: 12.5px/1 var(--mono); letter-spacing: .04em; color: var(--muted);
  text-decoration: none; padding: 7px 8px; border-radius: 999px; white-space: nowrap;
}
.stagebar a:hover { color: var(--text); background: var(--surface); }
.stagebar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg); transition: all .4s;
}
.stagebar li.passed .dot { border-color: var(--pass); background: var(--pass); }
.stagebar li.active a { color: var(--text); background: var(--surface); }
.stagebar li.active .dot { border-color: var(--pass); box-shadow: 0 0 10px rgba(63, 185, 80, .7); }

/* ---------- Layout ---------- */
main { max-width: var(--wide); margin: 0 auto; padding: 0 20px 40px; }
.track { position: relative; padding-left: calc(var(--track-x) + 34px); }
.track::before {
  content: ""; position: absolute; left: var(--track-x); top: 40px; bottom: 40px; width: 2px;
  background: linear-gradient(var(--pass), var(--accent) 85%, transparent);
  opacity: .55;
}

.stage { padding: 72px 0 24px; position: relative; }
.stage-label {
  display: flex; align-items: center; gap: 10px;
  font: 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}
.node {
  position: absolute; left: calc(-34px - 9px + 1px); top: 69px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  display: grid; place-items: center; transition: all .5s;
}
.node svg { width: 12px; height: 12px; opacity: 0; transition: opacity .4s .1s; }
.stage.passed .node { border-color: var(--pass); background: var(--pass-deep); box-shadow: 0 0 14px rgba(63, 185, 80, .45); }
.stage.passed .node svg { opacity: 1; }
.no-js .node { border-color: var(--pass); background: var(--pass-deep); }
.no-js .node svg { opacity: 1; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 21px; }
.lede { font-size: 19px; color: var(--muted); max-width: var(--col); }
.prose { max-width: var(--col); }
.prose p, .prose li { color: #C9CED4; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--accent); }

/* ---------- Hero (source) ---------- */
.hero { display: flex; gap: 32px; align-items: center; margin: 8px 0 32px; }
.avatar {
  width: 168px; height: 168px; border-radius: 50%; overflow: hidden; position: relative; flex: none;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent), 0 0 44px rgba(94, 151, 200, .45);
}
/* The current LinkedIn photo has a banner baked into its lower left; this crop keeps only the face.
   When a new photo replaces assets/img/headshot.jpg, change this to width:100%; inset:0. */
.avatar img { position: absolute; width: 292px; max-width: none; left: -64px; top: -37px; }
.hero h1 { font-size: clamp(42px, 7vw, 64px); margin: 0; letter-spacing: -.02em; }
.role { font: 14px/1.4 var(--mono); letter-spacing: .1em; color: var(--accent); text-transform: uppercase; margin: 8px 0 18px; }
.hook { font-family: var(--display); font-size: clamp(21px, 2.6vw, 27px); line-height: 1.35; margin: 0; max-width: 620px; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 20px; color: var(--pass); font-size: 15px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
  background: var(--accent); color: #0B1220; transition: transform .2s, box-shadow .2s;
}
.btn:hover { color: #0B1220; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(94, 151, 200, .35); }

/* ---------- Timeline (build) ---------- */
.jobs { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.job {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; position: relative;
}
.job header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-bottom: 6px; }
.job h3 { margin: 0; font-size: 19px; }
.job .when { font: 13px/1.6 var(--mono); color: var(--muted); }
.job p { margin: 0; color: #C9CED4; }
.gates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 14.5px; color: var(--muted); }
.gate { color: var(--text); }
.gate.ok::before { content: "✓ "; color: var(--pass); }
.gates .arrow { color: var(--line); }
.job .more { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 15px; text-decoration: none; }
.job .more::after { content: " →"; }
.job .more + .more { margin-left: 20px; }
.job-media { margin: 14px 0 0; }
.job-media .pair { display: flex; gap: 10px; flex-wrap: wrap; }
.job-media img { height: 150px; width: auto; max-width: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.job-media figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .job-media img { height: auto; width: calc(50% - 5px); } }

.toolkit { margin-top: 36px; }
.toolkit h3 { font: 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toolkit dl { display: grid; grid-template-columns: 190px 1fr; gap: 12px 18px; margin: 0; }
.toolkit dt { font-weight: 600; padding-top: 4px; }
.toolkit dd { margin: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font: 12.5px/1 var(--mono); padding: 7px 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); color: #C9CED4;
}

/* ---------- Results (test) ---------- */
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.check {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px 22px; position: relative; overflow: hidden;
}
.check::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(rgba(63, 185, 80, .16), transparent 70%);
}
.check .pass { font: 12px/1 var(--mono); letter-spacing: .1em; color: var(--pass); text-transform: uppercase; }
.check .big {
  display: block; font-family: var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(52px, 7vw, 76px); margin: 14px 0 12px; letter-spacing: -.03em;
  background: linear-gradient(180deg, #FFFFFF, #B8C7D8); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.check p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }

/* ---------- Tiles (deploy) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.tile {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: inherit; position: relative;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
a.tile:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(94, 151, 200, .25); color: inherit; }
.tile .kicker { font: 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.tile h3 { margin: 0; font-size: 21px; }
.tile p { margin: 0; color: #C9CED4; font-size: 15.5px; }
.tile .go { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; color: var(--accent); }
.tile .go::after { content: " →"; transition: margin .2s; }
a.tile:hover .go::after { margin-left: 4px; }
.tile .thumb {
  position: relative; display: block; margin: -22px -22px 8px; aspect-ratio: 2 / 1; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); background: #0E1117;
}
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
a.tile:hover .thumb img { transform: scale(1.03); }
.tile .tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tile .artifact {
  padding: 2px 8px; border-radius: 999px;
  font: 11px/1.4 var(--mono); letter-spacing: .06em; color: var(--pass); background: rgba(14, 17, 23, .85); border: 1px solid rgba(63, 185, 80, .45);
}
.status .jump { font: 14px/1.4 var(--mono); color: var(--accent); text-decoration: none; white-space: nowrap; }
.status .jump:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { a.tile:hover .thumb img { transform: none; } }

/* ---------- Values (operate) ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 28px; }
.value { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.value h3 { font-size: 18px; margin-bottom: 8px; }
.value p { margin: 0; color: #C9CED4; font-size: 15.5px; }

/* ---------- Feedback loop ---------- */
.loop-art { margin: 22px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 4px; }
.headline { font-family: var(--display); font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; margin: 0 0 12px; max-width: 760px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.card .kicker { font: 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.card dl { margin: 0; display: grid; gap: 10px; }
.card dt { font: 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.card dd { margin: 0; color: #C9CED4; font-size: 15.5px; line-height: 1.55; }
.reused { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); margin-top: 16px; color: var(--pass); font-weight: 600; font-size: 15px; }
.reused::before { content: "↻ "; }

/* ---------- Release ---------- */
.release { text-align: center; padding: 88px 0 40px; }
.release .done { font-family: var(--display); font-size: clamp(30px, 5vw, 48px); margin: 0 0 22px; }
.release .done span { color: var(--pass); }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .inner { max-width: var(--wide); margin: 0 auto; padding: 22px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Job pages ---------- */
.job-head { padding: 56px 0 8px; }
.crumb { font: 13px/1 var(--mono); }
.crumb a { text-decoration: none; }
.job-head h1 { font-size: clamp(34px, 5.4vw, 52px); margin: 18px 0 14px; max-width: 900px; }
.job-meta {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 18px;
  font: 13px/1 var(--mono); color: var(--muted);
}
.job-meta span { background: var(--surface); border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px; }
.job-meta .ok { color: var(--pass); border-color: rgba(63, 185, 80, .4); background: var(--pass-deep); }

.steps { margin-top: 28px; }
.step { position: relative; padding: 28px 0 8px; }
.step .node { top: 31px; }
.step-name { font: 14px/1 var(--mono); letter-spacing: .06em; color: var(--text); margin: 0 0 16px; display: flex; gap: 10px; align-items: baseline; }
.step-name .sub { color: var(--muted); font-size: 12.5px; letter-spacing: .04em; }
.step-name::before { content: "$"; color: var(--accent); }
figure.diagram { margin: 8px 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
figure.diagram figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.stack { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 0; }
.aside { max-width: var(--col); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 14px 18px; color: #C9CED4; margin: 20px 0; }
.next-pages { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 56px 0 20px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Motion (progressive; off for reduced motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .checks, .values { grid-template-columns: 1fr; }
  .stagebar .home { display: none; }
  .stagebar ol { margin-left: 0; }
}
@media (max-width: 720px) {
  :root { --track-x: 8px; }
  body { font-size: 16px; }
  .track { padding-left: 30px; }
  .node { left: -31px; width: 18px; height: 18px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 22px; }
  .avatar { width: 128px; height: 128px; }
  .avatar img { width: 222px; left: -49px; top: -28px; }
  .tiles, .cards { grid-template-columns: 1fr; }
  .toolkit dl { grid-template-columns: 1fr; gap: 6px; }
  .toolkit dd { margin-bottom: 10px; }
  .stage { padding-top: 56px; }
  .node { top: 53px; }
  figure.diagram { padding: 10px; overflow-x: auto; }
  figure.diagram img { min-width: 620px; }
}
