/* halilneed.agency: one stylesheet for every page. System fonts, no scripts.
   Grid: a 44rem frame. Labels sit on its left edge (x0), text starts after
   the 13rem rail (x1). Below 48rem everything is one column. */

/* 1. Tokens */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111;      /* 18.1:1 on bg */
  --muted: #666;     /* 5.7:1 on bg, 5.3:1 on surface */
  --line: #e6e6ea;   /* hairlines */
  --rule: #8c8c8c;   /* link underlines, input borders: 3.4:1 */
  --surface: #f1f1f4;
  --mark: #e3e3e8;    /* highlighted personal data and labels */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --page: 44rem;
  --rail: 13rem;
  --gap: 1.5rem;
  --gutter: 1.25rem;
  --measure: 35rem;
  --small: .9375rem; /* 15px */
  --tiny: .875rem;   /* 14px, the floor */
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre, table { margin: 0; }
ul, ol { padding: 0; }
[id] { scroll-margin-top: 1.5rem; }
p, li, dd, figcaption { text-wrap: pretty; }
strong, b { font-weight: 600; }

/* 3. Headings */
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(1.875rem, 1.45rem + 2.2vw, 2.5rem); line-height: 1.12; letter-spacing: -.024em; }
h2 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -.014em; }
h3 { font-size: 1.125rem; line-height: 1.4; letter-spacing: -.006em; }
h4 { font-size: 1.0625rem; line-height: 1.5; }

/* 4. Links and focus */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: max(1px, .06em);
  text-underline-offset: .22em;
  transition: color .12s, text-decoration-color .12s;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
pre:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { a { transition: none; } }

