/* scottjanicek.com */

:root {
  --bg: #f7f8f4;
  --surface: #ffffff;
  --band: #e8f0e6;
  --ink: #141613;
  --muted: #5b6258;
  --line: #dce2d8;
  --accent: #9ccc85;
  --accent-ink: #3f6d2e;
  --btn: #141613;
  --btn-ink: #ffffff;
  --viz: #74b05a;
  --viz-on: #ffffff;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111310;
    --surface: #181b17;
    --band: #1b2219;
    --ink: #eef1eb;
    --muted: #a3ab9f;
    --line: #2b3229;
    --accent: #a9d892;
    --accent-ink: #a9d892;
    --btn: #eef1eb;
    --btn-ink: #111310;
    --viz: #a9d892;
    --viz-on: #111310;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--band) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-weight: 800; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { font-family: var(--mono); color: var(--accent-ink); }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); }

/* type */

.label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--accent-ink); margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
.display { color: var(--accent); text-transform: uppercase; letter-spacing: -0.01em; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--btn); color: var(--btn-ink);
  padding: 11px 20px; border-radius: 6px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  border: 1px solid var(--btn);
}
.btn:hover { color: var(--btn-ink); opacity: 0.88; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink); opacity: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.arrow { text-decoration: none; font-weight: 700; }
.arrow::after { content: " \2192"; color: var(--accent-ink); }

/* sections */

section { padding: clamp(56px, 9vw, 104px) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }

/* home hero */

.hero { padding-bottom: 0; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; }
.hero-grid .lede { margin: 0; }
.hero-img { margin-top: clamp(32px, 6vw, 64px); border-radius: 10px 10px 0 0; overflow: hidden; background: var(--band); aspect-ratio: 16 / 7; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-color-scheme: dark) { .hero-img img { filter: invert(1) hue-rotate(180deg) brightness(0.9); } }

/* cards */

.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card p { margin: 0; color: var(--muted); }
.card .foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.card .num { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat strong { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 15px; }

.cta { background: var(--band); }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

/* page header */

.page-head { padding-bottom: 40px; }
.page-head h1 { font-size: clamp(36px, 6vw, 60px); }
.page-head .lede { margin: 20px 0 0; }

/* about */

.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.portrait { border-radius: 10px; overflow: hidden; position: sticky; top: 96px; }
.portrait figcaption { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; }
.prose p { margin: 0 0 1.1em; }
.prose > :last-child { margin-bottom: 0; }

.proud { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.proud li { background: var(--surface); padding: 18px 22px; display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
.proud b { font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--accent-ink); padding-top: 2px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { font-family: var(--mono); font-size: 14px; color: var(--muted); padding-top: 4px; }
.timeline h3 a { text-decoration: none; }
.timeline .role { color: var(--accent-ink); font-weight: 600; margin: 2px 0 10px; }
.timeline p { margin: 0 0 8px; }
.timeline .products { font-size: 15px; color: var(--muted); }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: "_"; font-family: var(--mono); color: var(--accent-ink); position: absolute; left: 0; }

/* services */

.examples { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.examples li { font-size: 15px; }
.examples q { color: var(--muted); }
.examples b { display: block; font-weight: 700; }

/* writings */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; padding: 28px 0; text-decoration: none; align-items: baseline; }
.post-list a:hover h3 { color: var(--accent-ink); }
.post-list time, .post-list .kind { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.post-list p { margin: 6px 0 0; color: var(--muted); }

/* article */

.article-head { padding-bottom: 32px; }
.article-head h1 { font-size: clamp(34px, 5.5vw, 56px); }
.meta { font-family: var(--mono); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }
.note { background: var(--band); border-radius: 10px; padding: 20px 24px; margin: 0 0 16px; font-size: 16px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; font-size: 14px; }
.toc a { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--ink); border-color: var(--ink); }

.article { font-size: 18px; line-height: 1.75; }
.article h2 { font-size: 15px; font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; color: var(--accent-ink); margin: 56px 0 18px; padding-top: 24px; border-top: 1px solid var(--line); }
.article p { margin: 0 0 1.1em; }
.article ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.article li { margin: 0 0 0.4em; }
.article .q { font-weight: 600; font-size: 19px; line-height: 1.55; }
.article .q strong, .article .a strong:first-child { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--accent-ink); margin-right: 4px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; }
.pager a { border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; text-decoration: none; }
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager small { display: block; font-family: var(--mono); color: var(--muted); }
.pager .next { text-align: right; grid-column: 2; }

/* nav cta + credentials */

.nav-cta { background: var(--btn); color: var(--btn-ink) !important; padding: 7px 14px; border-radius: 6px; font-weight: 700; }
.nav-cta:hover { opacity: 0.88; }
.creds { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 36px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.creds li::before { content: "_ "; color: var(--accent-ink); }

/* illustrations (inlined svg) */

.viz { background: var(--surface); aspect-ratio: 8 / 5; overflow: hidden; }
.viz svg, .viz img { width: 100%; height: 100%; display: block; object-fit: cover; }
.viz .grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.viz .s { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.viz .m { stroke: var(--muted); stroke-width: 1.5; fill: none; opacity: 0.75; stroke-linecap: round; }
.viz .a { stroke: var(--viz); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.viz .b { fill: var(--surface); }
.viz .af { fill: var(--viz); }
.viz .inv-f { fill: var(--viz-on); }
.viz .t { font-family: var(--mono); font-size: 13px; fill: var(--ink); stroke: none; }
.viz .m-t { fill: var(--muted); }
.viz .a-t { fill: var(--viz); }
.viz .inv { fill: var(--viz-on); font-weight: 700; }
.viz .big { font-family: var(--sans); font-size: 26px; font-weight: 800; }

/* project cards */

.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--ink); color: inherit; transform: translateY(-2px); }
.pcard .viz { border-bottom: 1px solid var(--line); }
.pcard .body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard p { margin: 0; color: var(--muted); }
.pcard .more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 15px; }
.pcard .more::after { content: " \2192"; color: var(--accent-ink); }
.pcard.feature h3 { font-size: clamp(24px, 3vw, 30px); }
.pcard.feature p { font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.tags .status { color: var(--accent-ink); }
.tags .status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--viz); margin-right: 7px; vertical-align: 1px; }
.grid.projects { grid-template-columns: repeat(3, 1fr); }
.grid.projects .pcard h3 { font-size: 19px; }
.grid.projects .pcard p { font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chips li { font-family: var(--mono); font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); }

