/* mazurov.me — shared styles for every page.
   One set of components: .topbar, .hero, .sec, .box, .tbl, .cells, .quote,
   .btn, .reader, .counter, .dock. Pages only arrange them. */

/* JetBrains Mono (OFL), self-hosted so the page makes no third-party requests.
   latin-ext only downloads when a glyph needs it (e.g. "ş" in Başkır). */
@font-face{font-family:"JBM";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/jbm-latin-400.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:"JBM";font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/jbm-latin-700.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:"JBM";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/jbm-latin-ext-400.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:"JBM";font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/jbm-latin-ext-700.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}

/* ---------- tokens ---------- */
:root{
  color-scheme:light;
  --bg:#F7F7F7; --ink:#111111; --card:#FFFFFF; --muted:#5E5E5E; --dim:#8A8A8A;
  --link:#2F5BD3; --hover:#EFEEEB; --stripe:#E6E6E6; --on-ink-muted:#B9B4AC;
  --term:#2A2A2A; --term-ink:#E9E6E0; --term-dim:#A8A49B; --term-rule:#5E5E5E;
  --line:1.5px; --shadow:4px 4px 0 var(--ink);
  --font:"JBM",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --gap:24px; --pad-x:48px;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#121212; --ink:#F3F1EC; --card:#1C1C1C; --muted:#ACA8A0; --dim:#7A7A7A;
  --link:#8FB2FF; --hover:#232323; --stripe:#262626; --on-ink-muted:#5A5650;
  --term:#0B0B0B; --term-rule:#3A3A3A;
}
@media (max-width:720px){:root{--pad-x:16px;--gap:28px}}

/* ---------- 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(--ink);font:400 15px/1.75 var(--font)}
@media (max-width:720px){body{font-size:14px;line-height:1.7}}
a{color:var(--link)}
a:hover{color:var(--ink)}
:focus-visible{outline:2px solid var(--link);outline-offset:2px}
h1,h2,h3,p,figure,blockquote,ol,ul,dl,dd{margin:0}
img{display:block;max-width:100%}
.muted{color:var(--muted)}
.dim{color:var(--dim)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- page shell ---------- */
.page{min-height:100vh;min-height:100svh;display:flex;flex-direction:column}
.wrap{width:100%;max-width:1440px;margin:0 auto;padding:32px var(--pad-x) 40px;display:flex;flex-direction:column;gap:var(--gap);flex:1}
.cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(520px,100%),1fr));gap:48px;align-items:start}
.stack{display:flex;flex-direction:column;gap:var(--gap);min-width:0}
@media (max-width:720px){
  .wrap{padding-top:12px;padding-bottom:28px}
  /* one column: unwrap the left stack so sections can be reordered */
  .cols{display:flex;flex-direction:column;gap:var(--gap)}
  .cols > .stack{display:contents}
  .m-late{order:1}
}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;border:0;background:none;color:var(--ink);font:inherit;font-weight:700;text-decoration:none;cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--ink);color:var(--bg)}
.btn--solid{padding:0 20px;min-height:48px;background:var(--ink);color:var(--bg)}
.btn--solid:hover{background:var(--link);color:#fff}
.btn--sm{font-size:13px}
/* text buttons bleed their hover padding so the brackets line up with text */
.btn:not(.btn--solid){margin-inline:-6px}
.btns{display:flex;flex-wrap:wrap;align-items:center;gap:4px 24px}

/* ---------- top bar ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.topbar nav{display:flex;flex-wrap:wrap;gap:0 20px}
.topbar .here{color:var(--muted)}

/* ---------- hero ---------- */
.hero{display:flex;gap:24px;align-items:flex-start}
.hero h1{font-size:clamp(28px,4.2vw,48px);line-height:1.08;font-weight:700;letter-spacing:-.015em}
.hero .lede{font-size:16px;margin-top:8px;max-width:62ch;text-wrap:pretty}
.hero .lede + .lede{margin-top:6px}
@media (max-width:720px){
  /* photo + name on one row, the lede full width underneath */
  .hero{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 14px;align-items:center}
  .hero > div:last-child{display:contents}
  .hero .photo{grid-row:1}
  .hero .lede{grid-column:1 / -1;font-size:14px;margin:0}
}

/* framed photo */
.photo{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px}
.photo .frame{width:96px;height:96px;border:var(--line) solid var(--ink);box-shadow:var(--shadow);background:var(--card) repeating-linear-gradient(-45deg,var(--stripe) 0 2px,transparent 2px 8px);overflow:hidden}
.photo img{width:100%;height:100%;object-fit:cover}
@media (max-width:720px){.photo .frame{width:64px;height:64px;box-shadow:3px 3px 0 var(--ink)}}

/* ---------- section heading: "## TITLE" ---------- */
.sec{display:flex;flex-direction:column;gap:10px;min-width:0}
.sec > h2{font-size:15px;font-weight:700;letter-spacing:.01em;text-transform:uppercase}
.sec > h2::before{content:"## ";color:var(--dim)}
.sec > p{max-width:70ch}
@media (max-width:720px){.sec > h2{font-size:14px}}

/* ---------- box: the one bordered surface ---------- */
.box{border:var(--line) solid var(--ink);background:var(--card)}
.box--shadow{box-shadow:var(--shadow)}
.box--ink{border-color:var(--ink);background:var(--ink);color:var(--bg)}

/* ---------- table: label / value rows (sessions, facts) ---------- */
.tbl{width:100%;border-collapse:collapse;font-size:14px;line-height:1.5}
.tbl th,.tbl td{padding:10px 14px;text-align:left;vertical-align:top;border-bottom:1px dashed var(--dim)}
.tbl tr:last-child > *{border-bottom:0}
.tbl th{font-weight:700;white-space:nowrap}
.tbl td.num{text-align:right;white-space:nowrap;color:var(--muted)}
.tbl a{color:inherit;text-decoration:none;display:block;margin:-10px -14px;padding:10px 14px}
.tbl tr.link:hover{background:var(--ink);color:var(--bg)}
.tbl tr.link:hover td.num{color:var(--bg)}
.tbl tr.hl td.num{color:var(--ink);font-weight:700}
.tbl--kv th{width:1%;color:var(--muted);font-weight:400}
@media (max-width:720px){.tbl{font-size:13px}.tbl th,.tbl td{padding:9px 12px}.tbl a{margin:-9px -12px;padding:9px 12px}}

/* ---------- cells: 2-up grid of titled items (mentoring sessions) ---------- */
.cells{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));font-size:14px;line-height:1.6}
.cells > *{padding:14px 16px;display:flex;flex-direction:column;gap:4px;border-bottom:var(--line) solid var(--ink)}
.cells > :nth-child(odd){border-right:var(--line) solid var(--ink)}
.cells > :nth-last-child(-n+2):nth-child(odd),.cells > :last-child{border-bottom:0}
.cells h3{font-size:inherit;font-weight:700}
.cells h3 small{font-size:inherit;font-weight:400;color:var(--muted)}
@media (max-width:720px){
  .cells{grid-template-columns:1fr;font-size:13px}
  .cells > *{border-right:0 !important;border-bottom:var(--line) solid var(--ink) !important}
  .cells > :last-child{border-bottom:0 !important}
}