/* 5. Helpers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -5rem; z-index: 1;
  padding: .5rem .75rem; border-radius: 4px;
  background: var(--text); color: var(--bg); text-decoration: none;
}
.skip-link:focus { top: .5rem; }
.small, .entry-meta, figcaption, caption { font-size: var(--small); line-height: 1.5; color: var(--muted); }
.nowrap { white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; }

/* 6. Frame: header, breadcrumb, main, footer share one left edge */
.site-header, .breadcrumb, main, .site-footer {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-header {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  column-gap: 1.5rem; padding-block: .75rem;
}
.site-name { padding-block: .5rem; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.site-header ul, .toc ul { display: flex; flex-wrap: wrap; column-gap: 1.25rem; list-style: none; }
.site-header nav a, .toc a {
  display: inline-block; padding-block: .5625rem; /* 42px tap target */
  font-size: var(--small); color: var(--muted); text-decoration: none;
}
.site-header nav a:hover, .toc a:hover, .site-header nav [aria-current] { color: var(--text); }

/* language switch, top right on every page: TR | EN */
.site-name { order: 1; }
.lang-switch { order: 2; margin-left: auto; align-self: center; display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.lang-switch a { display: inline-block; min-width: 2.25rem; padding: .25rem .6rem; border-radius: 999px; font-size: var(--tiny); font-weight: 600; letter-spacing: .02em; line-height: 1.4; text-align: center; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current] { background: var(--text); color: var(--bg); }
.site-header nav { order: 3; flex-basis: 100%; }
@media (min-width: 48rem) {
  .site-header nav { order: 2; flex-basis: auto; margin-left: auto; }
  .lang-switch { order: 3; margin-left: 0; }
}

.breadcrumb { margin-top: 1.5rem; font-size: var(--small); color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-inline: .5rem; color: var(--rule); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover, .breadcrumb [aria-current] { color: var(--text); }

.site-footer { margin-top: clamp(4rem, 12vw, 7rem); font-size: var(--small); color: var(--muted); }
.site-footer > div { padding-block: 2rem 4rem; border-top: 1px solid var(--line); }
.site-footer .links { margin-top: .5rem; color: var(--text); }
.site-footer .small { margin-top: .5rem; }

/* 7. Page head: h1, lead, links, key facts, on-page contents */
.page-head { padding-top: clamp(2.5rem, 9vw, 5rem); }
.breadcrumb + main .page-head { padding-top: 1.5rem; }
.page-head > * + * { margin-top: 1.25rem; }
.page-head > p { max-width: var(--measure); }
.page-head > .lead { max-width: 40rem; font-size: 1.1875rem; line-height: 1.5; letter-spacing: -.008em; }
.page-head > .links { margin-top: 1.5rem; }
.page-head > :is(.kv, .table-scroll) { margin-top: 2.5rem; }
.toc { margin-top: 2.5rem; border-block: 1px solid var(--line); }

/* 8. Sections of an index page: label in the rail, content beside it */
.section {
  margin-top: clamp(4rem, 12vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.section > h2 { font-size: 1.25rem; }
.section > h2 + * { margin-top: .75rem; }
.section > * + * { margin-top: 1.25rem; }
.section > .links { margin-top: 1.5rem; }
.section > :first-child { margin-top: 0; }

/* 9. Entry: title, meta, description, result, links */
.entry { margin-top: 2.5rem; }
.entry + .entry { margin-top: 3rem; }
.entry-title { font-size: 1.0625rem; line-height: 1.45; letter-spacing: 0; }
.entry--lead > .entry-title { font-size: 1.375rem; line-height: 1.25; letter-spacing: -.014em; }
.entry-meta { margin-top: .375rem; }
.entry-meta span + span::before { content: "\00b7"; margin-inline: .2em .5em; }
.entry-body { margin-top: .75rem; }
.entry-body > * + * { margin-top: 1rem; }
.entry-body > figure { margin-block: 1.5rem; }
.entries-compact { margin-top: .5rem; }
.entries-compact > .entry { margin-top: 2rem; }
.entries-compact .entry-body { margin-top: .25rem; }
.entries-compact .entry-meta + .entry-body { margin-top: .5rem; }

/* 10. Dated list, posts (date, title, summary) and key/value list */
.dated { margin-top: 2.5rem; list-style: none; }
.dated li { line-height: 1.45; }
.dated li + li { margin-top: 1.125rem; }
.dated time { display: block; font: var(--tiny)/1.6 var(--mono); color: var(--muted); }
.post + .post { margin-top: 1.75rem; }
.post time { display: block; font: var(--tiny)/1.6 var(--mono); color: var(--muted); }
.post h3 { font-size: 1.0625rem; line-height: 1.45; letter-spacing: 0; }
.post p { margin-top: .25rem; font-size: var(--small); line-height: 1.5; color: var(--muted); }
.kv { margin-top: 2.5rem; }
.kv > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); column-gap: 1rem; align-items: baseline; }
.kv > div + div { margin-top: .5rem; }
.kv dt { font-size: var(--small); color: var(--muted); }

/* 11. Labelled example, figures, code */
.example, pre {
  margin-inline: calc(-1 * var(--gutter));
  padding: 1rem var(--gutter);
  background: var(--surface);
}
.example > div + div { margin-top: .75rem; }
.example dt { font-size: var(--small); line-height: 1.5; color: var(--muted); }
.example dd, .mono { font: var(--tiny)/1.6 var(--mono); overflow-wrap: anywhere; }
figcaption { margin-top: .75rem; }
mark { padding: .1em .3em; border-radius: 3px; background: var(--mark); color: inherit; }
code, kbd, samp { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.small code, .entry-meta code, .note code, table code, figcaption code { font-size: var(--tiny); }
.example code { font-size: inherit; }
abbr[title] { text-decoration: none; cursor: help; }
pre { overflow-x: auto; scrollbar-width: thin; font: var(--tiny)/1.6 var(--mono); tab-size: 4; }
pre code { display: inline-block; padding-right: var(--gutter); font: inherit; overflow-wrap: normal; white-space: pre; }

/* 12. Tables: scroll inside their own region */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--small); line-height: 1.5; }
caption { padding: 0 max(0px, 100% - var(--measure)) .75rem 0; text-align: left; }
.caption-below caption { caption-side: bottom; padding-block: .75rem 0; }
th, td { padding: .5rem 1rem .5rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 600; }
tbody th { font-weight: 400; }
.num { width: 4.25rem; text-align: right; white-space: nowrap; font-family: var(--mono); font-size: var(--tiny); }
.num:last-child { width: 3.25rem; }
td.dim { color: var(--muted); }
thead .num { font-family: inherit; font-size: inherit; }
.col-s { width: 8.5rem; }
.col-m { width: 16rem; }

/* 13. Prose: article pages */
.prose > section { margin-top: 4rem; }
.prose section > * { max-width: var(--measure); }
.prose section > :is(pre, figure, .table-scroll, .example) { max-width: none; }
.prose section > * + * { margin-top: 1.25rem; }
.prose section > h2 + * { margin-top: 1rem; }
.prose section > h3 { margin-top: 2.5rem; }
.prose section > h4 { margin-top: 2rem; }
.prose section > :is(h3, h4) + * { margin-top: .5rem; }
.prose section > h2 + h3 { margin-top: 1.25rem; }
.prose section > :is(pre, .table-scroll, figure, .example) { margin-block: 1.75rem; }
.prose section > :is(ul, ol):not(.links) { padding-left: 1.25rem; }
.prose section > :is(ul, ol):not(.links) > li + li { margin-top: .625rem; }
.prose li::marker { color: var(--muted); }
.prose ol > li::marker { font-size: var(--small); font-variant-numeric: tabular-nums; }

/* 14. FAQ: native details */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
.prose section > details + details, details + details { margin-top: 0; }
summary {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding-block: .8125rem; font-weight: 500; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; content: "+" / ""; font-weight: 400; color: var(--muted); }
details[open] > summary::after { content: "\2212"; content: "\2212" / ""; }
details > :not(summary) { padding-bottom: 1.125rem; }

/* 15. Note / aside, and the one-line form */
.note { font-size: var(--small); line-height: 1.6; color: var(--muted); }
.note > * + * { margin-top: .75rem; }
.note :is(h2, h3, h4) { font-size: var(--small); line-height: 1.6; letter-spacing: 0; color: var(--text); }
.note .links { color: var(--text); }
.section > .note { margin-top: 3.5rem; }
.inline-form { display: flex; gap: .5rem; max-width: 26rem; }
.inline-form input, .inline-form button {
  min-height: 2.75rem; padding: .5rem .875rem; border: 1px solid var(--rule); border-radius: 6px; font: inherit;
}
.inline-form input { flex: 1; min-width: 0; background: transparent; color: inherit; }
.inline-form button { border-color: var(--text); background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; }
.inline-form button:hover { border-color: var(--muted); background: var(--muted); }

/* 16. Small screens: a wide table can stack its cells */
@media (max-width: 47.99rem) {
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stack :is(tbody, tr, th, td) { display: block; }
  .stack :is(th, td) { padding: 0; border: 0; }
  .stack tr { padding-block: 1.125rem; border-bottom: 1px solid var(--line); }
  .stack tr:first-child { padding-top: 0; }
  .stack tbody th { font-size: 1.0625rem; font-weight: 600; }
  .stack td::before {
    content: attr(data-label); display: block; margin-top: .625rem;
    font: var(--small)/1.5 var(--sans); color: var(--muted);
  }
  .stack td[data-label=""]::before { content: none; }
  .stack .num { width: auto; text-align: left; white-space: normal; }
}

/* 17. Wide screens: the rail */
@media (min-width: 48rem) {
  .site-header { padding-block: 1.5rem; }
  .page-head > .lead { font-size: 1.25rem; }
  .site-header ul { column-gap: 1.75rem; }
  .toc ul { column-gap: 1.75rem; }

  .section, .entry, .dated li, .kv > div, .example > div, .section > .note, .site-footer > div {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    column-gap: var(--gap);
    align-items: baseline;
  }
  .section > *, .section > .note > * { grid-column: 2; }
  .section > h2, .section > .note > :is(h3, h4) { grid-column: 1; }
  .section > :is(.entry, .dated, .kv, .note, .entries-compact) { grid-column: 1 / -1; }
  .section > h2 + *, .section > h2 + .links, .section > .note > :is(h3, h4) + * { margin-top: 0; }

  .entry { grid-template-rows: auto 1fr; }
  .entry-title { grid-area: 1 / 1; }
  .entry-meta { grid-area: 2 / 1; }
  .entry-meta span { display: block; }
  .entry-meta span + span::before { content: none; }
  .entry-body, .entries-compact .entry-body { grid-area: 1 / 2 / 3 / 3; margin-top: 0; }
  .entry--lead { grid-template-rows: auto auto; }
  .entry--lead > .entry-title { grid-column: 1 / -1; margin-bottom: 1rem; font-size: 1.5rem; }
  .entry--lead > .entry-meta { margin-top: 0; }
  .entry--lead > .entry-body { grid-row: 2; }
  .entry-body > figure { margin-left: calc(-1 * (var(--rail) + var(--gap))); }
  .entry-body > figure > figcaption { margin-left: calc(var(--rail) + var(--gap)); }

  th, td { padding-right: 1.5rem; }
  .num { width: 5.5rem; }
  .num:last-child { width: 4rem; }
  .dated li + li { margin-top: 1rem; }
  .dated time { display: inline; }
  .example, pre { border-radius: 8px; }
  .example { padding-block: 1.125rem; }
  .example > div + div { margin-top: .5rem; }
  .prose .example > div { grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 0; } /* lines up with .col-s */
  .site-footer .links, .site-footer .small { grid-column: 2; }
  .site-footer .links { margin-top: 0; }
  .prose section > :is(ul, ol):not(.links) { padding-left: 0; }
}

/* ==========================================================================
   18. Accent, cards and motion
   One accent, used for the collection title, focus and hover. Cards lift on
   hover. Everything that moves is switched off under prefers-reduced-motion,
   and nothing is hidden unless site.js is running.
   ========================================================================== */
:root {
  --accent: #1b49b8;                 /* 7.8:1 on white */
  --accent-soft: color-mix(in srgb, var(--accent) 7%, var(--bg));
  --accent-line: color-mix(in srgb, var(--accent) 32%, var(--line));
  --card: #fff;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 20px rgb(0 0 0 / .04);
  --shadow-up: 0 2px 6px rgb(0 0 0 / .04), 0 12px 32px rgb(0 0 0 / .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html { overflow-x: clip; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline-color: var(--accent); }
a:hover { text-decoration-color: var(--accent); }

/* sticky header with a full-width frosted band */
.site-header { position: sticky; top: 0; z-index: 20; }
.site-header::before {
  content: ""; position: absolute; inset: 0 -100vw; z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header nav a { position: relative; transition: color .2s; }
.site-header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .35rem; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.site-header nav a:hover::after, .site-header nav [aria-current]::after { transform: scaleX(1); }
[id] { scroll-margin-top: 7rem; }

/* wide pages: home, models, writing */
.wide { --page: 62rem; }
.wide .page-head h1 { font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.25rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 650; }
.hero h1 { font-size: clamp(2.25rem, 1.5rem + 3.4vw, 3.5rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 650; }
.block { margin-top: clamp(4.5rem, 11vw, 7.5rem); }
.block > h2 { font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.25rem); line-height: 1.12; letter-spacing: -.03em; }
.block > .block-lead { margin-top: .875rem; max-width: 40rem; font-size: 1.125rem; line-height: 1.55; color: var(--muted); }
.block > .block-body { margin-top: 2.25rem; }
.block > .links { margin-top: 1.75rem; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: .625rem; list-style: none; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.125rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text);
  font-size: var(--small); font-weight: 600; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: var(--accent-line); }
.btn--solid { border-color: var(--text); background: var(--text); color: var(--bg); }
.btn--solid:hover { border-color: var(--accent); background: var(--accent); color: var(--bg); }

/* hero */
.hero { position: relative; display: grid; gap: 2rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem; }
.hero-copy > * + * { margin-top: 1.25rem; }
.hero-copy .lead { max-width: 34rem; font-size: clamp(1.1875rem, 1.05rem + .6vw, 1.4375rem); line-height: 1.42; letter-spacing: -.012em; }
.hero-copy p:not(.lead) { max-width: 32rem; color: var(--muted); }
/* Three equal actions keep Medium aligned at every viewport width. */
.hero-copy .btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 25rem; margin-top: 1.5rem; }
.hero-copy .btns li { min-width: 0; }
.hero-copy .btn { justify-content: center; width: 100%; padding: .625rem .5rem; font-size: var(--tiny); white-space: nowrap; }
.hero-copy .hero-intro { font-size: 1rem; color: var(--muted); }
.hero-copy .hero-intro + h1 { margin-top: .75rem; }
@media (max-width: 59.99rem) {
  .hero { grid-template-columns: 1fr; }
  .hero .orbit { width: min(100%, 20rem); }
}

/* the masking demo */
.demo { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-up); overflow: hidden; }
.demo-tabs { display: flex; gap: .25rem; padding: .5rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.demo-tabs button {
  flex: 1; min-height: 2.25rem; padding: .25rem .5rem; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font: 500 var(--tiny)/1.2 var(--sans); cursor: pointer; transition: background .25s, color .25s, box-shadow .25s;
}
.demo-tabs button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.demo-body { padding: 1.125rem 1.25rem 1.25rem; }
.demo-label { font-size: var(--tiny); color: var(--muted); }
.demo-label + p { margin-top: .25rem; }
.demo-instruction { min-height: 4.2em; font: var(--tiny)/1.6 var(--mono); color: var(--muted); transition: opacity .3s; }
.demo-text { margin-top: .25rem; min-height: 3.6em; font: .9375rem/1.8 var(--mono); overflow-wrap: anywhere; }
.demo-text mark { transition: background .35s, color .35s; }
.demo-text mark.is-on { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent); font-weight: 600; animation: pop .45s var(--ease); }
@keyframes pop { 0% { opacity: 0; transform: translateY(.3em) scale(.92); filter: blur(3px); } 100% { opacity: 1; transform: none; filter: none; } }
.demo-text mark { display: inline-block; }
.demo-foot { padding: .75rem 1.25rem; border-top: 1px solid var(--line); font-size: var(--tiny); line-height: 1.5; color: var(--muted); }
.demo-status { display: inline-flex; align-items: center; gap: .4rem; }
.demo-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--rule); transition: background .3s; }
.demo.is-masked .demo-status::before { background: var(--accent); }

/* collection of repositories, in the manner of a Hub collection */
.collection {
  padding: clamp(.875rem, 2.5vw, 1.375rem); border: 1px solid var(--accent-line); border-radius: 20px;
  background: linear-gradient(180deg, var(--accent-soft), var(--bg) 11rem);
}
.collection-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .25rem .375rem 1rem; }
.collection-title { font-size: 1.3125rem; font-weight: 650; letter-spacing: -.02em; color: var(--accent); text-decoration: none; }
.collection-title:hover { text-decoration: underline; }
.collection-desc { margin-top: .125rem; font-size: var(--small); color: var(--muted); }
.collection-more { flex: none; font-size: var(--small); color: var(--accent); text-decoration: none; }
.repo {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .375rem 1.5rem; padding: 1rem 1.125rem;
  border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.repo + .repo { margin-top: .625rem; }
.repo:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: var(--accent-line); }
.repo-id { display: flex; align-items: center; gap: .5rem; font: 500 1.0625rem/1.4 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
.repo-id::before { content: ""; flex: none; width: .875rem; height: .875rem; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--text))); }
.repo-desc { font-size: var(--small); line-height: 1.5; color: var(--muted); }
.repo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .125rem .875rem; margin-top: .125rem; font-size: var(--tiny); color: var(--muted); }
.repo-meta > span { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.repo-meta svg { width: .875rem; height: .875rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.repo-stat b { font: 650 1.5rem/1.1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.repo-stat span { display: block; font-size: var(--tiny); color: var(--muted); }
.collection-sub { margin: 1.25rem .375rem .625rem; font-size: var(--small); font-weight: 600; color: var(--muted); }

/* generic cards: writing, tools */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap: .875rem; list-style: none; }
.card {
  position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.25rem 1.125rem;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
a.card:hover, .card:has(> .card-title a:hover) { transform: translateY(-3px); box-shadow: var(--shadow-up); border-color: var(--accent-line); }
.card-kicker { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font: var(--tiny)/1.5 var(--mono); color: var(--muted); }
.card-title { font-size: 1.125rem; line-height: 1.3; letter-spacing: -.018em; font-weight: 600; text-wrap: balance; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* whole card is the link */
.card-text { font-size: var(--small); line-height: 1.55; color: var(--muted); }
.card-text a { position: relative; z-index: 1; color: var(--text); }
.card-foot { margin-top: auto; padding-top: .5rem; font-size: var(--tiny); font-weight: 600; color: var(--muted); transition: color .25s; }
.card-foot::after { content: " \2192"; display: inline-block; margin-left: .15em; transition: transform .3s var(--ease); }
.card:hover .card-foot { color: var(--accent); }
.card:hover .card-foot::after { transform: translateX(4px); }
.card--feature { background: linear-gradient(160deg, var(--accent-soft), var(--card) 60%); border-color: var(--accent-line); }
.card--feature .card-title { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.625rem); letter-spacing: -.025em; }
.card--mono .card-title { font-family: var(--mono); font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; }

/* benchmark bars */
.story { display: grid; gap: 2rem 3rem; margin-top: 3rem; align-items: start; }
.story h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.story-text > * + * { margin-top: 1rem; }
.page-head + .collection { margin-top: 2.5rem; }
.page-head + .block { margin-top: 3rem; }
.page-head + .collection + .small { margin-top: 1rem; }
.bars { padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.bars figcaption { margin: 0 0 1rem; }
.bars ol { display: grid; gap: .875rem; list-style: none; }
.bars li { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr) 3rem; align-items: center; gap: .75rem; font-size: var(--small); }
.bars .track { height: .625rem; border-radius: 999px; background: var(--surface); overflow: hidden; }
.bars .fill { display: block; width: calc(var(--v) * 100%); height: 100%; border-radius: inherit; background: var(--rule); transform-origin: left; }
.bars li:last-child .fill { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, var(--rule)), var(--accent)); }
.bars b { font: 600 var(--small)/1 var(--mono); text-align: right; }
.bars small { display: block; margin-top: 1rem; font-size: var(--tiny); line-height: 1.5; color: var(--muted); }

/* about */
.about { display: grid; gap: 2rem 3rem; align-items: start; }
.about-text > * + * { margin-top: 1rem; }
.about .kv { margin-top: 0; padding: 1.125rem 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }

/* scroll reveal: site.js adds .rv to what is below the fold, then .in */
.rv { opacity: 0; transform: translate3d(0, 18px, 0); }
.rv.in { opacity: 1; transform: none; transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s); }
.rv .fill { transform: scaleX(0); }
.rv.in .fill { transform: none; transition: transform 1.1s var(--ease) .15s; }
.rv.in li:nth-child(2) .fill { transition-delay: .3s; }
.rv.in li:nth-child(3) .fill { transition-delay: .45s; }

