/* jarquet.net: Jonathan Farro's personal site. Plain CSS, no build step. */

:root {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --text: #141821;
  --muted: #545c6c;
  --border: #dfe3eb;
  --accent: #2448b5;
  --accent-ink: #ffffff;
  --accent-soft: #e6ecfb;
  --live: #0d8a5f;
  --grid-dot: rgba(36, 72, 181, 0.10);
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.05), 0 4px 16px rgba(20, 24, 33, 0.05);

  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  --wrap: 1080px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #141a23;
    --surface-2: #1a212c;
    --text: #e8ebf1;
    --muted: #9ba4b4;
    --border: #262f3d;
    --accent: #85a6ff;
    --accent-ink: #0d1117;
    --accent-soft: #1b2540;
    --live: #3ccf91;
    --grid-dot: rgba(133, 166, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.sep { color: var(--muted); padding: 0 0.15em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.62em 1.1em;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 0.94rem; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-small { padding: 0.4em 0.9em; font-size: 0.85rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
}
.nav nav { margin-left: auto; }
.nav-links { list-style: none; display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
}
@media (max-width: 330px) {
  .brand-name { display: none; }
}

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 64px;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  border-bottom: 1px solid var(--border);
}
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; margin-bottom: 28px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 50%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -0.03em; }
.role { margin: 10px 0 24px; font-size: clamp(1.1rem, 2.4vw, 1.35rem); font-weight: 600; color: var(--muted); }
.lead { max-width: 44em; font-size: 1.12rem; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 20px; }
.where { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- highlights ---------- */
.highlights { padding: 40px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.stats {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.stats li { display: flex; flex-direction: column; gap: 6px; }
.stat {
  font-family: var(--mono); font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700;
  color: var(--accent); letter-spacing: -0.02em; white-space: nowrap;
}
.stat-label { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(1.7rem, 3.6vw, 2.2rem); font-weight: 800;
  margin-bottom: 36px;
}
.h-num { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.section-intro { margin: -20px 0 32px; max-width: 46em; color: var(--muted); }
.sub-h { font-size: 1.15rem; margin: 48px 0 12px; }

/* ---------- experience timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.job {
  display: grid; grid-template-columns: 180px 1fr; gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.job:first-child { border-top: 0; padding-top: 0; }
.job-when { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding-top: 4px; }
.job h3 { font-size: 1.2rem; font-weight: 700; }
.job-org { margin: 4px 0 6px; font-weight: 600; color: var(--accent); }
.job-context { font-size: 0.93rem; font-style: italic; color: var(--muted); }
.job ul { padding-left: 1.2em; margin: 0 0 14px; list-style-type: disc; }
.job li { margin: 0 0 8px; }
.job li::marker { color: var(--accent); }
.job li ul { margin: 8px 0 0; }
.job li ul li { font-size: 0.95rem; }
.job li ul li::marker { content: "– "; }
@media (max-width: 760px) {
  .job { grid-template-columns: 1fr; gap: 6px; }
  .job-when { padding-top: 0; }
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.tags span {
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
}

/* ---------- project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-feature { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card h3 { font-size: 1.2rem; font-weight: 700; }
.card p { color: var(--text); }
.card .tags { margin-top: auto; padding-top: 6px; }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0 0; font-weight: 600; }
.card-links a { text-decoration: none; }
.card-links a:hover { text-decoration: underline; }
.pill {
  flex: none;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
.pill-live { color: var(--live); border-color: color-mix(in srgb, var(--live) 50%, transparent); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- skills ---------- */
.skills { margin: 0; display: grid; gap: 0; }
.skills > div {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.skills > div:first-child { border-top: 0; padding-top: 0; }
.skills dt { font-weight: 700; }
.skills dd { margin: 0; color: var(--text); }
@media (max-width: 760px) { .skills > div { grid-template-columns: 1fr; gap: 4px; } }
.edu { margin: 0; }

/* ---------- contact ---------- */
.contact { background: var(--surface); border-top: 1px solid var(--border); }
.contact .lead { margin-bottom: 20px; }
.contact-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.email {
  font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em;
  text-decoration: none; overflow-wrap: anywhere;
}
.email:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer { padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }

/* ---------- print: a clean one-column copy ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --muted: #444; --accent: #1f3864; --accent-soft: #fff; --border: #ccc; }
  body { font-size: 11pt; }
  .nav, .actions, .copy, .skip, .footer p:last-child, .dot { display: none !important; }
  .hero { padding: 0 0 16px; background: none; }
  .section, .highlights { padding: 18px 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .job { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
