/* Lance Magnaye — résumé site
   Self-hosted fonts, dark only, single 640px column. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;          /* variable file, wght axis 100–900 */
  font-display: swap;
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* colour */
  --bg: #0C0C0E;
  --surface: #141417;
  --border: #24242A;
  --text: #F2F1EC;
  --text-2: #93938C;
  --text-muted: #82827A;  /* spec value #63635D is 3.23:1 on --bg and fails WCAG AA */
  --accent: #5DCAA5;
  --print-ink: #000000;
  --print-paper: #FFFFFF;

  /* spacing — 4px scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s12: 48px;
  --s20: 80px;

  /* type */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono",
    Consolas, "Liberation Mono", monospace;
  --fs-label: 11px;
  --fs-pill: 12px;
  --fs-body: 13px;
  --fs-role: 14px;
  --fs-name: clamp(2.25rem, 8vw, 3.25rem);
  --lh: 1.7;
  --track-label: 0.14em;

  /* lines + shape */
  --hair: 0.5px;
  --radius: 6px;
  --motion: 150ms;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- layout ---------- */

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--s20) var(--s6);
}

.section {
  margin-top: var(--s12);
  padding-top: var(--s12);
  border-top: var(--hair) solid var(--border);
}

/* ---------- masthead ---------- */

.avatar {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: var(--s6);
  border-radius: 50%;
  border: var(--hair) solid var(--border);
  object-fit: cover;
}

.status {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  color: var(--text-2);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.name {
  margin: var(--s5) 0 var(--s4);
  font-size: var(--fs-name);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.bio { max-width: 58ch; color: var(--text-2); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-top: var(--s6);
}

/* ---------- links ---------- */

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: var(--hair) solid var(--border);
}

a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--surface);
  border: var(--hair) solid var(--border);
  border-radius: var(--radius);
}

.skip:focus { left: var(--s2); }

/* ---------- section labels ---------- */

.label {
  margin-bottom: var(--s6);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: lowercase;
  color: var(--text-muted);
}

/* ---------- experience / education entries ---------- */

.entry + .entry { margin-top: var(--s8); }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s4);
}

.role {
  font-size: var(--fs-role);
  font-weight: 500;
  line-height: 1.4;
}

.org { color: var(--text-2); }

.dates {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--text-2);
  white-space: nowrap;
  flex: none;
}

.points { margin-top: var(--s3); }

.points li {
  position: relative;
  padding-left: var(--s4);
  color: var(--text-2);
}

.points li + li { margin-top: var(--s2); }

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--lh) * 0.5em);
  width: 4px;
  height: var(--hair);
  background: var(--text-muted);
}

/* ---------- skills ---------- */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.pills li {
  padding: var(--s1) var(--s3);
  font-size: var(--fs-pill);
  color: var(--text-2);
  background: var(--surface);
  border: var(--hair) solid var(--border);
  border-radius: var(--radius);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s12);
  padding-top: var(--s12);
  border-top: var(--hair) solid var(--border);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  color: var(--text-muted);
}

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

@media (prefers-reduced-motion: no-preference) {
  a { transition: color var(--motion) ease, border-color var(--motion) ease; }

  .js .reveal { opacity: 0; }

  .js .reveal.is-visible {
    opacity: 1;
    transition: opacity var(--motion) ease;
  }
}

/* ---------- narrow ---------- */

@media (max-width: 768px) {
  .shell { padding: var(--s12) var(--s5); }

  .entry-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
  }

  .dates { order: 3; }
}

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

@media print {
  :root {
    --bg: var(--print-paper);
    --text: var(--print-ink);
    --text-2: var(--print-ink);
    --text-muted: var(--print-ink);
    --border: #999999;
    --surface: var(--print-paper);
  }

  @page { margin: 14mm; }

  body { font-size: 10.5pt; line-height: 1.45; }

  .shell { max-width: none; padding: 0; }

  .links, .foot, .skip, .dot { display: none; }

  .status { color: var(--print-ink); letter-spacing: 0.06em; }

  .avatar { width: 54px; height: 54px; margin-bottom: 8pt; border-color: #999999; }

  .name { font-size: 24pt; margin: 6pt 0 4pt; }

  .bio { max-width: none; }

  .section { margin-top: 14pt; padding-top: 10pt; }

  .entry { break-inside: avoid; page-break-inside: avoid; }

  .entry + .entry { margin-top: 10pt; }

  .entry-head { flex-direction: row; align-items: baseline; }

  .role { font-size: 11pt; }

  .pills li { background: none; border-color: #999999; }

  a { border-bottom: none; color: var(--print-ink); }
}