/* ---------- list ("* item") ---------- */
.list{list-style:none;padding:0;display:flex;flex-direction:column;gap:6px}
.list li{display:flex;align-items:center;gap:10px}
ol.list{counter-reset:n}
ol.list li{align-items:baseline}
ol.list li::before{counter-increment:n;content:counter(n) ".";color:var(--dim)}

/* ---------- links: bordered rows of title + note + ↗ (projects, posts) ---------- */
.links{list-style:none;padding:0}
.links li + li{border-top:1px dashed var(--dim)}
.links a{display:flex;align-items:center;gap:14px;padding:12px 14px;color:inherit;text-decoration:none;line-height:1.45}
.links a:hover{background:var(--ink);color:var(--bg)}
.links a:hover .muted{color:inherit;opacity:.75}
.links b{display:block}
.links .muted{font-size:13px}
.links .go{margin-left:auto;font-weight:700}

/* ---------- quote ---------- */
.quote{display:flex;flex-direction:column;gap:10px;padding:14px 16px}
.quote blockquote{font-size:14px;line-height:1.55;text-wrap:pretty}
.quote blockquote::before{content:"> ";color:var(--dim)}
.quote figcaption{font-size:12px;line-height:1.45;color:var(--muted)}
.quote figcaption b{display:block;color:var(--ink);font-size:13px}
.quotes > .quote + .quote{border-top:1px dashed var(--dim)}
.box--ink .quote blockquote::before{content:none}
.box--ink .quote blockquote{font-size:15px}
.box--ink .quote figcaption{color:var(--on-ink-muted)}
.box--ink .quote figcaption b{color:var(--bg)}