.group-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin: 0 0 28px; align-items: baseline; }
.group-head p { margin: 0; color: var(--muted); max-width: 40em; }

/* services + process */

.offer ul { margin: 4px 0 0; padding-left: 1.1em; color: var(--muted); font-size: 15px; }
.offer li { margin-bottom: 4px; }
.offer .seen { font-size: 14px; margin-top: auto; padding-top: 8px; }
.offer .seen a { color: var(--accent-ink); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 22px 22px 0 0; }
.steps .n { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.steps h3 { margin: 8px 0 8px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }

.faq { margin: 0; }
.faq dt { font-weight: 700; margin-top: 22px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 6px 0 0; color: var(--muted); }

/* project page */

.project-head .tags { margin-top: 18px; }
.project-hero { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.project-hero .viz { aspect-ratio: 16 / 7; }
.project-hero .viz svg { object-fit: contain; }
.project-grid { display: grid; grid-template-columns: 1fr 280px; gap: clamp(32px, 6vw, 72px); align-items: start; }
.facts-box { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--surface); display: grid; gap: 18px; font-size: 15px; }
.facts-box dt { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.facts-box dd { margin: 0; }
.facts-box dl { margin: 0; display: grid; gap: 16px; }
.article.project h2 { font-family: var(--sans); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-top: 48px; padding-top: 0; border-top: 0; }
.article.project h2:first-child { margin-top: 0; }

/* footer */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* responsive */

@media (max-width: 900px) {
  .grid.three { grid-template-columns: 1fr; }
  .grid.projects { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .facts-box { position: static; }
  .group-head { grid-template-columns: 1fr; gap: 8px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 280px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero-grid, .grid.two, .grid.projects, .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .project-hero .viz { aspect-ratio: 8 / 5; }
  .hero-img { aspect-ratio: 4 / 3; }
  .nav { gap: 14px; font-size: 14px; }
  .timeline li, .proud li { grid-template-columns: 1fr; gap: 4px; }
  .post-list a { grid-template-columns: 1fr; gap: 4px; }
  .post-list .kind { display: none; }
  .article { font-size: 17px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}

@media (max-width: 420px) {
  .brand { font-size: 15px; }
  .nav { gap: 11px; font-size: 13.5px; }
}
