/* JetBrainsMono Nerd Font (Nerd Fonts v3.5.1, OFL), self-hosted from ../fonts/.
   Each weight is split in two: the text glyphs (~80 KB) and one shared file of Nerd Font
   icons (Private Use Area), which the browser only downloads if a page uses an icon. */
@font-face { font-family: "JetBrainsMono NF"; font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-DFFF;
  src: local("JetBrainsMonoNerdFont-Regular"), url("../fonts/JetBrainsMonoNF-Regular.woff2") format("woff2"); }
@font-face { font-family: "JetBrainsMono NF"; font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-DFFF;
  src: local("JetBrainsMonoNerdFont-Medium"), url("../fonts/JetBrainsMonoNF-Medium.woff2") format("woff2"); }
@font-face { font-family: "JetBrainsMono NF"; font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-DFFF;
  src: local("JetBrainsMonoNerdFont-Bold"), url("../fonts/JetBrainsMonoNF-Bold.woff2") format("woff2"); }
@font-face { font-family: "JetBrainsMono NF"; font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-DFFF;
  src: local("JetBrainsMonoNerdFont-Italic"), url("../fonts/JetBrainsMonoNF-Italic.woff2") format("woff2"); }
@font-face { font-family: "JetBrainsMono NF"; font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+E000-F8FF, U+F0000-FFFFD;
  src: url("../fonts/JetBrainsMonoNF-Icons.woff2") format("woff2"); }

/* Tokyo Night palette, as used by the Omarchy theme */
:root {
  --bg: #1a1b26;
  --bg-dark: #13141c;
  --bg-darker: #0e0e14;
  --bg-light: #24283b;
  --selection: #292e42;
  --muted: #414868;
  --fg: #a9b1d6;
  --fg-dim: #565f89;
  --fg-bright: #c0caf5;
  --blue: #7aa2f7;
  --cyan: #0db9d7;
  --green: #9ece6a;
  --yellow: #e0af68;
  --orange: #ff9e64;
  --red: #f7768e;
  --magenta: #bb9af7;
  --on-accent: #0e0e14;

  /* Translucent surfaces and the desktop glow */
  --win-bg: rgba(26, 27, 38, .92);
  --win-bg-active: rgba(26, 27, 38, .96);
  --overlay: rgba(14, 14, 20, .7);
  --glow-1: rgba(122, 162, 247, .10);
  --glow-2: rgba(187, 154, 247, .08);

  /* Hyprland look-and-feel */
  --gap-in: 3px;
  --gap-out: 6px;
  --border: 2px;
  --radius: 4px;
  --bar-h: 2.5333rem;
  --active-border: linear-gradient(135deg, var(--blue), var(--magenta));

  /* One typeface everywhere */
  --mono: "JetBrainsMono NF", "JetBrainsMono Nerd Font", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

/* Tokyo Night Day, the light variant of the same theme */
:root[data-theme="light"] {
  --bg: #e1e2e7;
  --bg-dark: #d0d5e3;
  --bg-darker: #c4c8da;
  --bg-light: #eceef3;
  --selection: #b7c1e3;
  --muted: #a8aecb;
  --fg: #3b4270;
  --fg-dim: #68709a;
  --fg-bright: #1f2544;
  --blue: #2e7de9;
  --cyan: #007197;
  --green: #587539;
  --yellow: #8c6c3e;
  --orange: #b15c00;
  --red: #f52a65;
  --magenta: #9854f1;
  --on-accent: #ffffff;

  --win-bg: rgba(225, 226, 231, .94);
  --win-bg-active: rgba(236, 238, 243, .98);
  --overlay: rgba(196, 200, 218, .7);
  --glow-1: rgba(46, 125, 233, .12);
  --glow-2: rgba(152, 84, 241, .10);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

/* Everything is sized in rem, so this scales the whole page with the viewport's width and
   height: about 15px on a 1366×768 laptop, 20px at 1920×1080, capped at 24px */
html { font-size: clamp(14px, calc(4px + 0.55vw + 0.55vh), 24px); }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--glow-2), transparent 60%),
    var(--bg-darker);
  color: var(--fg);
  font: 400 1rem/1.55 var(--mono);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--fg-bright); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

h1, h2, h3 { color: var(--fg-bright); line-height: 1.2; margin: 0 0 .5em; }
h4 { margin: 0; }
button, input, select, textarea { font-family: inherit; }
h1 { font-size: clamp(2.2rem, 9cqi, 5.5rem); letter-spacing: -.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
em { color: var(--magenta); font-style: normal; }
strong { color: var(--fg-bright); }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 .35em;
  margin: 0 .1em;
  border: 1px solid var(--muted);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--bg-light);
  color: var(--fg-bright);
  font: 500 .8em/1.6 var(--mono);
  text-align: center;
}

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  padding: 6px 10px; background: var(--blue); color: var(--on-accent);
}
.skip-link:focus { top: 8px; }

