/* christaylor.ai
   Warm paper, serif body, sans headings. The structural hooks (.hero, .project,
   .testimonial, .stat) are added at build time by enhance.mjs, so the markdown
   stays plain and keeps rendering on GitHub. */

/* The body serif is shipped, not gambled on. The old stack fell through to
   Georgia on Windows, which renders thin and fringy under ClearType in dark
   mode; phones were fine because their system serifs are modern. Source Serif 4
   (OFL) is hinted for screens and looks the same everywhere. Self-hosted latin
   subset; glyphs it lacks fall through to the system stack per character. */
@font-face {
  font-family: "Source Serif 4";
  src: url(/fonts/source-serif-4-roman.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url(/fonts/source-serif-4-italic.woff2) format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #fdfcfa;
  --bg-sunk: #f4f1ec;
  --bg-lift: #ffffff;
  --fg: #1c1b19;
  --fg-soft: #55524d;
  --fg-faint: #6b675f;
  --rule: #e2ded7;
  --rule-firm: #cec9c0;
  --accent: #9a4a1e;
  --accent-soft: #f0e6de;
  --bar: #ecd9c9;
  --shadow: 0 1px 2px rgba(28, 27, 25, .05), 0 8px 24px rgba(28, 27, 25, .06);
  --shadow-lift: 0 2px 4px rgba(28, 27, 25, .06), 0 14px 38px rgba(28, 27, 25, .10);
  --measure: 46rem;
  --wide: 68rem;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --bg-sunk: #1c1c17;
    --bg-lift: #21211a;
    --fg: #ece8e0;
    --fg-soft: #b0aba2;
    --fg-faint: #918c82;
    --rule: #2e2d27;
    --rule-firm: #454339;
    --accent: #e08a4e;
    --accent-soft: #2a2119;
    --bar: #3a2a1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 38px rgba(0, 0, 0, .45);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 "Source Serif 4", ui-serif, Charter, "Iowan Old Style", Georgia, Cambria, "Times New Roman", serif;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  /* Full URLs are quoted in a few places, sometimes as plain text rather than as
     links, and none of them fit a phone. Only breaks words that cannot fit. */
  overflow-wrap: break-word;
}

::selection { background: var(--accent-soft); color: var(--fg); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--bg); padding: .6rem 1rem; border-radius: 0 0 .4rem 0;
}
.skip:focus { left: 0; }

/* ---- chrome ---- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar nav {
  max-width: var(--wide); margin: 0 auto; padding: .7rem 1.5rem;
  display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap;
}
.brand {
  font-weight: 600; letter-spacing: -.01em; color: var(--fg);
  text-decoration: none; font-size: 1.02rem; white-space: nowrap;
}
.topbar .links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.topbar .links a {
  font: 500 .82rem/1 var(--sans);
  letter-spacing: .02em; color: var(--fg-soft); text-decoration: none;
  padding: .35rem 0; border-bottom: 1.5px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.topbar .links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.topbar .links a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  counter-reset: proj;
}

footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2.5rem 1.5rem 4rem;
  text-align: center;
  color: var(--fg-faint);
  font: .87rem/1.6 var(--sans);
}
footer p { margin: .4rem auto; max-width: var(--measure); }
footer .fine { font-size: .8rem; margin-top: 1.2rem; max-width: 34rem; }
footer a { color: var(--fg-soft); }
footer a:hover { color: var(--accent); }

/* ---- hero ---- */
/* Lifted out of <main> by the build so it can run edge to edge. */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.6rem 1.5rem 3.2rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(52rem 22rem at 50% -7rem, var(--accent-soft) 0%, transparent 72%),
    linear-gradient(180deg, var(--bg-sunk) 0%, var(--bg) 100%);
}
/* A faint dot grid, faded out before it reaches the text. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--rule-firm) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: .45;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 72%);
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}
.hero > * { position: relative; }

.hero-name {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.6rem, 8.5vw, 4.4rem);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: -.045em;
}

.hero-tagline, .hero-contact {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  font-family: var(--sans);
}
.hero-tagline {
  gap: .3rem 1.35rem;
  margin: 1.15rem auto 0; max-width: 54rem;
  font-size: 1.03rem; font-weight: 500; color: var(--fg-soft);
}
.hero-contact {
  gap: .25rem 1.2rem;
  margin: .85rem auto 0;
  font-size: .85rem; color: var(--fg-faint);
}
.hero-tagline span, .hero-contact span { position: relative; }
.hero-tagline span + span::before, .hero-contact span + span::before {
  content: ""; position: absolute; left: -.72rem; top: .55em;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent); opacity: .55;
}
.hero-contact a { color: var(--fg-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.hero-contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.hero-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 2.1rem; }
.pill {
  font: 500 .85rem/1 var(--sans);
  padding: .62rem 1.05rem;
  border: 1px solid var(--rule-firm); border-radius: 2rem;
  background: var(--bg-lift); color: var(--fg-soft); text-decoration: none;
  transition: color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.pill:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-1px); box-shadow: var(--shadow);
}
.hero-nav .pill:first-child {
  background: var(--accent); border-color: var(--accent); color: var(--bg);
}
.hero-nav .pill:first-child:hover { color: var(--bg); filter: brightness(1.08); }

/* ---- type ---- */

