/* viatsko.me — shared styles for the card and the notes. */
/* Self-hosted faces (latin subset, variable); same files as www/landing. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", "Inter", var(--sans);
  --bg: #FBFAF7;
  --ink: #1C2127;
  --muted: #5C6670;
  --rule: #D9D4C9;
  --accent: #2F6F5E;
  --paper: #FFFFFF; /* diagram and content panels */
}
/* Whitepaper design: light only — documentation reads better on paper. */
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
}

/* --- Home card --- */
body.card {
  display: grid;
  place-items: center;
}
body.card main { max-width: 34rem; width: 100%; }
h1 {
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .35rem;
}
.role {
  font: 500 .8125rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 2rem;
}
p.lede { margin: 0 0 2.25rem; color: var(--muted); }
hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0 0 1.25rem;
}
.contact, .elsewhere {
  font: 400 .9375rem/1.5 var(--sans);
  color: var(--muted);
  margin: 0;
}
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); }

/* --- Notebook pages --- */
body.page { display: block; }
body.page main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

/* Entry pages: the article column stays centered at full page width; the
   sidebar sits fixed in the left margin and only appears once the viewport
   is wide enough that it cannot overlap the column. */
.shell { min-width: 0; }
.shell article { min-width: 0; }
.sidebar { display: none; }
@media (min-width: 74rem) {
  body.page main:has(.shell) { max-width: none; }
  body.page main:has(.shell) .crumbs,
  .shell article {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
  }
  .sidebar { display: block; }
  .sidebar nav {
    position: fixed;
    top: 5.5rem;
    left: 24px;
    width: 13rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    font: 400 .9375rem/1.5 var(--sans);
  }
  .sidebar-title {
    font: 500 .8125rem/1.4 var(--sans);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 .75rem;
  }
  .sidebar-title a { color: var(--accent); text-decoration: none; }
  .sidebar-title a:hover { text-decoration: underline; }
  .sidebar ul { list-style: none; margin: 0; padding: 0; }
  .sidebar li { margin: 0 0 .1rem; }
  .sidebar li a {
    display: block;
    padding: .3rem .6rem;
    border-left: 2px solid var(--rule);
    color: var(--muted);
    text-decoration: none;
  }
  .sidebar li a:hover { color: var(--ink); border-left-color: var(--accent); }
  .sidebar li a[aria-current="page"] {
    color: var(--ink);
    border-left-color: var(--accent);
    font-weight: 600;
  }
}
.crumbs {
  font: 500 .8125rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
}
.crumbs a {
  color: var(--accent);
  text-decoration: none;
}
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--rule); margin: 0 .5rem; }
body.page h1 { margin-bottom: .5rem; }
.entry-date {
  font: 400 .8125rem/1.4 var(--sans);
  color: var(--muted);
  margin: 0 0 2.5rem;
}
body.page h2 {
  font-size: 1.35rem;
  font-weight: 500;
  margin: 2.5rem 0 .75rem;
}
body.page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 .5rem;
}
body.page p, body.page li { color: var(--ink); }
body.page ul, body.page ol { padding-left: 1.25rem; }
code {
  font: 400 .875em/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  background: color-mix(in srgb, var(--rule) 35%, transparent);
  border-radius: 4px;
  padding: .1em .35em;
}
pre {
  background: color-mix(in srgb, var(--rule) 25%, transparent);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font: 400 .8125rem/1.6 ui-monospace, "SF Mono", Menlo, monospace;
}
pre code { background: none; padding: 0; font: inherit; }

/* Prism token colors (build-time highlighting), tuned to the paper palette. */
.token.comment, .token.prolog, .token.cdata { color: #8A94A6; font-style: italic; }
.token.punctuation { color: #5C6670; }
.token.keyword, .token.atrule, .token.important { color: #7C3AED; }
.token.string, .token.char, .token.attr-value { color: #2F6F5E; }
.token.number, .token.boolean, .token.constant, .token.symbol { color: #B45309; }
.token.function, .token.selector, .token.attr-name { color: #1D4ED8; }
.token.class-name, .token.builtin, .token.tag { color: #9D174D; }
.token.operator, .token.entity, .token.url { color: #0F766E; }
.token.regex, .token.variable { color: #A16207; }
blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
}
th, td {
  text-align: left;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--rule);
}
th {
  font: 600 .8125rem/1.4 var(--sans);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Diagrams: rendered to static SVG at build time, shown on a paper panel
   so they stay legible in dark mode. */
figure.diagram {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
figure.diagram img {
  display: block;
  max-width: 100%;
  max-height: 34rem;
  width: auto;
  height: auto;
  margin: 0 auto;
}
figure.diagram figcaption {
  margin-top: 1rem;
  font: 400 .8125rem/1.5 var(--sans);
  color: #5C6670;
  text-align: center;
}

/* Company mark next to catalog links and sidebar groups: a real logo
   (inline SVG from simple-icons), or a letter badge when none is usable. */
.cicon {
  display: inline-block;
  width: .95em;
  height: .95em;
  vertical-align: -0.08em;
  margin: 0 .3em 0 .35em;
}
.cicon-letter {
  border-radius: 4px;
  color: #fff;
  font: 700 .68em/1.45 var(--sans);
  text-align: center;
}
.sidebar .cicon, h3 .cicon { margin-left: 0; margin-right: .45em; }

/* Sidebar company and category groups */
.sidebar-company {
  font: 600 .875rem/1.4 var(--sans);
  margin: 1.5rem 0 .25rem;
}
.sidebar-cat {
  font: 600 .6875rem/1.4 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: .75rem 0 .25rem;
  padding-left: .6rem;
}

/* Notes index */
.entry-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.entry-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry-list li:first-child { border-top: 1px solid var(--rule); }
.entry-list a {
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
}
.entry-list a:hover { color: var(--accent); }
.entry-list .when {
  font: 400 .8125rem/1.4 var(--sans);
  color: var(--muted);
  margin: .15rem 0 .35rem;
}
.entry-list .summary { margin: 0; color: var(--muted); font-size: .9875rem; }