/* ── Bar ──────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 var(--gap-out);
  background: var(--bg-dark);
  border-bottom: 1px solid var(--selection);
  font: 500 0.8667rem/1 var(--mono);
}
.bar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-logo { color: var(--blue); font-weight: 700; letter-spacing: .05em; }
.workspaces { display: flex; gap: 2px; }
.workspaces a {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px;
  border-radius: 3px;
  color: var(--fg-dim);
}
.workspaces a b { font-weight: 700; }
.workspaces a:hover { color: var(--fg-bright); background: var(--selection); }
.workspaces a[aria-current="page"] { color: var(--on-accent); background: var(--blue); }
.bar-center {
  color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw;
}
.bar-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.clock { color: var(--fg-bright); white-space: nowrap; }
.clock-date { margin-right: .6em; color: var(--fg); }
.bar-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border: 0; border-radius: 3px;
  background: none; color: var(--fg-dim);
  font: inherit; cursor: pointer;
}
.bar-btn:hover { color: var(--fg-bright); background: var(--selection); }

/* ── Desktop & workspaces ─────────────────────────────────── */
.desktop {
  position: relative;
  height: calc(100vh - var(--bar-h));
  height: calc(100dvh - var(--bar-h));
  padding: var(--gap-out);
  overflow-x: clip;
}