h1, h2, h3, h4 {
  font-family: var(--sans);
  line-height: 1.2; letter-spacing: -.021em; font-weight: 650;
  margin: 2.6em 0 .7em; scroll-margin-top: 5rem;
  text-wrap: balance;
}
h1 { font-size: 2.35rem; margin-top: 0; letter-spacing: -.03em; }
h2 { font-size: 1.5rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; color: var(--fg-soft); }
main > h1:first-child { margin-top: 0; }

/* The emoji authored into the heading, lifted into a chip. */
h2.has-icon, h3.has-icon { display: flex; align-items: center; gap: .75rem; }
.sec-icon {
  flex: none;
  display: inline-grid; place-items: center;
  width: 2.15rem; height: 2.15rem;
  font-size: 1.08rem; line-height: 1;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: .65rem;
}

p { margin: 1.15em 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .17em; text-decoration-thickness: .07em; }

a:hover { text-decoration-thickness: .13em; }

strong { font-weight: 650; }
em { font-style: italic; }

ul, ol { padding-left: 1.35rem; }
li { margin: .45em 0; }
li::marker { color: var(--fg-faint); }

/* The "Now:" line under the masthead reads as a deck, not as body copy. */
p.standfirst {
  margin: 2.4rem 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--accent);
  font-size: 1.13rem; line-height: 1.6; color: var(--fg-soft);
}
p.standfirst strong { color: var(--fg); }

/* "The AI story:" and friends: a kicker, set above the paragraph it labels. */
p.lead-note { margin-top: 1.6em; }
p.lead-note > strong:first-child {
  display: block; margin-bottom: .3rem;
  font: 650 .72rem/1.3 var(--sans);
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
}

blockquote {
  margin: 1.6em 0; padding: .1rem 0 .1rem 1.3rem;
  border-left: 3px solid var(--accent);
  color: var(--fg-soft); font-style: italic;
}
blockquote strong { color: var(--fg); font-style: normal; }
blockquote p:first-child { margin-top: 0; }
blockquote p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .87em;
  background: var(--bg-sunk);
  padding: .12em .38em;
  border-radius: .3em;
}
pre {
  background: var(--bg-sunk);
  border: 1px solid var(--rule);
  border-radius: .5rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .86rem; line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; }

sub { font-size: .82rem; line-height: 1.5; color: var(--fg-faint); display: inline-block; }

/* ---- testimonials ---- */

.quotes { margin: 2.2rem 0; }
blockquote.testimonial {
  position: relative;
  break-inside: avoid;
  display: inline-block; width: 100%;   /* keeps a card whole inside a column */
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--rule);
  border-radius: .85rem;
  background: var(--bg-sunk);
  font-size: .96rem;
}
blockquote.testimonial::before {
  content: "\201C";
  position: absolute; top: .35rem; left: .8rem;
  font: 3.4rem/1 Georgia, serif;
  color: var(--accent); opacity: .2;
}
blockquote.testimonial p { margin: 0; }
cite {
  display: block; margin-top: 1rem; padding-top: .8rem;
  border-top: 1px solid var(--rule);
  font: .82rem/1.5 var(--sans); font-style: normal;
  color: var(--fg-faint);
}
cite strong { color: var(--fg); font-weight: 600; }

/* ---- project cards ---- */