/* ---------- reader: terminal card that cycles recommendations (home) ---------- */
.reader{display:flex;flex-direction:column;align-items:center;gap:14px;min-width:0}
.reader .bubble{align-self:flex-end;position:relative;max-width:340px;margin-right:6%;padding:10px 14px;border-radius:4px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:700;line-height:1.5;letter-spacing:.04em;transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.reader .bubble::after{content:"";position:absolute;left:22px;bottom:-10px;border:6px solid transparent;border-top:6px solid var(--ink);border-left:10px solid var(--ink)}
.reader .bubble.pop{transform:scale(1.06) rotate(-1deg)}
.reader-h{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.reader .shell{width:min(100%,560px);padding:14px}
.reader .screen{position:relative;height:clamp(460px,58vh,600px);background:var(--term) repeating-linear-gradient(-35deg,rgba(255,255,255,.035) 0 2px,transparent 2px 5px);color:var(--term-ink)}
.rec{position:absolute;inset:0;padding:22px 24px;display:flex;flex-direction:column;gap:12px;overflow:hidden}
.rec .cmd{font-size:12px;color:var(--term-dim)}
.rec .pull{font-size:20px;line-height:1.3;font-weight:700;color:#fff;text-wrap:pretty}
.rec .body{flex:1;min-height:0;overflow-y:auto;font-size:12.5px;line-height:1.6;color:#D8D4CC;display:flex;flex-direction:column;gap:.9em;scrollbar-width:thin}
.rec .body.typing p:last-of-type::after{content:"▌";color:#fff;animation:blink .8s steps(1) infinite}
.rec footer{display:flex;align-items:flex-end;gap:12px;border-top:1px dashed var(--term-rule);padding-top:12px;font-size:12px;line-height:1.45;color:var(--term-dim)}
.rec footer b{display:block;color:#fff;font-size:14px}
.rec footer .meta{margin-left:auto;text-align:right}
/* JS shows one at a time; without JS they simply stack */
.js .rec{visibility:hidden}
.js .rec.on{visibility:visible}
html:not(.js) .reader .screen{height:auto}
html:not(.js) .rec{position:static}
html:not(.js) .reader .bubble,html:not(.js) .reader .ctrl{display:none}
.reader .ctrl .btn{margin-inline:0}
.reader .ctrl{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px;font-size:13px}
.reader .dot{width:44px;height:44px;display:grid;place-items:center;border:0;background:none;cursor:pointer;padding:0}
.reader .dot::before{content:"";width:11px;height:11px;border-radius:50%;border:var(--line) solid var(--ink);background:var(--bg)}
.reader .dot[aria-current="true"]::before{background:var(--ink)}
.reader .dot:hover::before{border-color:var(--link)}
@media (max-width:720px){
  .reader{align-items:stretch;gap:10px}
  .reader .bubble{display:none}
  .reader-h{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;font-size:14px;font-weight:700;text-transform:uppercase}
  .reader-h::before{content:"## ";color:var(--dim)}
  .reader .shell{padding:10px}
  .reader .screen{height:520px}
  .rec{padding:18px 16px}
  .rec .pull{font-size:17px}
  .rec footer .meta{display:none}
}
@keyframes blink{50%{opacity:0}}

/* ---------- visitor counter ---------- */
.counter{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);min-height:30px}
.counter[data-state="off"]{visibility:hidden}
.counter .digits{display:flex;gap:3px;line-height:1}
/* each digit is a drum: a vertical strip of 0-9s seen through a 1-digit window */
.counter .digits > span{position:relative;width:22px;height:30px;overflow:hidden;background:var(--ink);color:var(--bg);font-size:16px;font-weight:700}
.counter .digits > span:not(.wheel){display:grid;place-items:center}
.counter .wheel::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(rgba(0,0,0,.55),transparent 32%,transparent 68%,rgba(0,0,0,.55))}
.counter .strip{display:flex;flex-direction:column;transition-property:transform;transition-timing-function:cubic-bezier(.3,.9,.3,1.06);will-change:transform}
.counter .strip > span{height:30px;flex:none;display:grid;place-items:center}
.counter.tick .wheel:last-child{outline:2px solid var(--link);outline-offset:2px;transition:outline-color .6s}

/* ---------- mobile CTA dock ---------- */
.dock{display:none}
@media (max-width:720px){
  .dock{display:block;position:sticky;bottom:0;padding:12px 16px calc(16px + env(safe-area-inset-bottom));background:var(--bg);border-top:var(--line) solid var(--ink)}
  .dock.is-covered{display:none}
  .dock .btn--solid{display:flex;justify-content:center;width:100%;min-height:52px}
  .desk-only{display:none !important}
}

/* ---------- booking embed (mentoring) ---------- */
.cal{min-height:560px;background:var(--bg);padding:24px 24px 8px}
@media (max-width:720px){.cal{padding:12px 8px 4px}}
.cal .placeholder{min-height:560px;display:grid;place-items:center;text-align:center;padding:24px;color:var(--muted);background:var(--card) repeating-linear-gradient(-45deg,var(--stripe) 0 2px,transparent 2px 8px)}
.cal-fallback{font-size:13px;color:var(--muted)}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important}
}