.ws {
  display: grid;
  gap: calc(var(--gap-in) * 2);
  height: 100%;
  position: relative;
}
.js .ws:not(.is-active) { display: none; }
.ws.enter-right { animation: slide-right .28s cubic-bezier(.2, .9, .3, 1); }
.ws.enter-left  { animation: slide-left .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes slide-right { from { opacity: 0; transform: translateX(6%); } }
@keyframes slide-left  { from { opacity: 0; transform: translateX(-6%); } }

/* Dwindle-style layouts: first window takes the master half, the rest split the remainder.
   Rows are minmax(0, auto): each row first gets the height its content needs, then the
   leftover height is shared out, so a short window doesn't sit half empty. */
.win:nth-child(1) { grid-area: a; }
.win:nth-child(2) { grid-area: b; }
.win:nth-child(3) { grid-area: c; }
.win:nth-child(4) { grid-area: d; }
.win:nth-child(5) { grid-area: e; }

.ws[data-layout="1"] { grid-template: "a" 1fr / 1fr; }
.ws[data-layout="2"] { grid-template: "a b" 1fr / 3fr 2fr; }
.ws[data-layout="3"] { grid-template: "a b" minmax(0, auto) "a c" minmax(0, auto) / 3fr 2fr; }
.ws[data-layout="4"] { grid-template: "a b b" minmax(0, auto) "a c d" minmax(0, auto) / 2fr 1fr 1fr; }
.ws[data-layout="5"] { grid-template: "a b b" minmax(0, auto) "a c d" minmax(0, auto) "a e e" minmax(0, auto) / 2fr 1fr 1fr; }
/* Experience: timeline | role detail | highlights over stats */
.ws[data-layout="exp"] { grid-template: "a b c" 1fr "a b d" auto / minmax(17em, .8fr) 2fr 1fr; }

/* ── Windows ──────────────────────────────────────────────── */
.win {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  background: var(--win-bg);
  border: var(--border) solid var(--muted);
  border-radius: var(--radius);
  transition: border-color .15s, opacity .15s;
}
.js .win:not(.is-active) { opacity: .88; }
.win.is-active {
  border-color: transparent;
  background:
    linear-gradient(var(--win-bg-active), var(--win-bg-active)) padding-box,
    var(--active-border) border-box;
}
.win:focus-visible { outline: none; }
/* An absolutely positioned grid item is placed against its grid area, so span the whole grid */
.win.is-fullscreen {
  position: absolute; inset: 0; z-index: 5;
  grid-area: 1 / 1 / -1 / -1;
}

.win-head {
  flex: none;
  padding: 4px 10px;
  border-bottom: 1px solid var(--selection);
  color: var(--fg-dim);
  font: 0.8rem/1.4 var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prompt { color: var(--green); }
.path { color: var(--blue); }

.win-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  container-type: inline-size;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
.win-body > :last-child { margin-bottom: 0; }

/* ── Content blocks ───────────────────────────────────────── */
.hero { display: flex; flex-direction: column; justify-content: center; padding: clamp(14px, 2.5vw, 36px); }
.eyebrow { color: var(--cyan); font: 500 0.8rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.lede { font-size: clamp(1.1rem, 2.4cqi, 1.5rem); color: var(--fg-bright); max-width: 75ch; }
.hero p { max-width: 80ch; }
.hero h2 { font-size: clamp(1.4rem, 5cqi, 3rem); }
.hero > p:not([class]) { font-size: clamp(1rem, 2cqi, 1.2rem); }
.muted { color: var(--fg-dim); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  color: var(--fg-bright);
  font: 500 0.8667rem/1.2 var(--mono);
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.btn-primary:hover { background: var(--fg-bright); border-color: var(--fg-bright); color: var(--on-accent); }

.list { margin: 0 0 1em; padding: 0; list-style: none; }
.list li { position: relative; padding-left: 1.2em; margin-bottom: .3em; }
.list li::before { content: "›"; position: absolute; left: 0; color: var(--blue); font-family: var(--mono); }

.tags { --tag-pad: .3em .75em; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: var(--tag-pad);
  border-radius: 3px;
  background: var(--selection);
  color: var(--fg-bright);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}
/* Linked tags: the whole chip is the link */
.tags li:has(> a) { padding: 0; }
.tags a { flex: 1; align-self: stretch; display: flex; align-items: center; justify-content: center; padding: var(--tag-pad); border-radius: 3px; color: var(--blue); }
.tags a:hover { background: var(--muted); color: var(--fg-bright); }

.kv { margin: 0; font-size: 0.9333rem; line-height: 1.5; }
.kv div { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--selection); }
.kv div:last-child { border-bottom: 0; }
.kv dt { flex: 0 0 9ch; color: var(--magenta); }
.kv dd { margin: 0; color: var(--fg-bright); }
.kv dd a { color: var(--blue); }
.kv dd a:hover { color: var(--fg-bright); text-decoration: underline; }

/* fastfetch */
.fetch { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; align-content: center; justify-content: center; }
.fetch-logo {
  padding: 6px 14px;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font: 700 clamp(4rem, 14cqi, 8rem)/1 var(--mono);
  letter-spacing: -.04em;
}
.fetch-info { margin: 0; font-size: clamp(1rem, 2.4cqi, 1.2rem); line-height: 1.7; }
.fetch-info div { display: flex; gap: 8px; }
.fetch-info dt { color: var(--blue); font-weight: 700; }
.fetch-info dt::after { content: ":"; color: var(--fg-dim); }
.fetch-info dd { margin: 0; color: var(--fg); }
.swatches { display: flex; flex-basis: 100%; justify-content: center; }
.swatches i { width: 2.4rem; height: 1rem; }
.swatches i:nth-child(1) { background: var(--bg-light); }
.swatches i:nth-child(2) { background: var(--red); }
.swatches i:nth-child(3) { background: var(--green); }
.swatches i:nth-child(4) { background: var(--yellow); }
.swatches i:nth-child(5) { background: var(--blue); }
.swatches i:nth-child(6) { background: var(--magenta); }
.swatches i:nth-child(7) { background: var(--cyan); }
.swatches i:nth-child(8) { background: var(--fg-bright); }

/* experience */
.job + .job { margin-top: 1.4em; padding-top: 1.4em; border-top: 1px solid var(--selection); }
.job-meta { margin-bottom: .3em; font: 0.8rem/1.4 var(--mono); color: var(--fg-dim); }
.job-date { color: var(--yellow); }
.at { color: var(--fg-dim); font-weight: 400; }

/* experience: timeline drawn like git log --graph */
.small { font-size: 0.8667rem; }
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px;
  border-left: 2px solid var(--muted);
}
.timeline li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.timeline li::before {
  content: ""; position: absolute; left: 1px; top: 15px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--blue);
}
.timeline li.branch { padding-left: 44px; }
.timeline li.branch::after {
  content: ""; position: absolute; left: 8px; top: 4px; width: 18px; height: 16px;
  border: 2px solid var(--magenta); border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0;
}
.timeline li.branch::before { left: 19px; border-color: var(--magenta); }
.timeline li.branch-alt::after { border-color: var(--cyan); }
.timeline li.branch-alt::before { border-color: var(--cyan); }
.timeline li.root::before { border-color: var(--yellow); background: var(--yellow); }
.commit {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: none; color: var(--fg);
  font: 0.8667rem/1.4 var(--mono); text-align: left; cursor: pointer;
}
.commit:hover { background: var(--bg-light); }
.commit.is-selected { background: var(--selection); border-color: var(--muted); }
.commit strong { font-weight: 700; }
.commit-refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.7333rem; }
.hash { color: var(--yellow); }
.ref { padding: 0 6px; border-radius: 3px; }
.ref-head { background: var(--blue); color: var(--on-accent); }
.ref-branch { background: var(--magenta); color: var(--on-accent); }
.ref-tag { border: 1px solid var(--yellow); color: var(--yellow); }
.ref-alt { background: var(--cyan); color: var(--on-accent); }
.commit-sub { color: var(--fg-dim); font-size: 0.8rem; }

