/* ==========================================================================
   Akshay Builds: a Hyprland-style tiled desktop.
   Catppuccin Mocha (dark, default) and Latte (light). JetBrains Mono for the
   interface, IBM Plex Sans for long reading. Content is always in the HTML;
   animation only changes how it arrives, never whether it is there.
   ========================================================================== */

@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-italic.woff2") format("woff2"); font-weight: 100 700; font-style: italic; font-display: swap; }

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 45deg; }

:root {
	--crust: #11111b; --mantle: #181825; --base: #1e1e2e;
	--surface0: #313244; --surface1: #45475a; --overlay: #6c7086;
	--sub0: #a6adc8; --sub1: #bac2de; --dim: #9399b2; --text: #cdd6f4;
	--mauve: #cba6f7; --blue: #89b4fa; --lavender: #b4befe; --green: #a6e3a1;
	--peach: #fab387; --red: #f38ba8; --yellow: #f9e2af; --teal: #94e2d5; --pink: #f5c2e7;
	--win-bg: #1e1e2e;
	--g1: var(--mauve); --g2: var(--blue);
	--hm0: #313244; --hm1: rgba(166, 227, 161, .28); --hm2: rgba(166, 227, 161, .5); --hm3: rgba(166, 227, 161, .75); --hm4: #a6e3a1;
	--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--read: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ease: cubic-bezier(.05, .9, .1, 1.05);
	color-scheme: dark;
}
:root[data-theme="light"] {
	--crust: #dce0e8; --mantle: #e6e9ef; --base: #eff1f5;
	--surface0: #ccd0da; --surface1: #bcc0cc; --overlay: #8c8fa1;
	--sub0: #5c5f77; --sub1: #4c4f69; --dim: #6c6f85; --text: #4c4f69;
	--mauve: #8839ef; --blue: #1e66f5; --lavender: #7287fd; --green: #40a02b;
	--peach: #fe640b; --red: #d20f39; --yellow: #df8e1d; --teal: #179299; --pink: #ea76cb;
	--win-bg: #eff1f5;
	--hm0: #ccd0da; --hm1: rgba(64, 160, 43, .3); --hm2: rgba(64, 160, 43, .5); --hm3: rgba(64, 160, 43, .75); --hm4: #40a02b;
	color-scheme: light;
}
body.border-hypr { --g1: #33ccff; --g2: #00ff99; }
body.border-peach { --g1: var(--peach); --g2: var(--pink); }

/* Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--crust); color: var(--text); font: 400 15px/1.65 var(--mono); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--lavender); }
:focus-visible { outline: 2px solid var(--g1); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--mauve); color: var(--crust); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.muted { color: var(--sub0); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--mauve); color: var(--crust); padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { left: 8px; }

/* Desktop and bar --------------------------------------------------------- */
.desk { position: relative; min-height: 100vh; overflow: hidden; padding: 10px 14px 14px; }
.wall { position: absolute; right: -60px; bottom: -40px; width: 760px; color: var(--mauve); opacity: .05; pointer-events: none; }

.bar {
	position: relative; z-index: 2;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
	max-width: 1640px; margin: 0 auto 10px;
	background: color-mix(in srgb, var(--mantle) 92%, transparent);
	border: 1px solid var(--surface0); border-radius: 12px; padding: 6px 8px;
}
.bar__ws { overflow-x: auto; }
.ws { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; counter-reset: ws; }
.ws li { counter-increment: ws; }
.ws a, .ws--menu a {
	display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
	border-radius: 8px; color: var(--sub0); text-decoration: none; white-space: nowrap;
	transition: background .2s, color .2s;
}
.ws a::before { content: counter(ws); color: var(--dim); }
.ws a:hover { background: var(--surface0); color: var(--text); }
.ws a.is-on, .ws a[aria-current="page"], .ws .current-menu-item > a, .ws .current_page_item > a { background: var(--mauve); color: var(--crust); }
.ws a.is-on::before, .ws a[aria-current="page"]::before, .ws .current-menu-item > a::before { color: var(--crust); opacity: .7; }
.bar__title { display: flex; align-items: center; gap: 10px; color: var(--sub0); }
.bar__right { display: flex; align-items: center; gap: 6px; }
.mod { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 8px; background: var(--surface0); color: var(--text); text-decoration: none; font: inherit; border: 0; }
.mod--streak { color: var(--peach); }
.mod--streak:hover { color: var(--peach); background: var(--surface1); }
.mod--btn { cursor: pointer; color: var(--sub0); width: 36px; justify-content: center; padding: 0; }
.mod--btn:hover { color: var(--text); background: var(--surface1); }

/* Tiles and windows ------------------------------------------------------- */
.tiles-wrap { position: relative; z-index: 1; max-width: 1640px; margin: 0 auto; }
.tiles { display: grid; gap: 10px; }
.g2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g2--read { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.g3 { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.all { grid-column: 1 / -1; }
.feat { grid-column: span 2; }
.stack-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.stack-col--sticky { position: sticky; top: 10px; }
.gabout { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "main main fetch" "act act logs" "write write logs"; grid-template-rows: auto auto 1fr; align-items: start; }
.ga-main { grid-area: main; } .ga-fetch { grid-area: fetch; } .ga-act { grid-area: act; } .ga-logs { grid-area: logs; } .ga-write { grid-area: write; }

.win {
	position: relative; min-width: 0; border-radius: 12px; padding: 2px; background: var(--surface0);
	animation: pop .42s var(--ease) var(--d, 0s) both;
}
.win.is-active { animation-name: pop-t; }
/* Focused border: a rotating gradient on its own layer, so focus changes never replay the window animation. */
.win::before {
	content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
	background: linear-gradient(var(--ang), var(--g1), var(--g2));
	opacity: 0; transition: opacity .2s;
}
.win.is-active::before, .tiles:hover .win:hover::before { opacity: 1; animation: spin 6s linear infinite; }
.tiles:hover .win.is-active:not(:hover)::before { opacity: 0; animation: none; }
.win__in { position: relative; z-index: 1; height: 100%; border-radius: 10px; background: var(--win-bg); padding: 18px 20px; overflow: hidden; }
.win__in--lg { padding: 22px 26px; }
.win__in--read { padding: 26px clamp(20px, 4vw, 48px) 32px; }
@keyframes spin { to { --ang: 405deg; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
/* The focused window holds the main content: scale only, never hidden, so it paints at once. */
@keyframes pop-t { from { transform: scale(.98); } }

/* Prompt, breadcrumb, typed command, cursor ------------------------------- */
.cwd { color: var(--sub0); margin-bottom: 2px; overflow-wrap: anywhere; }
.cwd__user { color: var(--blue); font-weight: 700; }
.cwd__seg { color: var(--mauve); font-weight: 700; text-decoration: none; }
a.cwd__seg:hover { text-decoration: underline; color: var(--mauve); }
.cwd__sep { color: var(--mauve); }
.prompt { color: var(--text); margin-bottom: 10px; overflow-wrap: anywhere; }
.prompt__sym { color: var(--green); font-weight: 700; }
.cmd--type { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; max-width: 100%; width: calc(var(--n) * 1ch); animation: type calc(var(--n) * 55ms) steps(var(--n)) .35s both; }
@keyframes type { from { width: 0; } }
.cur { display: inline-block; width: .6em; height: 1.15em; background: var(--text); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
.cur--after { margin-left: 2px; animation: blink 1s steps(1) infinite, hide 0s linear 1.6s forwards; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hide { to { visibility: hidden; } }
.comment { color: var(--dim); }
.err { color: var(--red); margin-bottom: 14px; }

/* Home hero -------------------------------------------------------------- */
.who { margin: 0 0 22px; color: var(--sub1); }
.who__name { display: inline; font-size: inherit; font-weight: 700; color: var(--mauve); }
.who__name::after { content: ", "; color: var(--sub1); font-weight: 400; }
.out { margin-top: 6px; }
.out > .comment { margin-top: 22px; }
.ls--wide { margin-top: 6px; }
.hero__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 10px; }
.hero__title { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.02; font-weight: 800; letter-spacing: -0.025em; color: var(--text); }
.hero__title a { color: inherit; text-decoration: none; }
.hero__title a:hover { color: var(--g1); }
.hero__tagline { margin-top: 14px; max-width: 58ch; font-size: 16px; color: var(--sub1); }

/* Shared pieces ----------------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--sub0); white-space: nowrap; }
.status::before { content: "●"; }
.status--shipped { color: var(--green); }
.status--building { color: var(--yellow); }
.status--experiment { color: var(--mauve); }
.status--paused { color: var(--sub0); }

.stack { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; padding: 0; margin: 14px 0 0; }
.stack a { color: var(--sub0); text-decoration: none; }
.stack a::before { content: "["; color: var(--overlay); }
.stack a::after { content: "]"; color: var(--overlay); }
.stack a:hover { color: var(--g1); }

.keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.key { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 6px; background: var(--surface0); color: var(--text); text-decoration: none; font: inherit; border: 0; cursor: pointer; }
.key:hover { background: var(--surface1); color: var(--text); }
.key b { color: var(--g1); }
.tlink { display: inline-block; margin-top: 14px; }
.endkeys { display: flex; justify-content: flex-end; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border: 1px solid var(--surface1); border-radius: 6px; color: var(--sub0); text-decoration: none; }
.chip:hover { color: var(--text); border-color: var(--overlay); }
.chip.is-on { background: var(--text); border-color: var(--text); color: var(--crust); }

.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
.head-row__count { margin-left: auto; }
.page-title { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.lede { margin-top: 10px; max-width: 72ch; color: var(--sub0); }
.sec-title { font-size: 18px; font-weight: 700; color: var(--mauve); margin: 4px 0 10px; }
.filter-note { margin: 12px 0 0; }

/* Build tiles ------------------------------------------------------------- */
.tile .win__in { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; }
.tile__top { display: flex; justify-content: space-between; gap: 12px; }
.tile__path { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__title { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
.feat .tile__title { font-size: clamp(28px, 3vw, 40px); }
.tile__title a { color: var(--text); text-decoration: none; }
.tile__title a:hover { color: var(--g1); }
.tile__tagline { color: var(--sub1); max-width: 56ch; }
.tile .stack { margin-top: 0; }
.tile__last { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--surface0); font-size: 13px; }
.tile__last span { color: var(--dim); }
.tile__last a { color: var(--text); text-decoration: none; }
.tile__last a:hover { color: var(--g1); }

/* Logs -------------------------------------------------------------------- */
.logl { --t: var(--sub0); }
.logl--built { --t: var(--blue); } .logl--shipped { --t: var(--green); } .logl--fixed { --t: var(--peach); }
.logl--learned { --t: var(--mauve); } .logl--blocked { --t: var(--red); } .logl--note { --t: var(--sub0); }
.logl__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; }
.logl__time { color: var(--dim); text-decoration: none; }
.logl__time:hover { color: var(--g1); }
.logl__type { color: var(--t); }
.logl__build { color: var(--sub0); text-decoration: none; }
.logl__build:hover { color: var(--g1); }
.logl__hours { color: var(--dim); }
.logl__title { font-size: 15px; font-weight: 700; margin: 2px 0; }
.logl__title a { color: var(--text); text-decoration: none; }
.logl__text { color: var(--text); }
.logl__text p + p { margin-top: .5em; }
.logl__text pre { font-size: 13px; }

.stream { display: grid; gap: 12px; }
.stream__item { animation: lnin .35s ease-out both; animation-delay: calc(1.1s + var(--i) * .3s); }
@keyframes lnin { from { opacity: 0; transform: translateY(4px); } }
.cur-line { margin-top: 8px; }

.journal { display: grid; }
.journal .logl { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2px 18px; padding: 9px 0; border-bottom: 1px solid var(--surface0); }
.journal .logl__meta { align-content: start; }
.journal .logl__title, .journal .logl__text { grid-column: 2; }
.day { margin-top: 18px; }
.day__head { font-size: 13px; font-weight: 500; color: var(--dim); margin: 0 0 4px; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.bars__row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 32px; gap: 10px; align-items: center; color: var(--t); }
.bars__row > span:last-child { text-align: right; color: var(--sub0); }
.bars__track { height: 10px; border-radius: 2px; background: var(--surface0); overflow: hidden; }
.bars__track span { display: block; height: 100%; background: var(--t); }
.bars__row--built { --t: var(--blue); } .bars__row--shipped { --t: var(--green); } .bars__row--fixed { --t: var(--peach); }
.bars__row--learned { --t: var(--mauve); } .bars__row--blocked { --t: var(--red); } .bars__row--note { --t: var(--sub0); }

.ls { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ls a { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.ls--wide a { grid-template-columns: 112px 190px minmax(0, 1fr); }
.ls--wide .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls a:hover { background: var(--surface0); color: var(--text); }
.ls a.is-on { background: var(--surface1); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--blue); }
.kv dd { margin: 0; }

/* Heatmap ------------------------------------------------------------------ */
.heatmap { overflow-x: auto; padding-bottom: 4px; }
.heatmap__grid { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(9px, 1fr); gap: 3px; min-width: 620px; }
.hm { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--hm0); }
.hm--pad { background: transparent; }
.hm--1 { background: var(--hm1); } .hm--2 { background: var(--hm2); } .hm--3 { background: var(--hm3); } .hm--4 { background: var(--hm4); }
.heat__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--sub0); }
.heat__legend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.heat__legend .hm { width: 11px; }
.win--hero ~ .win .heatmap__grid, .ga-act .heatmap__grid { min-width: 560px; }

/* fastfetch ---------------------------------------------------------------- */
.fetch { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.fetch__logo { margin: 0; padding: 0; border: 0; background: none; overflow: visible; font: 700 15px/1.05 var(--mono); color: var(--g1); }
.fetch__info { min-width: 0; flex: 1 1 180px; }
.fetch__host { font-weight: 700; color: var(--mauve); }
.fetch__rule { color: var(--surface1); }
.fetch__dl { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; margin: 0; }
.fetch__dl dt { color: var(--blue); }
.fetch__dl dd { margin: 0; }
.fetch__swatch { display: flex; margin-top: 10px; }
.fetch__swatch i { width: 18px; height: 12px; }
.fetch__swatch i:nth-child(1) { background: var(--red); } .fetch__swatch i:nth-child(2) { background: var(--peach); }
.fetch__swatch i:nth-child(3) { background: var(--yellow); } .fetch__swatch i:nth-child(4) { background: var(--green); }
.fetch__swatch i:nth-child(5) { background: var(--teal); } .fetch__swatch i:nth-child(6) { background: var(--blue); }
.fetch__swatch i:nth-child(7) { background: var(--mauve); }

/* Posts list --------------------------------------------------------------- */
.plist { display: grid; gap: 14px; }
.plist--page { gap: 0; margin-top: 18px; }
.plist--page .postl, .plist--page .logl { padding: 14px 0; border-bottom: 1px solid var(--surface0); }
.postl__meta { display: flex; gap: 14px; color: var(--dim); font-size: 12.5px; }
.postl__title { font-size: 15px; font-weight: 700; margin-top: 2px; }
.plist--page .postl__title { font-size: 18px; }
.postl__title a { color: var(--text); text-decoration: none; }
.postl__title a:hover { color: var(--g1); }
.postl__excerpt { margin-top: 4px; color: var(--sub0); max-width: 72ch; }

/* Documents: build README, articles, logs ---------------------------------- */
.doc__head { margin: 6px 0 22px; }
.doc__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.doc__meta a { color: var(--sub0); }
.doc__title { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; font-weight: 800; letter-spacing: -0.025em; margin-top: 6px; }
.doc__title--read { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.12; max-width: 24ch; }
.doc__title--log { font-size: clamp(22px, 2.6vw, 30px); max-width: 36ch; margin-bottom: 18px; }
.doc__lede { margin-top: 14px; font-size: 17px; color: var(--sub1); max-width: 60ch; }
.doc__media { margin: 0 0 24px; }
.doc__media img { border-radius: 8px; }

.answer { margin: 0 0 28px; padding: 16px 18px; border-radius: 8px; background: var(--mantle); border: 1px solid var(--surface0); max-width: 70ch; }
.answer__head { font-size: 14px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.answer__head::before { content: "## "; color: var(--overlay); }
.answer p { font: 400 17px/1.65 var(--read); color: var(--text); }

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose--read { font: 400 18px/1.75 var(--read); color: var(--text); max-width: 68ch; }
.prose--mono { font-size: 15px; }
.prose--about { margin-top: 18px; }
.prose h2 { font: 700 22px/1.3 var(--mono); color: var(--mauve); margin: 2em 0 .6em; letter-spacing: -0.01em; }
.prose h2::before { content: "## "; color: var(--overlay); }
.prose h3 { font: 700 18px/1.35 var(--mono); color: var(--blue); margin: 1.7em 0 .5em; }
.prose h3::before { content: "### "; color: var(--overlay); }
.prose h4 { font: 700 16px/1.4 var(--mono); margin: 1.5em 0 .4em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0; }
.prose p { margin: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--g1); }
.prose blockquote { margin: 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--mauve); color: var(--sub1); font-style: italic; }
.prose hr { border: 0; border-top: 1px dashed var(--surface1); margin: 2.2em 0; }
.prose img { border-radius: 8px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .wp-element-caption { font: 13px/1.5 var(--mono); color: var(--dim); margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font: 14px/1.5 var(--mono); }
.prose th, .prose td { border-bottom: 1px solid var(--surface0); padding: 8px 14px 8px 0; text-align: left; vertical-align: top; }
.prose th { color: var(--sub0); font-weight: 500; }
.prose a { color: var(--blue); }
code, kbd, samp, pre { font-family: var(--mono); }
:not(pre) > code { font-size: .86em; padding: 2px 6px; border-radius: 4px; background: var(--surface0); color: var(--peach); }
pre, .wp-block-code { position: relative; font: 14px/1.6 var(--mono); background: var(--mantle); color: var(--text); border: 1px solid var(--surface0); border-radius: 8px; padding: 16px 18px; overflow-x: auto; tab-size: 4; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.code-wrap { position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; font: 500 12px/1 var(--mono); padding: 7px 10px; color: var(--sub0); background: var(--surface0); border: 0; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.code-wrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: 1; } }

.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 5px 8px; margin: 0 -8px; border-radius: 6px; color: var(--sub0); text-decoration: none; line-height: 1.4; }
.toc a::before { content: "## "; color: var(--overlay); }
.toc a:hover, .toc a.is-active { color: var(--text); background: var(--surface0); }
.author { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--surface0); }
.post-navigation a { display: grid; gap: 2px; text-decoration: none; }
.post-navigation .nav-next { grid-column: 2; text-align: right; }
.nav-label { color: var(--dim); font-size: 13px; }
.nav-title { color: var(--text); }
.post-navigation a:hover .nav-title { color: var(--g1); }

/* Forms, comments, pagination --------------------------------------------- */
.search-form { display: flex; gap: 8px; margin: 14px 0; max-width: 520px; }
input[type="search"], input[type="text"], input[type="email"], input[type="url"], textarea {
	width: 100%; padding: 9px 12px; font: 15px/1.4 var(--mono); color: var(--text);
	background: var(--mantle); border: 1px solid var(--surface1); border-radius: 6px;
}
input:focus, textarea:focus { outline: 2px solid var(--g1); outline-offset: 0; border-color: transparent; }
.search-form .btn { font: inherit; padding: 0 14px; border: 0; border-radius: 6px; background: var(--surface0); color: var(--text); cursor: pointer; min-height: 40px; }
.search-form .btn:hover { background: var(--surface1); }
.comments { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--surface0); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 14px 0; border-bottom: 1px solid var(--surface0); }
.comment-meta { font-size: 13px; color: var(--dim); }
.comment-form p { margin-bottom: 12px; }
.comment-form label { display: block; color: var(--sub0); margin-bottom: 4px; }
.key--submit { font: inherit; }
.navigation.pagination { margin-top: 14px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--surface1); color: var(--sub0); text-decoration: none; }
.page-numbers.current { background: var(--text); color: var(--crust); border-color: var(--text); }

/* Footer -------------------------------------------------------------------- */
.foot { position: relative; z-index: 1; max-width: 1640px; margin: 10px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 10px 14px; border: 1px solid var(--surface0); border-radius: 12px; background: color-mix(in srgb, var(--mantle) 92%, transparent); color: var(--sub0); font-size: 13px; }
.foot__who strong { color: var(--text); }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.foot__links a { color: var(--sub0); text-decoration: none; }
.foot__links a:hover { color: var(--g1); }

/* Block alignment helpers ------------------------------------------------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-block-image img { height: auto; }
.sticky, .bypostauthor { /* required by WordPress */ }