@media (min-width: 48rem) {
  .repo { grid-template-columns: minmax(0, 1fr) auto; }
  .repo-stat { grid-column: 2; grid-row: 1 / span 3; align-self: center; text-align: right; }
  .cards--2 { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3.5rem; }
  .story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .rv .fill { opacity: 1; transform: none; }
  .btn, .repo, .card, .demo-text mark, .site-header nav a::after, .card-foot::after { transition: none; animation: none; }
  .btn:hover, .repo:hover, a.card:hover, .card:has(> .card-title a:hover) { transform: none; }
}

/* 19. The hero figure, the services row, the showcase row.
   Four icon tiles on a loop around a core. A dot travels the loop in 16 s and
   each tile lights up as it arrives (same cycle, offset by a negative delay). */
.orbit { position: relative; width: min(100%, 27rem); aspect-ratio: 1; margin-inline: auto; }
.orbit > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit-track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.orbit-flow { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 2 14; opacity: .55; animation: flow 1.6s linear infinite; }
.orbit-spoke { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 6; }
.orbit-dot { fill: var(--accent); }
.orbit-glow { fill: var(--accent); opacity: .22; }
@keyframes flow { to { stroke-dashoffset: -16; } }
.orbit ol { list-style: none; }
.node {
  position: absolute; left: var(--x); top: var(--y); width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 26%;
  background: var(--card); box-shadow: var(--shadow-up); color: var(--muted);
  animation: node-on 16s infinite both; animation-delay: var(--t, 0s);
}
.node svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.node span {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: .55rem; white-space: nowrap;
  padding: .05rem .45rem; border-radius: 999px; background: var(--bg);
  font-size: var(--tiny); font-weight: 600; letter-spacing: -.005em; color: var(--muted);
  animation: label-on 16s infinite both; animation-delay: var(--t, 0s);
}
@keyframes node-on {
  0%, 21% { color: var(--accent); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.09);
            box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 13%, transparent), 0 18px 44px color-mix(in srgb, var(--accent) 30%, transparent); }
  27%, 100% { color: var(--muted); border-color: var(--line); transform: translate(-50%, -50%); box-shadow: var(--shadow-up); }
}
@keyframes label-on { 0%, 21% { color: var(--text); } 27%, 100% { color: var(--muted); } }
.core {
  position: absolute; left: 50%; top: 50%; width: 21%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; color: var(--card);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 62%, color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 42%, transparent);
  font: 700 clamp(1rem, .7rem + 1.4vw, 1.5rem)/1 var(--sans); letter-spacing: -.02em;
}
.core::before, .core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); animation: ring 3.2s var(--ease) infinite; }
.core::after { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(1); opacity: .6; } to { transform: scale(2.3); opacity: 0; } }
.card-title--plain { font-size: 1.1875rem; }
.showcase { display: grid; gap: 2rem 3rem; margin-top: 3rem; align-items: center; }
.showcase h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.showcase-text > * + * { margin-top: 1rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.75rem; }
.cta p { color: var(--muted); }
@media (min-width: 60rem) { .showcase { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } }
@media (prefers-reduced-motion: reduce) {
  .node, .node span, .orbit-flow, .core::before, .core::after { animation: none; }
  .orbit-dot, .orbit-glow { display: none; }
}