.project {
  counter-increment: proj;
  margin: 3.5rem 0;
  border: 1px solid var(--rule);
  border-radius: 1.1rem;
  background: var(--bg-lift);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.project > * { max-width: var(--measure); margin-inline: auto; padding-inline: 2rem; }
.project > h3 {
  display: block;
  margin: 2.1rem auto .1rem;
  font-size: 1.55rem;
}
.project > h3::before {
  content: counter(proj, decimal-leading-zero);
  display: block; margin-bottom: .55rem;
  font: 650 .72rem/1 var(--sans);
  letter-spacing: .16em; color: var(--accent);
}
.project > h3 em { font-weight: 500; color: var(--fg-faint); }
/* The screenshot spans the card; the prose stays at reading width. */
.project > p.shot { max-width: none; padding: 0; margin: 1.7rem 0 1.9rem; }
.project > p.shot img {
  width: 100%; border-radius: 0; box-shadow: none;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.project > blockquote {
  margin-block: 1.8rem;
  border-left-width: 3px;
  font-size: .96rem;
}
.project > :last-child { padding-bottom: 2.2rem; }

/* ---- media ---- */

img { max-width: 100%; height: auto; display: block; }

/* Screenshots break out of the prose measure. Centred masthead images are
   excluded by :not([align]): they are sized to themselves, not to the column. */
main > p:not([align]) > a > img, main > p:not([align]) > img {
  width: 100%;
  max-width: var(--wide);
  border-radius: .6rem;
  box-shadow: var(--shadow);
}

/* Centred masthead images (the yearbook line) should not break out. */
p[align="center"] { text-align: center; }
p[align="center"] img {
  display: inline-block; width: auto; max-width: 100%; margin: 0 .3rem;
  box-shadow: none; border-radius: .35rem;
}
p[align="center"] a { text-decoration: none; border-bottom: 1px solid var(--rule); }
p[align="center"] a:hover { border-bottom-color: var(--accent); }

/* ---- tables ---- */

table { border-collapse: collapse; width: 100%; margin: 1.8em 0; font-size: .93rem; }
thead th {
  text-align: left; font-family: var(--sans);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--fg-faint); font-weight: 600;
  border-bottom: 1.5px solid var(--rule); padding: .55rem .7rem;
}
tbody td { border-bottom: 1px solid var(--rule); padding: .7rem; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-sunk); }
td[align="right"], th[align="right"] { text-align: right; font-variant-numeric: tabular-nums; }

/* The commit table: the share column carries its own bar. */
table.stat { font-variant-numeric: tabular-nums; }
table.stat td { padding-block: .8rem; }
table.stat td.pct {
  position: relative; text-align: right; min-width: 6rem;
}
table.stat td.pct::before {
  content: ""; position: absolute; right: .7rem; top: 50%;
  transform: translateY(-50%);
  height: 1.6rem; width: calc(var(--pct) * 1%); max-width: calc(100% - 1.4rem);
  background: linear-gradient(90deg, transparent, var(--bar));
  border-radius: .25rem;
}
table.stat td.pct span { position: relative; font-weight: 650; }
table.stat tr.total td {
  border-top: 2px solid var(--fg); border-bottom: 0;
  padding-top: .95rem; font-size: 1rem;
}
table.stat tr.total td.pct span { font-size: 1.2rem; color: var(--accent); }
table.stat tr:hover { background: none; }

/* Proof points: the authored emoji becomes a chip. */
table.proof td { padding: .85rem .7rem; }
.key-icon {
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; margin-right: .55rem;
  font-size: .92rem; line-height: 1;
  background: var(--accent-soft); border-radius: .45rem;
  vertical-align: -.42rem;
}

/* Side-by-side screenshot grids are a layout device, not a data table. */
table.figures { border: 0; }
table.figures td { border: 0; padding: .5rem; vertical-align: top; }
table.figures tr:hover { background: none; }
table.figures img { border-radius: .5rem; box-shadow: var(--shadow); margin-inline: auto; }

/* Data tables scroll rather than squash the page. */
@media (max-width: 46rem) {
  table:not(.figures) { display: block; overflow-x: auto; }
  table:not(.figures) td, table:not(.figures) th { min-width: 9rem; }
  table.stat td.pct { min-width: 5rem; }
}

/* ---- wide layout ---- */
/* Below this the content column is narrower than --measure, so breaking out
   would compute a positive indent and push blocks off to the right. */

@media (min-width: 74rem) {
  .project, .quotes, table.figures,
  main > p:not([align]) > a > img, main > p:not([align]) > img {
    width: var(--wide);
    margin-inline: calc((var(--measure) - var(--wide)) / 2);
  }
  .quotes { columns: 2; column-gap: 1.6rem; }
}

/* ---- recommendation cards ---- */
/* One card per LinkedIn recommendation: the name, the metadata line broken into
   chips, then the quote set as running text rather than as a pull-quote. */

