/* stevenblank.me — home page and notes. Tokens live in tokens.css. */

.col { width: 100%; max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 6px 10px; border-radius: 4px; }

/* ---------- header ---------- */
.top { padding: 22px 0 0; }
/* On a phone the links don't fit beside the name, so they drop to their own line. */
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.home-link { font-weight: 560; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
h1.home-link { font-size: inherit; line-height: inherit; margin: 0; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; color: var(--ink-2); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.theme { appearance: none; background: none; border: 0; padding: 4px; margin: -4px; color: var(--ink-3); cursor: pointer; line-height: 0; }
.theme:hover { color: var(--ink); }
.theme svg { width: 15px; height: 15px; }

/* ---------- intro ---------- */
.intro { padding-top: clamp(40px, 7vh, 64px); padding-bottom: 8px; }
.lead { font-size: clamp(19px, 2.6vw, 22px); line-height: 1.45; letter-spacing: -.012em; margin: 0 0 20px; max-width: 34em; }
.intro p { color: var(--ink-2); margin: 0 0 14px; max-width: 40em; }
.intro p.lead { color: var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px !important; font-size: 15px; }
.links a { color: var(--ink); }

/* ---------- sections ---------- */
.sec { padding-top: 64px; }
.label { display: flex; align-items: center; gap: 14px; font: 500 12.5px/1 var(--font-mono); color: var(--ink-3); text-transform: none; letter-spacing: .02em; margin: 0 0 26px; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* Entries: date column + body on wide screens, stacked on phones. */
.entry { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0 20px; padding: 0 0 34px; }
.entry + .entry { border-top: 1px solid var(--rule); padding-top: 28px; }
.when { font: 400 12.5px/1.9 var(--font-mono); color: var(--ink-3); padding-top: 2px; }
.entry h3 { font-size: 17.5px; line-height: 1.35; font-weight: 580; letter-spacing: -.015em; margin: 0 0 8px; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry p { margin: 0 0 12px; color: var(--ink-2); }
.entry p b, .entry p strong { color: var(--ink); font-weight: 560; }
.entry ol.steps { margin: 0 0 12px; padding-left: 22px; color: var(--ink-2); }
.entry ol.steps li { margin: 0 0 6px; padding-left: 2px; }
.where { font-size: 14px; color: var(--ink-3); margin: -4px 0 10px !important; }
.acts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.acts a { color: var(--ink); }
.acts a::after { content: " \2197"; color: var(--ink-3); font-size: .85em; }
.acts a[href^="/"]::after, .acts a[href^="#"]::after { content: " \2192"; }
.acts a:hover::after { color: inherit; }

@media (max-width: 640px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .when { padding: 0 0 4px; line-height: 1.5; }
}

/* ---------- figures ---------- */
.entry > div, .small li > span, .cv li > span { min-width: 0; }
.fig { margin: 18px 0 6px; padding: 16px 16px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.fig svg { width: 100%; height: auto; overflow: visible; font-family: var(--font-mono); }
.fig svg text { paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.fig-compact { display: none; }
@media (max-width: 560px) { .fig-wide { display: none; } .fig-compact { display: block; } .fig { padding: 12px 12px 10px; } }
.fig figcaption { font-size: 13px; line-height: 1.5; color: var(--ink-3); margin-top: 10px; }
.fig figcaption b { color: var(--ink-2); font-weight: 500; }
.f-axis { stroke: var(--rule-strong); stroke-width: 1; }
.f-grid { stroke: var(--rule); stroke-width: 1; }
.f-ref { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.f-text { fill: var(--ink-3); font-size: 11px; }
.f-label { fill: var(--ink-2); font-size: 11.5px; }
.f-strong { fill: var(--ink); font-size: 11.5px; font-weight: 500; }
.f-key { fill: var(--accent-text); font-size: 11.5px; font-weight: 500; }
.f-bar { fill: var(--fig-muted); }
.f-bar.key { fill: var(--accent); }
.f-err { stroke: var(--ink-3); stroke-width: 1.2; }
.f-dot { fill: var(--fig-muted); fill-opacity: .9; }
.f-dot.key { fill: var(--accent); fill-opacity: .55; }
.f-med { stroke: var(--ink); stroke-width: 2; }
.f-med.key { stroke: var(--accent); stroke-width: 2.5; }
.f-pt { fill: var(--fig-muted); }
.f-pt.key { fill: var(--accent); fill-opacity: .8; }
.f-fit { stroke: var(--ink-3); stroke-width: 1.4; }
.f-sim { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 5 4; }
.f-drop { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; }
.f-cross { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }

/* Crossword grid: the puzzle beside its caption on wide screens. */
.fig-cw { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: end; }
.fig-cw a { display: block; line-height: 0; text-decoration: none; }
.fig-cw figcaption { margin-top: 0; }
@media (max-width: 560px) { .fig-cw { grid-template-columns: minmax(0, 1fr); gap: 4px; } .fig-cw a { max-width: 300px; } }
.fig svg text.cw-num, .fig svg text.cw-letter { stroke: none; }
.cw-cell { fill: var(--paper); stroke: var(--rule-strong); stroke-width: .75; }
.cw-cell.key { fill: var(--accent-soft); }
.cw-block { fill: var(--ink); }
.cw-frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.cw-num { fill: var(--ink-3); font-size: 6px; }
.cw-letter { fill: var(--accent-text); font-size: 11.5px; font-weight: 500; }

/* ---------- lists ---------- */
.small { list-style: none; margin: 4px 0 0; padding: 0; }
.small li { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0 20px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.small li:first-child { border-top: 0; }
.small .d { color: var(--ink-2); }
.small .t { color: var(--ink); }
@media (max-width: 640px) { .small li { grid-template-columns: minmax(0, 1fr); } }

.cv { list-style: none; margin: 0; padding: 0; }
.cv li { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0 20px; padding: 10px 0; border-top: 1px solid var(--rule); }
.cv li:first-child { border-top: 0; padding-top: 0; }
.cv .org { font-weight: 560; letter-spacing: -.01em; }
.cv .role { color: var(--ink-2); }
@media (max-width: 640px) { .cv li { grid-template-columns: minmax(0, 1fr); } }

.prose p { color: var(--ink-2); margin: 0 0 14px; }
.prose p b { color: var(--ink); font-weight: 560; }
.courses { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; }
.courses span { white-space: nowrap; }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 72px var(--gutter) 40px; color: var(--ink-3); font-size: 13.5px; }
.foot a { color: var(--ink-2); }

/* ---------- notes (long-form pages) ---------- */
.note-head { padding: clamp(48px, 9vh, 88px) 0 8px; }
.note-head .kicker { font: 400 12.5px/1 var(--font-mono); color: var(--ink-3); margin: 0 0 18px; }
.note-head h1 { font-size: clamp(28px, 4.8vw, 38px); line-height: 1.12; font-weight: 600; letter-spacing: -.032em; margin: 0 0 16px; }
.note-head .dek { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin: 0 0 18px; letter-spacing: -.01em; }
.note-head .byline { font-size: 14px; color: var(--ink-3); margin: 0; }
.tldr { margin: 34px 0 6px; padding: 18px 20px; border-radius: var(--radius); background: var(--paper-2); }
.tldr h2 { font: 500 12.5px/1 var(--font-mono); color: var(--ink-3); margin: 0 0 12px; }
.tldr ul { margin: 0; padding-left: 18px; }
.tldr li { margin: 0 0 8px; }
.tldr li:last-child { margin-bottom: 0; }
.note { padding-bottom: 8px; }
.note h2 { font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; margin: 52px 0 14px; }
.note h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; margin: 30px 0 8px; }
.note p, .note li { color: var(--ink-2); }
.note p { margin: 0 0 16px; }
.note ul, .note ol { padding-left: 20px; margin: 0 0 16px; }
.note li { margin: 0 0 7px; }
.note strong, .note b { color: var(--ink); font-weight: 560; }
.note em { color: var(--ink); }
.note code { font: 13.5px var(--font-mono); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.note blockquote { margin: 0 0 16px; padding: 2px 0 2px 16px; border-left: 2px solid var(--accent); color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 6px 0 20px; }
.note table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.note th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12.5px; padding: 0 12px 8px 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.note td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); vertical-align: top; }
.note td.n, .note th.n { text-align: right; }
.note tr.key td { color: var(--ink); font-weight: 560; }
.back { display: inline-block; margin: 40px 0 0; font-size: 14.5px; }

/* ---------- test page /v2: a picture beside each piece of work; Inquire and Crossword Studio lead ---------- */
.works { list-style: none; margin: 0; padding: 0; }
.work { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 0 22px; align-items: start; padding: 22px 0; border-top: 1px solid var(--rule); }
.work:first-child { padding-top: 0; border-top: 0; }
.demos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.demo .pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); transition: border-color .15s var(--ease); }
.demo .pic:hover { border-color: var(--ink-3); }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.demo .pic svg { display: block; width: 100%; height: 100%; padding: 14px; box-sizing: border-box; font-family: var(--font-mono); }
.demo h3 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; margin: 14px 0 3px; }
.demo h3 a { text-decoration: none; }
.demo h3 a:hover { text-decoration: underline; }
.demo .meta, .work .meta { font-size: 14px; color: var(--ink-3); margin: 0 0 7px; }
.demo .meta a, .work .meta a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: .2em; }
.demo .meta a:hover, .work .meta a:hover { text-decoration-color: currentColor; }
.demo .desc { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.thumb, .shot { display: block; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); transition: border-color .15s var(--ease); }
.thumb { aspect-ratio: 3 / 2; }
.shot { margin: 16px 0 0; }
.thumb:hover, .shot:hover { border-color: var(--ink-3); }
.thumb img, .shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot img { height: auto; }
.thumb svg { display: block; width: 100%; height: 100%; padding: 8px 6px 4px; box-sizing: border-box; font-family: var(--font-mono); overflow: visible; }
.work h3 { font-size: 16.5px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; margin: 0 0 3px; }
.work h3 a { text-decoration: none; }
.work h3 a:hover { text-decoration: underline; }
.work .desc { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.work .desc b { color: var(--ink); font-weight: 560; }
.works + .small { margin-top: 18px; border-top: 1px solid var(--rule); }
.works + .small li:first-child { border-top: 0; }
@media (max-width: 600px) {
  .demos { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .work { grid-template-columns: minmax(0, 1fr); gap: 12px 0; padding: 24px 0; }
  .thumb { max-width: 440px; }
}
.thumb .img-dark, .shot .img-dark, .pic .img-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .thumb .img-dark, :root:not([data-theme="light"]) .shot .img-dark, :root:not([data-theme="light"]) .pic .img-dark { display: block; }
  :root:not([data-theme="light"]) .thumb .img-light, :root:not([data-theme="light"]) .shot .img-light, :root:not([data-theme="light"]) .pic .img-light { display: none; }
  :root:not([data-theme="light"]) .thumb .paper { filter: brightness(.86); }
}
:root[data-theme="dark"] .thumb .img-dark, :root[data-theme="dark"] .shot .img-dark, :root[data-theme="dark"] .pic .img-dark { display: block; }
:root[data-theme="dark"] .thumb .img-light, :root[data-theme="dark"] .shot .img-light, :root[data-theme="dark"] .pic .img-light { display: none; }
:root[data-theme="dark"] .thumb .paper { filter: brightness(.86); }
/* The crossword figure types its theme answers in once it is on screen (site.js); still under reduced motion. */
.js [data-typeset]:not(.play) .cw-letter { opacity: 0; }
[data-typeset].play .cw-letter { animation: cw-type .2s ease-out both; }
@keyframes cw-type { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .js [data-typeset]:not(.play) .cw-letter { opacity: 1; }
  [data-typeset].play .cw-letter { animation: none; }
}
.home .label { font: 500 13px/1 var(--font-sans); letter-spacing: 0; }
@media (max-width: 400px) { .top nav { gap: 15px; font-size: 14px; } }
