/* Theme "Log Kerja" (21 Oct 2026). Base tokens: konsul_codex.md section 1.
   Derived tokens (surface, line, layer-*) checked with the WCAG formula: text and muted text stay >= 4.5:1
   on every surface they sit on. No JavaScript, no third-party assets; fonts are self-hosted (SIL OFL, see fonts/). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/schibsted-grotesk-latin-1061523f.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  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: "Schibsted Grotesk";
  src: url("/assets/schibsted-grotesk-italic-latin-68f1bb84.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
  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: "Spline Sans Mono";
  src: url("/assets/spline-sans-mono-latin-b2462d40.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  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 {
  color-scheme: light dark;
  --bg: #F0F4F8;
  --text: #172B3A;
  --muted: #42596B;
  --accent: #125B73;
  --surface: #FAFCFD;
  --line: #C9D5DE;
  --layer-1: #E1EAF0;
  --layer-2: #D2E0E8;
  --layer-3: #C3D6E0;
  --tick: #B4CBD8;
  --base-bg: #172B3A;
  --base-text: #F0F4F8;

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 72rem;
  --rail: 15rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14232E;
    --text: #EDF3F7;
    --muted: #B0C0CC;
    --accent: #80CEE3;
    --surface: #1A2C39;
    --line: #33495A;
    --layer-1: #1C3140;
    --layer-2: #213A4B;
    --layer-3: #264356;
    --tick: #2B4C61;
    --base-bg: #0B161E;
    --base-text: #EDF3F7;
  }
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote, pre { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--sans); }
#content { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
code, pre { font-family: var(--mono); font-size: .875em; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
#content:focus { outline: none; }
[id] { scroll-margin-top: 1rem; }

.container { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  padding: .6rem .9rem; background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: .75rem; }

/* header and footer, shared by every public page */
.site-header { border-bottom: 1px solid var(--line); }
.site-header-inner {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 2rem; padding-block: 1rem;
}
.site-name { color: var(--text); font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.site-nav a { color: var(--text); text-decoration: none; padding-block: .25rem; }
.site-nav a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: .875rem; }

/* hero */
.hero { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 { font-size: clamp(2.75rem, 8vw, 5.25rem); font-weight: 800; letter-spacing: -.035em; line-height: .95; }
.lede { margin-top: 1rem; max-width: 26ch; font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 500; line-height: 1.25; }
.intro { margin-top: 1.5rem; max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.75rem; }
.button {
  display: inline-block; padding: .7rem 1.1rem; border-radius: 4px;
  background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none;
}
.button:hover { background: var(--text); }

.hero-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.25rem; align-content: start; }
.portrait { width: 96px; height: 128px; }
.facts { display: grid; gap: .6rem; font-size: .9375rem; line-height: 1.4; }
.facts dt, .figures dt { color: var(--muted); font-size: .8125rem; }

.figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
  padding-block: 1.25rem; border-block: 1px solid var(--line);
}
.figures > div { display: flex; flex-direction: column-reverse; gap: .35rem; }
.figures dd { font: 500 clamp(1.75rem, 4vw, 2.5rem)/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

@media (min-width: 40rem) {
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 19rem; column-gap: clamp(2.5rem, 6vw, 5rem); }
  .hero-facts { grid-template-columns: minmax(0, 1fr); padding-top: .75rem; }
  .figures { grid-column: 1 / -1; }
}

/* sections: heading on a left rail, content to the right */
.section { border-top: 1px solid var(--line); padding-block: clamp(3rem, 8vw, 5.5rem); }
.section-grid { display: grid; gap: 1.75rem; }
.rail h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.02em; }
.rail p { margin-top: .75rem; color: var(--muted); font-size: .9375rem; }
.section-body > h3, .stack h3 { font-size: 1.15rem; font-weight: 650; }
@media (min-width: 56rem) {
  .section-grid { grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 4rem); }
  .rail { position: sticky; top: 1.5rem; align-self: start; }
}

