/* gabrielvoyer.com
   One idea: the page reads like a training module. The objectives at the top
   check themselves off as the reader reaches each section. Everything else stays quiet. */

:root {
  --paper: #f5f6f2;
  --ink: #17262b;
  --muted: #56656a;
  --rule: #d6dbd3;
  --green: #1e6b52;
  --green-ink: #ffffff;
  --mark: #dcebb0;
  --field: #ffffff;
  --todo: #b4561c;

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 38rem;
  --gutter: 16px;
  --radius: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #162024;
    --ink: #e6ece8;
    --muted: #9aa8a6;
    --rule: #2c3a3e;
    --green: #6cc4a1;
    --green-ink: #0f1b17;
    --mark: #34502c;
    --field: #1c282c;
    --todo: #f0a46a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #162024;
  --ink: #e6ece8;
  --muted: #9aa8a6;
  --rule: #2c3a3e;
  --green: #6cc4a1;
  --green-ink: #0f1b17;
  --mark: #34502c;
  --field: #1c282c;
  --todo: #f0a46a;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem;          /* 19px */
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.5rem, 8.5vw, 4.4rem); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-weight: 700; font-size: clamp(1.6rem, 4.5vw, 2.1rem); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 20; background: var(--paper); padding: 6px 10px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar {
  max-width: 72rem; margin: 0 auto; padding: 0.85rem var(--gutter);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-family: var(--display);
}
.site-header .name { font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 1.1rem; font-size: 0.95rem; font-weight: 500; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

/* Mobile course-progress bar: three segments, one per objective */
.progress { display: flex; gap: 4px; padding: 0 var(--gutter) 0; max-width: 72rem; margin: 0 auto; height: 4px; }
.progress span { flex: 1; background: var(--rule); border-radius: 2px; transition: background-color 400ms ease; }
.progress span.done { background: var(--green); }

/* Layout */
.layout {
  max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr);
}
.intro { padding: 3.5rem 0 1.5rem; max-width: 44rem; }
.intro .lede { font-size: 1.25rem; color: var(--muted); margin-top: 1.25rem; max-width: var(--measure); }

/* Objectives: the one memorable thing */
.objectives { margin: 0.5rem 0 1rem; padding: 1.25rem 0 1.5rem; border-top: 2px solid var(--ink); }
.objectives h2 { font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: 0.9rem; line-height: 1.4; }
.objectives ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.objectives a {
  display: grid; grid-template-columns: 26px 1fr; gap: 0.75rem; align-items: start;
  color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.02rem; line-height: 1.4; font-weight: 500;
}
.objectives a:hover .text { text-decoration: underline; text-underline-offset: 0.18em; }
.box {
  width: 24px; height: 24px; margin-top: 0.05rem; border: 2px solid var(--ink); border-radius: 5px;
  display: grid; place-items: center; transition: background-color 250ms ease, border-color 250ms ease;
}
.box svg { width: 15px; height: 15px; }
.box path { fill: none; stroke: var(--green-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 350ms ease 150ms; }
.text {
  background-image: linear-gradient(var(--mark), var(--mark));
  background-repeat: no-repeat; background-size: 0% 100%; background-position: 0 0;
  transition: background-size 700ms cubic-bezier(.2,.7,.2,1) 250ms;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 2px;
}
.objectives li.done .box { background: var(--green); border-color: var(--green); }
.objectives li.done .box path { stroke-dashoffset: 0; }
.objectives li.done .text { background-size: 100% 100%; }
.objectives .tally { margin: 1rem 0 0; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .box, .box path, .text, .progress span { transition: none; }
}

main { min-width: 0; }
.section { padding: 3.5rem 0; border-top: 1px solid var(--rule); max-width: 44rem; }
.section > h2 { margin-bottom: 1.25rem; }
.section > p, .section .prose { max-width: var(--measure); }

/* The short version */
.facts { margin: 0; display: grid; gap: 1.35rem; max-width: var(--measure); }
.facts div { display: grid; gap: 0.15rem; }
.facts dt { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.facts dd { margin: 0; color: var(--muted); }

/* Work feature */
.feature { display: block; text-decoration: none; color: inherit; padding: 1.5rem 0 0.5rem; }
.feature h3 { font-size: clamp(1.35rem, 3.6vw, 1.7rem); line-height: 1.2; letter-spacing: -0.01em; }
a.feature:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.feature .meta { font-family: var(--display); font-size: 0.92rem; color: var(--muted); margin: 0.5rem 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.feature p { color: var(--ink); max-width: var(--measure); }
.feature .go { font-family: var(--display); font-weight: 700; color: var(--green); }
.next-up { margin-top: 1.75rem; font-size: 1rem; color: var(--muted); max-width: var(--measure); }

.split { display: grid; gap: 2.25rem; }
.split h3 { margin-bottom: 0.6rem; }
.split ul { margin: 0; padding-left: 1.15rem; max-width: var(--measure); }
.split li { margin-bottom: 0.55rem; }
.links { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-family: var(--display); font-weight: 500; font-size: 1rem; margin-top: 1rem !important; }
.links li { margin: 0 !important; }

/* Contact */
form { display: grid; gap: 1.1rem; max-width: 32rem; margin-top: 1.5rem; }
label { font-family: var(--display); font-weight: 700; font-size: 0.98rem; display: grid; gap: 0.35rem; }
input, textarea {
  font: inherit; font-family: var(--body); font-weight: 400; font-size: 1.05rem; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 0.7rem 0.8rem; width: 100%; min-height: 48px;
}
input:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 30%, transparent); }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  background: var(--green); color: var(--green-ink); border: 0; border-radius: 999px;
  padding: 0.85rem 1.6rem; min-height: 48px; cursor: pointer; justify-self: start;
}
button[disabled] { opacity: 0.6; cursor: progress; }
.status { font-family: var(--display); font-size: 1rem; margin: 0; min-height: 1.5em; }
.status.ok { color: var(--green); }
.status.err { color: var(--todo); }

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .bar { max-width: 72rem; margin: 0 auto; padding: 2rem var(--gutter) 3rem; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }
.site-footer p { max-width: 40rem; }

