/* halilcansoran.com theme: "finished h". Tokens and sizes from brand/NOTES.md, layout from brand/reference.html. */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("schibsted-grotesk-latin-wght-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("jetbrains-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("jetbrains-mono-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #F3F4F1; --ink: #12151A; --muted: #565D68; --line: #D3D6D0;
  --accent: #2440F0; --code: #E7E9E4; --str: #0A6B4A;
  --hl: #FFE04A; --hl-ink: #12151A;
  --f-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --mg: clamp(16px, 5vw, 56px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1116; --ink: #E9ECEF; --muted: #9BA3AE; --line: #2A303A;
    --accent: #8FA0FF; --code: #171C24; --str: #7AD9B0;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 18px/1.6 var(--f-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--hl); color: var(--hl-ink); }
svg { display: block; }
a { color: inherit; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
time { font-variant-numeric: tabular-nums; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.m { max-width: 1180px; margin: 0 auto; }
.m a { text-decoration: none; }

/* header */
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px var(--mg); border-bottom: 1px solid var(--line); }
.m-logo { display: flex; align-items: center; gap: 10px; }
.m-logo .mk { height: 30px; width: auto; flex: none; }
.m-logo .wm { height: 15px; width: auto; display: none; margin-top: 12px; }
.sq { transition: transform .45s var(--ease); }
.m-logo:hover .sq { transform: translateX(14px); }
.m-nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.m-nav a { position: relative; padding: 4px 0; background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.m-nav a:hover { background-size: 100% 2px; }
.m-nav a[aria-current]::before { content: ""; position: absolute; left: -12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--accent); }
@media (min-width: 620px) { .m-logo .wm { display: block; } .m-nav { gap: 28px; } }

/* handoff link: the square travels from the text to the far stem */
.go { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 12px 14px 12px 16px; border: 2px solid var(--ink); color: var(--ink); }
.go::after { content: ""; width: 8px; height: 8px; background: var(--accent); transition: transform .4s var(--ease); margin-right: 12px; }
.go:hover::after { transform: translateX(12px); }
.go.pri { background: var(--ink); color: var(--ground); }
.go.pri::after { background: var(--ground); }

/* home */
@media (prefers-reduced-motion: reduce) { .hm-tl .now i { animation: none; } .sq, .go::after, .row b, .m-nav a, .parts b, .ser, .hm-cats b, .hm-sers b { transition: none; } }
.hm-intro { display: grid; gap: 36px; padding: clamp(32px, 6vw, 72px) var(--mg) clamp(36px, 6vw, 68px); }
.hm-kick { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.hm-kick::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.hm-intro h1 { font-weight: 800; font-size: clamp(1.65rem, 3.5vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 0 -.03em; max-width: 22ch; text-wrap: balance; }
.hm-lede { font-size: 18px; line-height: 1.6; max-width: 58ch; margin-top: 16px; }
.hm-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hm-photo { order: -1; display: block; width: 120px; aspect-ratio: 4 / 5; object-fit: cover; }
.hm-sec { padding: 0 var(--mg) clamp(40px, 6.5vw, 76px); }
.hm-sec h2 { font-weight: 800; font-size: 20px; letter-spacing: -.01em; line-height: 1.3; margin: 0; }
.hm-sec-in { border-top: 8px solid var(--ink); }
.hm-build h2 { padding: 12px 0 14px; }
.hm-led { margin: 0; }
.hm-led div { display: grid; gap: 2px; padding: 13px 0; border-top: 1px solid var(--line); }
.hm-led dt { font-weight: 700; font-size: 17px; letter-spacing: -.01em; line-height: 1.3; }
.hm-led dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.hm-path h2 { font-size: clamp(1.45rem, 2.8vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; }
.hm-tl { list-style: none; margin: 26px 0 0; padding: 0; border-left: 8px solid var(--ink); }
.hm-tl li { position: relative; padding: 0 0 26px 22px; }
.hm-tl li:last-child { padding-bottom: 0; }
.hm-tl i { position: absolute; left: 0; top: 5px; width: 14px; height: 14px; background: var(--ink); transform: translateX(-11px); outline: 3px solid var(--ground); }
.hm-tl .now i { background: var(--accent); animation: nudge 7s var(--ease) infinite; }
.hm-tl .when { display: block; font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.6; }
.hm-tl .now .when { color: var(--accent); font-weight: 700; }
.hm-tl b { display: block; font-weight: 700; font-size: 20px; letter-spacing: -.015em; line-height: 1.25; margin: 2px 0 6px; }
.hm-tl p { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 44ch; }
@keyframes nudge { 0%, 86%, 100% { translate: 0 0; } 92% { translate: 6px 0; } }
.hm-certs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 30px; font-size: 14px; line-height: 1.35; }
.hm-certs span { color: var(--muted); font-weight: 500; margin-right: 6px; flex-basis: 100%; }
.hm-certs b { border: 2px solid var(--ink); padding: 5px 10px; font-weight: 600; }
.hm-writing .h-lab { padding-bottom: 4px; }
.h-lab h2 { font: inherit; margin: 0; }
.hm-sub { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 60ch; padding-bottom: 16px; }
.hm-writing .row b { font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hm-entry { display: grid; gap: 32px; margin-top: 40px; }
.hm-entry h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); border-top: 2px solid var(--ink); padding: 10px 0; line-height: 1.4; }
.hm-cats, .hm-sers { list-style: none; margin: 0; padding: 0; }
.hm-cats a, .hm-sers a { display: grid; gap: 2px 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.hm-cats a { grid-template-columns: 1fr auto; align-items: baseline; }
.hm-cats b, .hm-sers b { color: var(--ink); font-weight: 700; font-size: 16px; letter-spacing: -.01em; line-height: 1.3; transition: transform .4s var(--ease); display: block; }
.hm-cats a:hover b, .hm-sers a:hover b { transform: translateX(10px); }
.hm-sers a { grid-template-columns: 1fr auto; align-items: center; }
.hm-sers b { grid-column: 1 / -1; }
.hm-sers .steps { gap: 4px; }
.hm-sers .steps i { width: 10px; height: 10px; border: 0; background: var(--ink); }
.hm-sers a:hover .steps i:last-child { background: var(--accent); }
@media (min-width: 760px) {
  .hm-intro.has-photo { grid-template-columns: 7fr 4fr; column-gap: 8.33%; align-items: start; }
  .hm-photo { order: 0; width: 100%; }
  .hm-sec-in { display: grid; grid-template-columns: 4fr 7fr; column-gap: 8.33%; }
  .hm-build .hm-led div:first-child { border-top: 0; }
  .hm-led div { grid-template-columns: 5fr 7fr; column-gap: 24px; align-items: baseline; }
  .hm-tl { display: grid; grid-template-columns: 3fr 4fr 5fr 4fr; border-left: 0; border-top: 8px solid var(--ink); margin-top: 34px; }
  .hm-tl li { padding: 26px 24px 0 0; }
  .hm-tl li:last-child { padding-right: 0; }
  .hm-tl i { top: 0; transform: translateY(-11px); }
  .hm-certs span { flex-basis: auto; }
  .hm-writing .row { grid-template-columns: 2fr 7fr 3fr; }
  .hm-entry { grid-template-columns: 4fr 7fr; column-gap: 8.33%; }
  .hm-sers { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
}

.h-list { padding: 0 var(--mg) clamp(32px, 6vw, 72px); }
.h-lab { display: flex; justify-content: space-between; align-items: baseline; border-top: 8px solid var(--ink); padding: 14px 0 18px; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.h-lab a { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 16px 0; border-top: 1px solid var(--line); position: relative; }
.rows .row time, .row .tp { font-size: 14px; color: var(--muted); font-weight: 500; }
.row b { font-weight: 700; font-size: clamp(1.15rem, 2.6vw, 1.45rem); line-height: 1.2; letter-spacing: -.015em; transition: transform .4s var(--ease); display: block; }
.row p { font-size: 16px; color: var(--muted); line-height: 1.5; margin-top: 6px; max-width: 60ch; }
.row::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: var(--accent); transform: scale(0); transition: transform .3s var(--ease); display: none; }
.row.lead b { font-size: clamp(1.5rem, 4.4vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
@media (min-width: 760px) {
  .row { grid-template-columns: 2fr 8fr 2fr; column-gap: 24px; align-items: baseline; }
  .row .tp { text-align: right; }
  .row::before { display: block; left: -20px; }
  .row:hover::before { transform: scale(1); }
  .row:hover b { transform: translateX(10px); }
}

.h-series { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 var(--mg) clamp(32px, 6vw, 72px); }
@media (min-width: 760px) { .h-series { grid-template-columns: 7fr 5fr; } .s-all { grid-template-columns: 1fr 1fr; } }
.ser { border: 2px solid var(--ink); padding: clamp(18px, 3.5vw, 32px); display: flex; flex-direction: column; gap: 14px; }
.ser .st { font-size: 14px; font-weight: 600; color: var(--muted); }
.ser b { font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.steps { display: flex; gap: 6px; }
.steps i { width: 14px; height: 14px; border: 2px solid var(--ink); display: block; }
.steps i.done { background: var(--ink); }
.steps i.now { background: var(--accent); border-color: var(--accent); }

/* footer */
.m-foot { background: var(--ink); color: var(--ground); --accent: var(--ground); padding: clamp(32px, 7vw, 72px) var(--mg) 28px; }
.m-foot-in { max-width: 1180px; margin: 0 auto; }
.m-foot .big { width: 100%; height: auto; max-width: 880px; }
.m-foot nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 32px 0 20px; font-weight: 600; font-size: 16px; }
.m-foot nav a { text-decoration: underline; text-underline-offset: 4px; }
.m-foot small { font-size: 14px; opacity: .72; display: block; }
.m-foot small a { text-decoration: underline; text-underline-offset: 3px; }
.m-foot small .rss { font-size: 12px; }

/* post, page, series heads */
.p-top { padding: clamp(28px, 6vw, 72px) var(--mg) 0; }
.crumb { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.crumb a { text-decoration: underline; text-underline-offset: 3px; }
.p-title { font-weight: 800; font-size: clamp(1.9rem, 6.4vw, 3.9rem); line-height: 1; letter-spacing: -.04em; margin: 0 0 0 -.04em; max-width: 18ch; text-wrap: balance; overflow-wrap: anywhere; }
.p-grid { display: grid; grid-template-columns: 1fr; gap: 28px; padding: clamp(24px, 4vw, 48px) var(--mg) clamp(32px, 6vw, 72px); }
.rail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; font-size: 14px; border-top: 8px solid var(--ink); padding-top: 14px; align-content: start; margin: 0; }
.rail dt { color: var(--muted); font-weight: 500; }
.rail dd { margin: 0; font-weight: 700; font-size: 15px; }
.rail .upd dd span { background: var(--hl); color: var(--hl-ink); padding: 1px 6px; margin-left: -6px; }
.rail .in { grid-column: 1 / -1; }
.rail a { text-decoration: underline; text-underline-offset: 3px; }
.rail .steps { margin-top: 8px; }
@media (min-width: 860px) {
  .p-grid { grid-template-columns: 3fr 9fr; column-gap: 40px; }
  .p-plain { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
}

/* prose */
.prose { min-width: 0; max-width: 66ch; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose h2, .prose h3 { font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 1.9em 0 .6em; text-wrap: balance; }
.prose h2 { font-size: clamp(1.5rem, 4vw, 1.75rem); }
.prose h3 { font-size: clamp(1.3rem, 3.6vw, 1.5rem); }
.prose a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--hl); color: var(--hl-ink); }
.prose code { font-family: var(--f-mono); font-size: .86em; background: var(--code); padding: 2px 5px; overflow-wrap: anywhere; }
.prose pre { margin: 0; padding: 14px; overflow-x: auto; background: var(--code); border-left: 8px solid var(--ink); font-size: 14.5px; line-height: 1.65; tab-size: 2; }
.prose pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.prose .highlight { margin: 1.6em 0; }
.prose .highlight pre { margin: 0; }
.prose blockquote { margin: 1.4em 0; padding-left: 18px; border-left: 8px solid var(--ink); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 16px; margin: 1.4em 0; }
.prose th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 600; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--ink); }
.prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fin { margin: 0; line-height: 1; }
.end { display: inline-block; width: .55em; height: .55em; background: var(--accent); }

/* Pygments: comments muted, keywords and names accent, strings green; .hll is the yellow line */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp, .highlight .cs, .highlight .ch, .highlight .cpf { color: var(--muted); }
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt, .highlight .nf, .highlight .nb, .highlight .nc, .highlight .nn, .highlight .na, .highlight .nt { color: var(--accent); }
.highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s1, .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .ss { color: var(--str); }
.highlight .hll { display: block; background: var(--hl); color: var(--hl-ink); }

/* series navigation inside a post */
.sernav { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 2.4em; align-items: stretch; }
.sernav a { border: 2px solid var(--ink); padding: 16px 18px; display: block; text-decoration: none; }
.sernav a:hover { background: var(--ink); color: var(--ground); }
.sernav small { display: block; font-size: 13.5px; font-weight: 600; opacity: .7; margin-bottom: 4px; }
.sernav b { font-size: 17px; line-height: 1.25; display: block; }
.sernav i { width: 16px; height: 16px; background: var(--accent); align-self: center; justify-self: center; transition: transform .4s var(--ease); }
.sernav .nx { text-align: right; }
@media (min-width: 620px) { .sernav { grid-template-columns: 1fr 16px 1fr; } }

/* series page: numbered timeline hung on one stem */
.s-top { padding: clamp(28px, 6vw, 72px) var(--mg) clamp(20px, 4vw, 40px); display: grid; gap: 20px; }
.s-top .crumb { margin-bottom: 0; }
.s-top .p-title { max-width: 14ch; }
.s-in { max-width: 54ch; font-size: 1.1em; line-height: 1.5; color: var(--muted); }
.s-meta { font-size: 14px; font-weight: 600; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.s-meta .u { background: var(--hl); color: var(--hl-ink); padding: 1px 6px; }
.parts { list-style: none; margin: 0 var(--mg) clamp(32px, 6vw, 72px); padding: 0; border-left: 8px solid var(--ink); }
.parts li { position: relative; padding: 0 0 clamp(24px, 4vw, 40px) clamp(20px, 4vw, 44px); }
.parts li::before { content: ""; position: absolute; left: -8px; top: 14px; width: 24px; height: 8px; background: var(--ink); }
.parts li:last-child { padding-bottom: 8px; }
.parts a { display: grid; grid-template-columns: 1fr; gap: 4px; }
.parts .no { font-weight: 800; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.parts b { font-weight: 800; font-size: clamp(1.25rem, 3.4vw, 1.8rem); line-height: 1.12; letter-spacing: -.025em; transition: transform .4s var(--ease); display: block; }
.parts a:hover b { transform: translateX(10px); }
.parts p { font-size: 16.5px; color: var(--muted); line-height: 1.5; max-width: 58ch; }
.parts .d { font-size: 14px; font-weight: 600; margin-top: 4px; }
@media (min-width: 760px) { .parts a { grid-template-columns: 1.6fr 9fr; column-gap: 16px; align-items: start; } .parts a > div { padding-top: 6px; } }