/* projects: one row per project, a work log rather than a card grid */
.projects { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.project { display: grid; gap: .3rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.project-meta { display: flex; flex-wrap: wrap; gap: 0 .75rem; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.project-name { font-size: 1.2rem; font-weight: 650; }
.project-desc { max-width: 62ch; }
.project-stack { color: var(--muted); font-size: .875rem; }
.project-link { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
@media (min-width: 40rem) {
  .project {
    grid-template-columns: 8.5rem minmax(0, 1fr) auto; column-gap: 1.5rem;
    grid-template-areas: "meta name link" "meta desc desc" "meta stack stack";
  }
  .project-meta { grid-area: meta; flex-direction: column; }
  .project-name { grid-area: name; }
  .project-link { grid-area: link; text-align: right; }
  .project-desc { grid-area: desc; }
  .project-stack { grid-area: stack; }
}

/* the one signature element: this site's stack drawn as a mattress cross-section */
.stack { margin-bottom: 3rem; }
.stack h3 { margin-bottom: 1rem; }
.stack-layers { list-style: none; padding: 0; overflow: hidden; border: 2px solid var(--muted); border-radius: 18px; background: var(--layer-1); }
.stack-layers::before { /* ticking cover */
  content: ""; display: block; height: 14px;
  background: repeating-linear-gradient(90deg, var(--tick) 0 3px, transparent 3px 9px, var(--tick) 9px 10px, transparent 10px 16px) var(--layer-1);
}
.layer, .stack-base { display: grid; gap: .15rem 1.25rem; padding: .9rem 1.25rem; }
.layer-top { border-top: 1px dashed var(--muted); }
.layer-comfort { background: var(--layer-2); border-top: 1px dashed var(--muted); }
.layer-core { background: var(--layer-3); border-top: 1px solid var(--line); padding-block: 1.75rem; }
.layer-support { background: var(--layer-2); border-top: 1px solid var(--line); }
.layer-name { font-weight: 700; }
.layer-src { color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.stack-base { margin: 6px 1.5rem 0; border-radius: 0 0 8px 8px; background: var(--base-bg); color: var(--base-text); }
.stack-base .layer-src { color: var(--base-text); }
.stack figcaption { margin-top: .9rem; color: var(--muted); font-size: .875rem; max-width: 62ch; }
@media (min-width: 40rem) {
  .layer, .stack-base { grid-template-columns: 11rem minmax(0, 1fr) auto; align-items: baseline; }
}

/* skills and evidence */
.skills, .evidence, .contact-list { border-top: 1px solid var(--line); }
.skills > div, .evidence > div, .contact-list > div { display: grid; gap: .2rem 1.5rem; padding-block: .85rem; border-bottom: 1px solid var(--line); }
.skills dt, .evidence dt { font-weight: 650; }
.evidence dd { max-width: 62ch; }
.section-body > h3 { margin-top: 2.75rem; margin-bottom: 1rem; }
@media (min-width: 40rem) {
  .skills > div, .evidence > div { grid-template-columns: 12rem minmax(0, 1fr); }
}

/* contact and services */
.contact-list > div { grid-template-columns: 6.5rem minmax(0, 1fr); }
.contact-list dt { color: var(--muted); }
.contact-list dd { overflow-wrap: anywhere; }
.services { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1.5rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.service h4 { font-size: 1.0625rem; font-weight: 650; }
.service div p { margin-top: .2rem; max-width: 60ch; color: var(--muted); font-size: .9375rem; }
.service-rate { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

/* writing: list (home and /writing) and article pages */
.page { max-width: var(--max); margin-inline: auto; padding: clamp(2rem, 6vw, 3.5rem) var(--gutter) clamp(3rem, 8vw, 5rem); }
.page > h1 { margin-block: 1.25rem 2rem; font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 800; letter-spacing: -.03em; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; padding: 0; color: var(--muted); font-size: .875rem; }
.breadcrumb li + li::before { content: "/"; content: "/" / ""; margin-right: .5rem; }
.breadcrumb a { color: var(--muted); }

.post-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.post-item { display: grid; gap: .3rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.post-item > .post-meta { grid-row: 1; }
.post-item > :is(h2, h3) { font-size: 1.2rem; font-weight: 650; }
.post-item > :is(h2, h3) a { color: var(--text); }
.post-meta { color: var(--muted); font-size: .875rem; }
.post-summary { max-width: 62ch; }
@media (min-width: 40rem) {
  .post-item { grid-template-columns: 9rem minmax(0, 1fr); column-gap: 1.5rem; }
  .post-item > .post-meta { grid-column: 1; grid-row: 1 / span 2; padding-top: .2rem; }
  .post-item > :is(h2, h3), .post-item > .post-summary { grid-column: 2; }
}

.prose { margin-top: 1.25rem; }
.prose > * { max-width: 68ch; }
.prose > header { display: grid; gap: .6rem; margin-bottom: 2.25rem; }
.prose > header > .post-meta { grid-row: 1; }
.prose > header h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
.prose > header .post-summary { color: var(--muted); font-size: 1.2rem; line-height: 1.45; }
.prose > :is(p, ul, ol, blockquote, pre, figure, table) { margin-top: 1.1em; }
.prose > h2 { margin-top: 2.2em; font-size: 1.5rem; }
.prose > h3 { margin-top: 1.8em; font-size: 1.2rem; font-weight: 650; }
.prose :is(ul, ol) { padding-left: 1.25em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { padding-left: 1rem; border-left: 3px solid var(--line); color: var(--muted); }
.prose pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); line-height: 1.55; }
.prose :not(pre) > code { padding: .1em .3em; border-radius: 3px; background: var(--surface); }
.prose figcaption { margin-top: .5rem; color: var(--muted); font-size: .875rem; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .9375rem; }
.prose :is(th, td) { padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose td { font-variant-numeric: tabular-nums; }
@media (min-width: 64rem) { /* date on a side rail */
  .prose { display: grid; grid-template-columns: 9rem minmax(0, 68ch); column-gap: 3rem; }
  .prose > * { grid-column: 2; }
  .prose > header { grid-column: 1 / -1; grid-template-columns: 9rem minmax(0, 68ch); column-gap: 3rem; max-width: none; }
  .prose > header > * { grid-column: 2; }
  .prose > header > .post-meta { grid-column: 1; grid-row: 1 / span 2; padding-top: .6rem; }
}

/* motion: colour changes only, and only when the visitor has not asked for less */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .button { transition: color .15s, background-color .15s; }
}