/* Draft markers: anything still to fill in before launch. Never ship these. */
.todo { outline: 2px dashed var(--todo); outline-offset: 2px; color: var(--todo); font-family: var(--display); font-size: 0.95em; padding: 0 3px; border-radius: 3px; }

/* Desktop: objectives become a sticky left rail, like a course outline */
@media (min-width: 1000px) {
  :root { --gutter: 40px; }
  .progress { display: none; }
  .layout { grid-template-columns: 17rem minmax(0, 1fr); column-gap: 4.5rem; }
  .intro { grid-column: 2; grid-row: 1; padding-top: 5rem; }
  .objectives { grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 6rem; margin-top: 5.6rem; }
  main { grid-column: 2; grid-row: 2; }
  .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ---------- Article pages (case study, résumé) ---------- */
.article { max-width: 44rem; margin: 0 auto; padding: 3rem var(--gutter) 4rem; }
.article .back { font-family: var(--display); font-size: 0.95rem; text-decoration: none; }
.article h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); margin: 1.25rem 0 1rem; }
.article .lede { font-size: 1.22rem; color: var(--muted); }
.summary { margin: 2rem 0 2.5rem; padding: 1.25rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.summary div { display: grid; gap: 0.1rem; }
.summary dt { font-family: var(--display); font-size: 0.88rem; color: var(--muted); }
.summary dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.article h2 { margin: 2.75rem 0 0.9rem; font-size: 1.55rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 0.95rem;
}
.steps h3 { margin-bottom: 0.35rem; }
.callout { border-left: 3px solid var(--green); padding: 0.25rem 0 0.25rem 1.1rem; margin: 2rem 0; color: var(--muted); }

/* Résumé */
.resume h1 { margin-bottom: 0.4rem; }
.resume .contact { font-family: var(--display); color: var(--muted); font-size: 0.98rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin-bottom: 1.5rem; }
.resume h2 { font-size: 1.15rem; margin: 2.25rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); }
.job { margin-bottom: 1.6rem; }
.job header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; align-items: baseline; }
.job h3 { font-size: 1.08rem; }
.job .when { font-family: var(--display); font-size: 0.92rem; color: var(--muted); }
.job .where { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin: 0.1rem 0 0.5rem; }
.job ul { margin: 0; padding-left: 1.15rem; }
.job li { margin-bottom: 0.35rem; font-size: 1.05rem; }
.print-btn { margin-top: 0.5rem; }

@media (max-width: 480px) { .summary { grid-template-columns: 1fr; } }

@media print {
  :root { --paper: #fff; --ink: #000; --muted: #333; --green: #000; --rule: #999; }
  body { font-size: 10.5pt; line-height: 1.4; background: #fff; }
  .site-header, .site-footer, .back, .print-btn, .no-print { display: none !important; }
  .article { padding: 0; max-width: none; }
  .resume h1 { font-size: 22pt; margin-top: 0; }
  .resume h2 { font-size: 11.5pt; margin: 12pt 0 5pt; }
  .job { margin-bottom: 8pt; break-inside: avoid; }
  .job li { font-size: 10.5pt; margin-bottom: 2pt; }
  a { color: #000; text-decoration: none; }
  @page { margin: 0.55in; }
}