/* Small screens: windows stack like a phone layout ---------------------- */
@media (max-width: 980px) {
	.g2, .g2--read, .g3, .gabout { grid-template-columns: minmax(0, 1fr); }
	.gabout { grid-template-areas: "main" "fetch" "act" "logs" "write"; }
	.feat { grid-column: auto; }
	.bar__title { display: none; }
	.stack-col--sticky { position: static; }
	.journal .logl { grid-template-columns: minmax(0, 1fr); }
	.journal .logl__title, .journal .logl__text { grid-column: 1; }
	.ls--wide a { grid-template-columns: 112px minmax(0, 1fr); }
	.ls--wide .muted { display: none; }
}
@media (max-width: 560px) {
	.desk { padding: 8px 8px 10px; }
	.win__in, .win__in--lg { padding: 16px 16px; }
	.win__in--read { padding: 20px 16px 24px; }
	.bar__right .mod--clock { display: none; }
	.prose--read { font-size: 17px; }
}

/* Motion off: Customizer switch or the visitor's system setting -------- */
.no-anim .win, .no-anim .stream__item, .no-anim .cmd--type, .no-anim .win::before { animation: none !important; }
.no-anim .cur { animation: none; }
.no-anim .cur--after { display: none; }
@media (prefers-reduced-motion: reduce) {
	.win, .win.is-active, .stream__item, .cmd--type, .win::before { animation: none !important; }
	.cur { animation: none; }
	.cur--after { display: none; }
}
.lede + .heatmap { margin-top: 16px; }