.role { font-size: .9333rem; }
.js .role:not(.is-shown) { display: none; }
.no-js .role + .role { margin-top: 2em; padding-top: 2em; border-top: 1px solid var(--selection); }
.role-title { font-size: 1.4rem; margin-bottom: .5em; }
/* Scope rows are short, so the bullet list gets the wider column; one column when the window is narrow */
.role-more { margin-top: 10px; }
.role-more > summary { cursor: pointer; color: var(--blue); font-size: .8667rem; width: fit-content; }
.role-more > summary:hover { color: var(--fg-bright); }
.role-more[open] > summary { margin-bottom: 4px; }
.role-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 20px; }
.role-grid .list { margin-bottom: 0; }
@container (max-width: 520px) { .role-grid { grid-template-columns: 1fr; } }
.role .sub { margin: .9em 0 .3em; }
.role .kv dt { flex-basis: 10ch; }
.role-link { margin-top: 1.4em; }

.case { padding: 6px 0 6px 12px; border-left: 2px solid var(--selection); margin-bottom: 8px; }
.case:hover { border-left-color: var(--blue); }
.case h3 { font-size: .92rem; margin-bottom: .3em; }
.case p:last-child { margin: 0; font-size: 0.9rem; }
.case-kicker { margin: 0 0 2px; color: var(--cyan); font: 0.7333rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.ws[data-layout="exp"] .stats { grid-template-columns: 1fr 1fr; height: auto; }
.ws[data-layout="exp"] .stats strong { font-size: clamp(1.3em, 9cqi, 2.2em); }

/* The experience page holds the most text, so it gets its own type size that leans on the
   viewport height (about 13px on a 1366×768 laptop, 18px at 1920×1080) and sizes its parts in em */
#experience { font-size: clamp(12px, calc(1px + .45vw + .8vh), 20px); line-height: 1.45; }
#experience p:not(:last-child) { margin-bottom: .6em; }
#experience h2 { font-size: 1.2em; }
#experience .small { font-size: .9em; }
#experience .timeline li { margin-bottom: 2px; }
#experience .commit { padding: .35em .6em; font-size: .93em; line-height: 1.3; }
#experience .commit-refs { font-size: .85em; }
#experience .commit-sub { font-size: .92em; }
#experience .role { font-size: 1em; }
#experience .role-title { font-size: 1.35em; }
#experience .job-meta { font-size: .85em; }
#experience .kv { font-size: .95em; }
#experience .kv div { padding: 3px 0; }
#experience .role .sub { margin: .7em 0 .25em; font-size: 1em; }
#experience .list li { margin-bottom: .2em; }
#experience .tags li { font-size: .88em; }
#experience .role-link { margin-top: .8em; }
#experience .case { padding: 3px 0 3px 10px; margin-bottom: 4px; }
#experience .case h3 { font-size: 1em; }
#experience .case p:last-child { font-size: .9em; line-height: 1.4; }
#experience .case-kicker { font-size: .78em; }
#experience .stats li { padding: 6px 10px; }
#experience .stats span { font-size: .85em; }

/* homelab */
.fill { display: flex; flex-direction: column; }
.fill > * { flex: none; min-width: 0; }
.fill > .topology { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.fill .topo-row { flex: 1 1 auto; max-height: 10rem; }
.fill .node { display: grid; place-items: center; font-size: 1.1rem; }
.fill .topo-link { flex: 0 1 3rem; }
.fill > .btn { align-self: flex-start; }
.topology { margin: 14px 0; text-align: center; }
.topo-label { margin: 6px 0; color: var(--fg-dim); font-size: 0.7333rem; text-transform: uppercase; letter-spacing: .12em; }
.topo-row { display: flex; justify-content: center; gap: 8px; }
.node {
  flex: 1 1 0; max-width: 14rem;
  padding: .9em 1em;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--bg-dark);
  color: var(--fg-bright);
  font-size: 0.9333rem;
}
.node.cp { border-color: var(--blue); color: var(--blue); }
.node b { font-weight: 500; }
.node { transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
/* Hover: the node takes the focused-window border, like Hyprland's active window */
.node:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-light), var(--bg-light)) padding-box,
    var(--active-border) border-box;
  /* Same green as the traffic diagram below the nodes */
  box-shadow: 0 8px 20px -10px var(--green);
  transform: translateY(-2px);
  color: var(--fg-bright);
}
.node:hover small { color: var(--fg-bright); }
.node small { display: block; margin-top: .45em; color: var(--fg); font-size: .62em; line-height: 1.45; }
/* Phones: nodes wrap two to a row, and rows size to their content */
@media (max-width: 600px) {
  .topo-row, .fill .topo-row { flex: none; flex-wrap: wrap; max-height: none; }
  .node { flex-basis: 40%; max-width: none; }
}
.hardware { margin: 10px 0 0; color: var(--fg); font-size: .8rem; }
.topo-link { width: min(60%, 28rem); height: 2rem; margin: 0 auto; border: 1px solid var(--muted); border-top: 0; border-bottom: 0; }
.flow {
  /* Sized to the diagram and centred; still scrolls if wider than the window */
  width: fit-content;
  max-width: 100%;
  align-self: center;
  margin: 0 auto 1.2em;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--bg-dark);
  color: var(--green);
  font-size: 0.9rem;
  line-height: 1.6;
}

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(max(9rem, 40%), 1fr)); grid-auto-rows: 1fr;
  gap: 6px; height: 100%; margin: 0; padding: 0; list-style: none;
}
.stats li {
  display: flex; flex-direction: column; justify-content: center;
  padding: 10px 12px;
  border-left: 2px solid var(--blue);
  background: var(--bg-dark);
}
.stats li:nth-child(2) { border-color: var(--green); }
.stats li:nth-child(3) { border-color: var(--yellow); }
.stats li:nth-child(4) { border-color: var(--magenta); }
.stats strong { font: 700 clamp(1.6rem, 8cqi, 3.2rem)/1.1 var(--mono); }
.stats small { font-size: .55em; margin-left: 2px; color: var(--fg-dim); }
.stats span { color: var(--fg-dim); font-size: 0.9rem; line-height: 1.4; }