article.rec {
  margin: 1.5rem 0;
  padding: 1.5rem 1.6rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: .9rem;
  background: var(--bg-lift);
}
article.rec > h3 { margin: 0 0 .6rem; font-size: 1.18rem; }
.rec-meta {
  display: flex; flex-wrap: wrap; gap: .4rem .5rem;
  margin: 0 0 1.1rem;
  font: .75rem/1.4 var(--sans);
}
.rec-meta span {
  padding: .25rem .6rem;
  border: 1px solid var(--rule); border-radius: 1rem;
  background: var(--bg-sunk); color: var(--fg-faint);
}
.rec-meta .role { background: var(--accent-soft); border-color: transparent; color: var(--fg-soft); font-weight: 600; }
article.rec > blockquote {
  margin: 0; padding: 0; border-left: 0;
  font-style: normal; color: var(--fg-soft);
}

/* ---- product timeline ---- */
/* The record on /product/: a year rail with dots, one card per product. */

.timeline { margin: 2.6rem 0; }
.tl-item {
  position: relative;
  display: grid; grid-template-columns: 6rem 1fr; gap: 0 1.9rem;
  padding-bottom: 2.1rem;
}
/* the rail, drawn per item so it stops cleanly at the last one */
.tl-item::before {
  content: ""; position: absolute; left: 6.9rem; top: .7rem; bottom: -.7rem;
  width: 2px; background: var(--rule);
}
.tl-item:last-child { padding-bottom: .4rem; }
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: ""; position: absolute; left: calc(6.9rem - 4px); top: .42rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--rule);
}
.tl-year {
  font: 650 .8rem/1.5 var(--sans); letter-spacing: .05em;
  color: var(--fg-faint); text-align: right; padding-top: .2rem;
  font-variant-numeric: tabular-nums;
}
.tl-head {
  margin: 0;
  font: 600 1.06rem/1.45 var(--sans); letter-spacing: -.012em;
}
.tl-head strong { font-weight: 680; }
.tl-owner {
  display: inline-block; margin-left: .6rem; vertical-align: .1em;
  font: 500 .7rem/1 var(--sans); letter-spacing: .03em; white-space: nowrap;
  padding: .3rem .62rem; border: 1px solid var(--rule); border-radius: 1rem;
  background: var(--bg-sunk); color: var(--fg-faint);
}
.tl-owner.mine {
  background: var(--accent-soft); border-color: transparent;
  color: var(--accent); font-weight: 650;
}
.tl-desc { margin: .5rem 0 0; font-size: .95rem; line-height: 1.6; color: var(--fg-soft); }

@media (max-width: 40rem) {
  .tl-item { grid-template-columns: 1fr; padding-bottom: 1.6rem; }
  .tl-item::before, .tl-item::after { display: none; }
  .tl-year { text-align: left; padding-top: 0; margin-bottom: .25rem; }
}

/* The bold-lead lists on /product/ are six dense paragraphs wearing bullets;
   give them air and set the lead phrase apart in the heading face. */
main.page-product > ul > li, main.page-product > ol > li { margin: 1em 0; }
main.page-product > ul > li > strong:first-child,
main.page-product > ol > li > strong:first-child {
  font-family: var(--sans); letter-spacing: -.01em;
}

/* ---- heading anchors ---- */

.header-anchor { color: inherit; text-decoration: none; }
.header-anchor:hover { color: var(--accent); }

/* Headings that contain links are still headings: the link should not shout. */
h1 a, h2 a, h3 a, h4 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: .04em;
}
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover { color: var(--accent); }

/* The markdown uses `---` as a section break and h2 also carries a top rule.
   Together they draw two lines with a dead gap between. Collapse the pair. */
hr + h2 { border-top: 0; padding-top: 0; margin-top: .8rem; }
hr + h2 + p, hr + h2 + blockquote, hr + h2 + .quotes { margin-top: .9rem; }
main > hr:last-of-type { margin-bottom: 2rem; }

/* A jumped-to section shouldn't leave you hunting for where you landed. */
:target { animation: land 1.6s ease-out; }
@keyframes land {
  from { background: var(--accent-soft); }
  to { background: transparent; }
}

/* ---- small screens ---- */

@media (max-width: 34rem) {
  body { font-size: 16px; }
  main { padding: 2.5rem 1.15rem 3rem; }
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.3rem; }
  .hero { padding: 3.2rem 1.15rem 2.4rem; }
  .hero-nav { margin-top: 1.7rem; }
  .project > * { padding-inline: 1.25rem; }
  .sec-icon { width: 1.9rem; height: 1.9rem; font-size: .98rem; }
}

@media print {
  .topbar, .skip, .hero-nav { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { max-width: none; padding: 0; }
  a { color: #000; }
  .hero { border: 0; background: none; padding: 0 0 1rem; text-align: left; }
  .hero::before { display: none; }
  .project { border: 0; box-shadow: none; break-inside: avoid; }
  .quotes { columns: 1; }
}