/* 20. Guides: a cover beside its description */
.guide {
  display: grid; gap: 1.25rem 1.75rem; align-items: start; padding: 1.25rem;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow);
}
.guide + .guide { margin-top: .875rem; }
.guide-cover { display: block; width: 100%; max-width: 10.5rem; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.guide-body > * + * { margin-top: .625rem; }
.guide-title { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.5rem); line-height: 1.2; letter-spacing: -.022em; }
.guide-text { max-width: 36rem; color: var(--muted); }
.guide-list { display: flex; flex-wrap: wrap; gap: .375rem; list-style: none; }
.guide-list li { padding: .15rem .65rem; border-radius: 999px; background: var(--surface); font-size: var(--tiny); font-weight: 600; }
.guide-body .btn { margin-top: .375rem; }
.plain { list-style: none; }
.plain li + li { margin-top: .5rem; }
@media (min-width: 40rem) { .guide { grid-template-columns: 10.5rem minmax(0, 1fr); padding: 1.5rem; } }
/* three guides side by side, equal height, buttons on one line at the bottom */
.gcards { display: grid; gap: .875rem; grid-template-columns: minmax(0, 1fr); list-style: none; }
.gcard { display: flex; flex-direction: column; gap: .625rem; padding: 1rem 1rem 1.125rem; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.gcard-cover { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gcard .guide-title { font-size: 1.1875rem; }
.gcard .guide-title a { text-decoration: none; }
.gcard .guide-text { font-size: var(--small); line-height: 1.55; }
.gcard .btns { margin-top: auto; padding-top: .375rem; }
.gcard .btns { flex-wrap: nowrap; gap: .375rem; }
.gcard .btns .btn { margin-top: 0; padding-inline: .8rem; font-size: var(--tiny); white-space: nowrap; }
@media (min-width: 48rem) { .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 21. Masking tool (/masking-tool/): two text areas, options, restore */
.prose section > .tool { max-width: none; }
.tool { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.tool > * + * { margin-top: 1.5rem; }
.tool fieldset { margin-inline: 0; margin-bottom: 0; padding: 0; border: 0; min-width: 0; }
.tool .field, .tool legend { display: block; margin-bottom: .375rem; padding: 0; font-size: var(--small); font-weight: 600; }
.tool textarea, .tool input[type="text"] {
  display: block; width: 100%; padding: .625rem .75rem; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--bg); color: inherit;
}
.tool textarea { min-height: 9rem; font: var(--tiny)/1.6 var(--mono); resize: vertical; tab-size: 4; }
.tool input[type="text"] { min-height: 2.75rem; font: inherit; font-size: var(--small); }
.tool textarea[readonly] { border-color: var(--line); background: var(--surface); }
.tool :is(textarea, input[type="text"]):focus-visible { outline-offset: 1px; border-color: var(--accent); }
.tool .small { margin-top: .375rem; }
.checks { display: flex; flex-wrap: wrap; gap: .125rem 1.25rem; font-size: var(--small); }
.checks label { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.25rem; cursor: pointer; }
.checks input { width: 1.0625rem; height: 1.0625rem; margin: 0; accent-color: var(--accent); }
.tool .btns { margin-top: .75rem; }
.tool button.btn { font-family: inherit; cursor: pointer; }
.tool label.btn { cursor: pointer; }
.tool label.btn:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.tool-status { min-height: 1.5em; margin-top: .5rem; font-size: var(--small); line-height: 1.5; color: var(--muted); }
.tool-restore { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tool-restore > * + * { margin-top: .75rem; }
.tool-restore > p { max-width: var(--measure); font-size: var(--small); color: var(--muted); }
@media (min-width: 48rem) { .tool { padding: 1.5rem; } }