.ok { color: var(--green); font: 700 0.9333rem/1.4 var(--mono); }
.quote { color: var(--magenta); font-style: italic; }
.footnote { margin: 1em 0 0; color: var(--fg-dim); font-size: .85rem; font-style: italic; }

.links { margin: 8px 0 0; padding: 0; list-style: none; }
.links a { display: inline-flex; gap: 14px; padding: 6px 0; font-size: clamp(1rem, 2.4cqi, 1.5rem); }
.links span { min-width: 9ch; color: var(--fg-dim); }
.links .loc { display: inline-flex; gap: 14px; padding: 6px 0; font-size: clamp(1rem, 2.4cqi, 1.5rem); min-width: 0; color: var(--fg-bright); }
.sub { font-size: .95rem; color: var(--magenta); }
.sub + .tags + .sub { margin-top: 1.2em; }
#skills .tags { --tag-pad: .5em .9em; gap: 8px; }
#skills .tags li { font-size: 1rem; }
#skills .sub { margin: 1em 0 .5em; }

/* ── Keybinds overlay ─────────────────────────────────────── */
.keybinds {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}
.keybinds[hidden] { display: none; }
.keybinds-win { width: min(460px, 100%); }
.keybinds .kv dt { flex-basis: 20ch; }

.footer { display: none; }

/* ── Small screens: stack windows vertically, let the page scroll ── */
@media (max-width: 900px) {
  .desktop { height: auto; min-height: calc(100dvh - var(--bar-h)); }
  .ws, .ws[data-layout] { display: flex; flex-direction: column; height: auto; }
  .js .ws:not(.is-active) { display: none; }
  .win-body { overflow: visible; }
  .win.is-fullscreen { position: relative; }
  .bar-center { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .workspaces a span { display: none; }
  .bar-btn-label { display: none; }
  .footer { display: block; padding: 0 16px 20px; color: var(--fg-dim); font: 0.8rem var(--mono); text-align: center; }
}
/* Narrow phones: time only */
@media (max-width: 600px) {
  .clock-date { display: none; }
}
@media (max-width: 380px) {
  .clock { display: none; }
}

/* Without JavaScript every workspace is shown, one after another */
.no-js .desktop { height: auto; }
.no-js .ws { height: auto; min-height: 70vh; margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  .ws.enter-right, .ws.enter-left { animation: none; }
  .win { transition: none; }
  .node { transition: none; }
  .node:hover { transform: none; }
}
