/* ==========================================================================
   tomasvlach.cz – Jira-inspired flat UI
   ========================================================================== */

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --bg: #ffffff;
  --bg-sunken: #f7f8f9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --hover: #091e420f;
  --pressed: #091e4224;
  --text: #172b4d;
  --text-subtle: #44546f;
  --text-subtlest: #626f86;
  --border: #091e4224;
  --border-strong: #091e4240;

  --brand: #0c66e4;
  --brand-hover: #0055cc;
  --brand-text: #ffffff;
  --selected-bg: #e9f2ff;
  --selected-text: #0c66e4;

  --green-bg: #dcfff1;  --green: #216e4e;  --green-bold: #22a06b;
  --blue-bg: #e9f2ff;   --blue: #0055cc;   --blue-bold: #1d7afc;
  --purple-bg: #f3f0ff; --purple: #5e4db2; --purple-bold: #8270db;
  --teal-bg: #e7f9ff;   --teal: #206a83;   --teal-bold: #1d9aaa;
  --yellow-bg: #fff7d6; --yellow: #7f5f01; --yellow-bold: #e2b203;
  --red-bg: #ffeceb;    --red: #ae2e24;    --red-bold: #e34935;
  --grey-bg: #dfe1e6;   --grey: #44546f;

  --shadow-raised: 0 1px 1px #091e4240, 0 0 1px #091e424f;
  --shadow-overlay: 0 8px 12px #091e4226, 0 0 1px #091e424f;
  --radius: 8px;
  --radius-sm: 4px;
  --topbar-h: 56px;
  --sidebar-w: 240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

:root[data-theme="dark"] {
  --bg: #1d2125;
  --bg-sunken: #161a1d;
  --surface: #22272b;
  --surface-raised: #282e33;
  --hover: #a1bdd914;
  --pressed: #a6c5e229;
  --text: #b6c2cf;
  --text-subtle: #9fadbc;
  --text-subtlest: #8c9bab;
  --border: #a6c5e229;
  --border-strong: #a6c5e240;

  --brand: #579dff;
  --brand-hover: #85b8ff;
  --brand-text: #1d2125;
  --selected-bg: #1c2b41;
  --selected-text: #579dff;

  --green-bg: #1c3329;  --green: #7ee2b8;
  --blue-bg: #1c2b41;   --blue: #85b8ff;
  --purple-bg: #2b273f; --purple: #b8acf6;
  --teal-bg: #1e3137;   --teal: #9dd9ee;
  --yellow-bg: #332e1b; --yellow: #f8e6a0;
  --red-bg: #42221f;    --red: #fd9891;
  --grey-bg: #2c333a;   --grey: #b6c2cf;

  --shadow-raised: 0 1px 1px #03040442, 0 0 1px #03040480;
  --shadow-overlay: 0 8px 12px #0304045c, 0 0 1px #03040480;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 14px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; color: var(--text); }
p { margin: 0 0 12px; }
kbd {
  font: 500 11px/1 var(--mono);
  padding: 3px 5px;
  border-radius: 3px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-subtle);
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.muted { color: var(--text-subtlest); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 4px; }
.skip-link:focus { left: 8px; }

/* ----- Boot screen ----------------------------------------------------- */
#boot {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .5s var(--ease), visibility .5s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(360px, 84vw); text-align: center; }
.boot-logo { display: inline-block; animation: boot-pop .7s var(--ease) both; }
.boot-logo svg { width: 64px; height: 64px; stroke: none; }
.boot-logo-bg { fill: var(--brand); }
.boot-logo text { fill: #fff; font: 800 24px var(--font); }
.boot-title { margin-top: 14px; font-weight: 700; font-size: 18px; animation: fade-up .6s .15s var(--ease) both; }
.boot-bar { margin: 18px auto 14px; height: 4px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--purple-bold)); border-radius: 4px; transition: width .25s ease; }
.boot-log { list-style: none; margin: 0; padding: 0; text-align: left; font: 12px/1.9 var(--mono); color: var(--text-subtlest); min-height: 115px; }
.boot-log li { animation: fade-up .3s var(--ease) both; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boot-log li::before { content: "✓ "; color: var(--green-bold); }
.boot-log li.run::before { content: "› "; color: var(--brand); }

@keyframes boot-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ----- Top bar --------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius-sm); color: var(--text); font-weight: 700; }
.brand:hover { background: var(--hover); text-decoration: none; }
.brand-logo, .project-avatar {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 800;
}
.topnav { display: flex; gap: 2px; margin-left: 8px; }
.topnav a {
  position: relative; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-subtle); font-weight: 600;
}
.topnav a:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.topnav a.active { color: var(--selected-text); }
.topnav a.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -10px; height: 3px; border-radius: 3px 3px 0 0; background: var(--selected-text); }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  font: 600 14px var(--font);
  border: 0; border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
  background: var(--hover); color: var(--text);
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--pressed); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.btn-primary { background: var(--brand); color: var(--brand-text); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-subtle { background: transparent; }
.btn-subtle:hover { background: var(--hover); }

.icon-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-subtle); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.i-moon { display: none; }
[data-theme="dark"] .i-moon { display: block; }
[data-theme="dark"] .i-sun { display: none; }

.search-trigger {
  display: flex; align-items: center; gap: 8px;
  width: 240px; height: 32px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--surface); color: var(--text-subtlest);
  font: 14px var(--font); cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.search-trigger:hover { border-color: var(--text-subtlest); }
.search-trigger .search-placeholder { flex: 1; text-align: left; }
.top-avatar { width: 28px; height: 28px; border-radius: 50%; margin-left: 4px; }
.only-mobile { display: none; }

/* ----- Layout / sidebar ------------------------------------------------ */
.layout { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  position: sticky; top: var(--topbar-h);
  width: var(--sidebar-w); height: calc(100vh - var(--topbar-h));
  flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 16px 8px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.project { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.project-avatar { width: 32px; height: 32px; font-size: 12px; background: linear-gradient(135deg, var(--brand), var(--purple-bold)); }
.project-name { font-weight: 700; }
.project-type { font-size: 12px; color: var(--text-subtlest); }
.side-label { padding: 12px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-subtlest); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--text-subtle); font-weight: 500;
  transition: background .12s, color .12s;
}
.side-nav a:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.side-nav a.active { background: var(--selected-bg); color: var(--selected-text); font-weight: 600; }
.side-nav a.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--selected-text); }
.side-nav .count { margin-left: auto; font-size: 12px; padding: 0 6px; border-radius: 10px; background: var(--hover); color: var(--text-subtle); }
.side-footer { margin-top: auto; display: flex; gap: 4px; padding: 8px; border-top: 1px solid var(--border); }
.side-footer a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--text-subtle); }
.side-footer a:hover { background: var(--hover); color: var(--brand); }
.scrim { display: none; }

main { flex: 1; min-width: 0; outline: none; }
.view { padding: 24px 40px 64px; max-width: 1280px; }
.view.leaving { animation: view-out .14s ease forwards; }
.view.entering > * { animation: fade-up .45s var(--ease) both; }
.view.entering > *:nth-child(2) { animation-delay: .04s; }
.view.entering > *:nth-child(3) { animation-delay: .08s; }
.view.entering > *:nth-child(4) { animation-delay: .12s; }
.view.entering > *:nth-child(5) { animation-delay: .16s; }
@keyframes view-out { to { opacity: 0; transform: translateY(-4px); } }

/* ----- Page header ----------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--text-subtlest); margin-bottom: 10px; }
.crumbs a { color: var(--text-subtlest); }
.crumbs a:hover { color: var(--text); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head .actions { display: flex; gap: 8px; }

/* ----- Generic cards / lozenges ---------------------------------------- */
.card {
  background: var(--surface-raised);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  padding: 20px;
}
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card .sub { color: var(--text-subtlest); font-size: 13px; margin-bottom: 16px; }

.lozenge {
  display: inline-flex; align-items: center;
  padding: 0 5px; height: 18px; border-radius: 3px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  background: var(--grey-bg); color: var(--grey); white-space: nowrap;
}
.lozenge.green { background: var(--green-bg); color: var(--green); }
.lozenge.blue { background: var(--blue-bg); color: var(--blue); }
.lozenge.purple { background: var(--purple-bg); color: var(--purple); }
.lozenge.teal { background: var(--teal-bg); color: var(--teal); }
.lozenge.yellow { background: var(--yellow-bg); color: var(--yellow); }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  border-radius: 3px; border: 1px solid var(--border-strong);
  font-size: 12px; color: var(--text-subtle); white-space: nowrap;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.type-icon { width: 16px; height: 16px; border-radius: 3px; display: inline-grid; place-items: center; flex-shrink: 0; }
.type-icon svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; }
.type-story { background: #22a06b; }
.type-task { background: #1d7afc; }
.type-bug { background: #e34935; }
.type-epic { background: #8270db; }

.prio { display: inline-flex; }
.prio svg { width: 16px; height: 16px; stroke-width: 2.4; }
.prio.high svg { stroke: #e34935; }
.prio.medium svg { stroke: #e2b203; }
.prio.low svg { stroke: #1d7afc; }

/* ----- Summary (home) -------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center;
  padding: 36px;
  border-radius: 12px;
  background:
    radial-gradient(1200px 400px at -10% -20%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
    radial-gradient(700px 400px at 110% 120%, color-mix(in srgb, var(--purple-bold) 20%, transparent), transparent 60%),
    var(--surface-raised);
  box-shadow: var(--shadow-raised);
  margin-bottom: 24px;
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-subtle); padding: 4px 10px; border-radius: 20px; background: var(--hover); margin-bottom: 16px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bold); box-shadow: 0 0 0 0 var(--green-bold); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-bold) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand), var(--purple-bold) 60%, var(--teal-bold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-typed { margin: 16px 0 24px; font-size: 17px; color: var(--text-subtle); min-height: 27px; }
.hero-typed .typed { color: var(--text); font-weight: 600; }
.hero-typed .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; margin-left: 2px; background: var(--brand); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-cta .btn { height: 40px; padding: 0 16px; }

/* animated workflow diagram */
.workflow { width: 100%; height: auto; }
.workflow .wf-node rect { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.workflow .wf-node text { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .03em; stroke: none; }
.workflow .wf-node.todo text { fill: var(--grey); }
.workflow .wf-node.prog rect { fill: var(--blue-bg); stroke: none; }
.workflow .wf-node.prog text { fill: var(--blue); }
.workflow .wf-node.rev rect { fill: var(--purple-bg); stroke: none; }
.workflow .wf-node.rev text { fill: var(--purple); }
.workflow .wf-node.done rect { fill: var(--green-bg); stroke: none; }
.workflow .wf-node.done text { fill: var(--green); }
.workflow .wf-edge { stroke: var(--border-strong); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; animation: dash 1.2s linear infinite; }
.workflow .wf-label { font: 500 10px var(--mono); fill: var(--text-subtlest); stroke: none; }
.workflow .wf-token { fill: var(--brand); stroke: none; filter: drop-shadow(0 0 4px var(--brand)); }
.workflow .wf-node { transition: transform .3s; transform-box: fill-box; transform-origin: center; }
.workflow .wf-node.hit { animation: node-hit .5s var(--ease); }
@keyframes node-hit { 40% { transform: scale(1.08); } }
@keyframes dash { to { stroke-dashoffset: -16; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { position: relative; overflow: hidden; }
.stat .num { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--text-subtle); font-size: 13px; font-weight: 500; }
.stat .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease); }
.stat.in .bar { transform: scaleX(1); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; }
.about p { color: var(--text-subtle); font-size: 15px; line-height: 1.7; }
.about p strong { color: var(--text); }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.activity li:first-child { border-top: 0; }
.activity .who { width: 32px; height: 32px; border-radius: 50%; }
.activity .what { font-size: 14px; }
.activity .what a { font-weight: 600; }
.activity .when { font-size: 12px; color: var(--text-subtlest); }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 120px; height: 120px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 6; stroke-linecap: butt; }
.donut .seg { transition: stroke-dasharray 1.2s var(--ease); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }

/* ----- Issue list (articles) ------------------------------------------- */
.jql {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.jql-box {
  flex: 1; min-width: 260px;
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 10px;
  border: 2px solid var(--border-strong); border-radius: 6px;
  background: var(--surface);
  transition: border-color .15s;
}
.jql-box:focus-within { border-color: var(--brand); }
.jql-box.err { border-color: var(--red-bold); }
.jql-box .mode { font: 700 11px var(--mono); color: var(--purple); background: var(--purple-bg); padding: 2px 6px; border-radius: 3px; }
.jql-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 13px var(--mono); }
.jql-hint { font-size: 12px; color: var(--text-subtlest); margin: -8px 0 16px; font-family: var(--mono); }
.jql-hint button { font: inherit; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; }
.jql-hint button:hover { text-decoration: underline; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-subtle); font: 500 13px var(--font); cursor: pointer; transition: all .15s; }
.chip:hover { background: var(--hover); }
.chip.on { background: var(--selected-bg); border-color: var(--selected-text); color: var(--selected-text); }

.issue-table { width: 100%; border-collapse: collapse; background: var(--surface-raised); border-radius: var(--radius); box-shadow: var(--shadow-raised); overflow: hidden; }
.issue-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-subtle); padding: 10px 12px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.issue-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.issue-table tbody tr { cursor: pointer; transition: background .12s; }
.issue-table tbody tr:hover { background: var(--hover); }
.issue-table tbody tr:last-child td { border-bottom: 0; }
.issue-table .key { font-weight: 600; white-space: nowrap; color: var(--text-subtle); }
.issue-table .sum { font-weight: 500; color: var(--text); }
.issue-table .ex { display: block; font-size: 12px; color: var(--text-subtlest); margin-top: 2px; }
.issue-table .date { white-space: nowrap; color: var(--text-subtle); font-size: 13px; }
.issue-table tr.row-in { animation: fade-up .35s var(--ease) both; }
.empty { padding: 48px 16px; text-align: center; color: var(--text-subtlest); }
.empty svg { width: 48px; height: 48px; margin: 0 auto 8px; stroke-width: 1.2; }
.result-count { font-size: 12px; color: var(--text-subtlest); margin: 12px 2px 0; }

.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.post-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-overlay); }
.post-card .cover { aspect-ratio: 16/8; background: var(--bg-sunken); overflow: hidden; border-bottom: 1px solid var(--border); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .5s var(--ease); }
.post-card:hover .cover img { transform: scale(1.04); }
.post-card .body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.post-card .meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-subtlest); font-weight: 600; }
.post-card h3 { font-size: 15px; line-height: 1.35; }

/* ----- Issue detail (article) ------------------------------------------ */
.issue { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.issue h1 { font-size: 26px; font-weight: 600; line-height: 1.25; margin-bottom: 12px; }
.issue-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.issue-section-title { font-size: 14px; font-weight: 600; margin: 24px 0 8px; }
.prose { font-size: 15px; line-height: 1.75; color: var(--text); }
.prose p { margin: 0 0 14px; }
.prose code { font: 13px var(--mono); padding: 2px 5px; border-radius: 3px; background: var(--bg-sunken); border: 1px solid var(--border); color: var(--red); }
.prose pre { position: relative; margin: 16px 0; padding: 14px 16px; border-radius: 6px; background: #1d2125; color: #b6c2cf; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; color: #7ee2b8; }
.prose pre .copy { position: absolute; top: 8px; right: 8px; height: 26px; font-size: 12px; background: #2c333a; color: #b6c2cf; }
.prose blockquote { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--brand); background: var(--selected-bg); border-radius: 0 6px 6px 0; }
.prose blockquote p { margin: 0 0 4px; }
.prose cite { font-size: 13px; font-style: normal; }
.prose figure { margin: 20px 0; }
.prose figure img { border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; background: #fff; }
.prose figcaption { font-size: 12px; color: var(--text-subtlest); margin-top: 6px; }
.prose .note { margin: 16px 0; padding: 12px 16px; border-radius: 6px; background: var(--yellow-bg); color: var(--yellow); font-size: 14px; }
.details { position: sticky; top: calc(var(--topbar-h) + 24px); }
.details .status-btn { width: 100%; justify-content: space-between; margin-bottom: 16px; background: var(--green-bg); color: var(--green); }
.details dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; row-gap: 14px; column-gap: 8px; font-size: 14px; }
.details dt { color: var(--text-subtle); font-weight: 600; font-size: 13px; }
.details dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.details dd img { width: 24px; height: 24px; border-radius: 50%; }
.details .footnote { font-size: 12px; color: var(--text-subtlest); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.reading-progress { position: fixed; top: var(--topbar-h); left: 0; height: 2px; width: 100%; background: var(--brand); transform-origin: left; transform: scaleX(0); z-index: 40; }
.sibling-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.sibling-nav a { padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.sibling-nav a:hover { background: var(--hover); text-decoration: none; }
.sibling-nav small { display: block; color: var(--text-subtlest); font-size: 12px; }
.sibling-nav .next { text-align: right; grid-column: 2; }

/* ----- Timeline -------------------------------------------------------- */
.roadmap { padding: 0; overflow: hidden; }
.roadmap-scroll { overflow-x: auto; }
.roadmap-grid { position: relative; min-width: 820px; }
.rm-head, .rm-row { display: grid; grid-template-columns: 220px 1fr; }
.rm-head { border-bottom: 1px solid var(--border); background: var(--bg-sunken); font-size: 12px; font-weight: 600; color: var(--text-subtle); }
.rm-head > div:first-child, .rm-row > .rm-name { padding: 10px 16px; border-right: 1px solid var(--border); }
.rm-years { position: relative; display: flex; }
.rm-years span { flex: 1; padding: 10px 0 10px 6px; border-left: 1px solid var(--border); }
.rm-row { border-bottom: 1px solid var(--border); min-height: 52px; }
.rm-row:last-child { border-bottom: 0; }
.rm-row:hover { background: var(--hover); }
.rm-name { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.rm-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-track { position: relative; }
.rm-gridlines { position: absolute; inset: 0; display: flex; pointer-events: none; }
.rm-gridlines i { flex: 1; border-left: 1px solid var(--border); }
.rm-bar {
  position: absolute; top: 50%; height: 24px; margin-top: -12px;
  border-radius: 4px; display: flex; align-items: center; padding: 0 8px;
  font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden;
  transform-origin: left; transform: scaleX(0);
  transition: transform 1s var(--ease);
  cursor: pointer;
}
.rm-bar.in { transform: scaleX(1); }
.rm-bar.blue { background: var(--blue-bold); }
.rm-bar.purple { background: var(--purple-bold); }
.rm-bar.teal { background: var(--teal-bold); }
.rm-bar.ongoing { background-image: linear-gradient(90deg, transparent 85%, rgba(255,255,255,.35)); }
.rm-milestone { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--yellow-bold); transform: rotate(45deg) scale(0); border-radius: 2px; transition: transform .5s var(--ease) .8s; cursor: pointer; }
.rm-milestone.in { transform: rotate(45deg) scale(1); }
.rm-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red-bold); pointer-events: none; z-index: 2; }
.rm-today::before { content: "Today"; position: absolute; top: 6px; left: 4px; font-size: 10px; font-weight: 700; color: #fff; background: var(--red-bold); padding: 1px 4px; border-radius: 3px; }
.rm-group { background: var(--bg-sunken); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-subtlest); padding: 6px 16px; border-bottom: 1px solid var(--border); }

.epics { display: grid; gap: 16px; margin-top: 24px; }
.epic { border-left: 4px solid var(--blue-bold); scroll-margin-top: 80px; }
.epic.purple { border-color: var(--purple-bold); }
.epic.teal { border-color: var(--teal-bold); }
.epic.yellow { border-color: var(--yellow-bold); }
.epic.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: var(--shadow-raised); } }
.epic-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.epic h3 { font-size: 17px; }
.epic .role { color: var(--text-subtle); font-weight: 600; margin: 2px 0 10px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; color: var(--text-subtle); }
.checklist li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--green-bold); stroke-width: 2.4; }

/* ----- Board ----------------------------------------------------------- */
.board-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.board-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); width: 200px; }
.board-search input { border: 0; outline: 0; background: transparent; color: var(--text); font: 14px var(--font); width: 100%; }
.board { user-select: none; display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.column { background: var(--bg-sunken); border-radius: 6px; padding: 8px; min-height: 200px; transition: background .15s, box-shadow .15s; }
.column.over { background: var(--selected-bg); box-shadow: inset 0 0 0 2px var(--brand); }
.column-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-subtle); letter-spacing: .02em; }
.column-head .n { font-weight: 500; color: var(--text-subtlest); }
.column-head .done-check { margin-left: auto; color: var(--green-bold); }
.cards { display: grid; gap: 6px; min-height: 40px; }
.kcard {
  background: var(--surface-raised); border-radius: 4px; padding: 10px 12px;
  box-shadow: var(--shadow-raised); cursor: grab; user-select: none;
  transition: transform .15s var(--ease), box-shadow .15s, opacity .15s;
  touch-action: none;
}
.kcard:hover { background: color-mix(in srgb, var(--surface-raised) 92%, var(--text)); }
.kcard.dragging { opacity: .35; }
.kcard.ghost { position: fixed; z-index: 500; pointer-events: none; transform: rotate(3deg) scale(1.03); box-shadow: var(--shadow-overlay); cursor: grabbing; }
.kcard.hidden { display: none; }
.kcard .t { font-weight: 500; margin-bottom: 10px; }
.kcard .foot { display: flex; align-items: center; gap: 6px; }
.kcard .foot .k { font-size: 12px; font-weight: 600; color: var(--text-subtle); }
.kcard .foot .pts { margin-left: auto; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--grey-bg); color: var(--grey); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.drop-marker { height: 3px; border-radius: 2px; background: var(--brand); margin: -1px 0; }
.board-hint { font-size: 12px; color: var(--text-subtlest); margin-top: 12px; }

/* ----- Profile / resume ------------------------------------------------ */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head img { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--brand); }
.profile-head h1 { font-size: 28px; font-weight: 800; }
.profile-head .role { color: var(--text-subtle); font-size: 16px; }
.profile-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cert { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 6px; transition: border-color .15s, transform .15s; }
.cert:hover { border-color: var(--brand); transform: translateY(-2px); }
.cert .badge { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font: 700 11px var(--mono); color: #fff; background: linear-gradient(135deg, #0078d4, #50e6ff); flex-shrink: 0; }
.cert .n { font-weight: 600; font-size: 13px; line-height: 1.35; }
.cert .v { font-size: 12px; color: var(--text-subtlest); }
.section-title { font-size: 18px; font-weight: 700; margin: 32px 0 12px; display: flex; align-items: center; gap: 8px; }

/* ----- Contact --------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.contact-tiles { display: grid; gap: 12px; }
.contact-tile { display: flex; align-items: center; gap: 14px; padding: 16px; color: var(--text); }
.contact-tile:hover { text-decoration: none; box-shadow: var(--shadow-overlay); }
.contact-tile .ico { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--selected-bg); color: var(--brand); }
.contact-tile .ico svg { width: 20px; height: 20px; }
.contact-tile b { display: block; }
.contact-tile small { color: var(--text-subtlest); }

.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-subtle); }
.field label .req { color: var(--red-bold); }
.field input, .field textarea, .field select {
  font: 14px var(--font); color: var(--text);
  padding: 8px 10px; border-radius: 4px;
  border: 2px solid var(--border-strong); background: var(--bg-sunken);
  transition: border-color .15s, background .15s;
}
.field input:hover, .field textarea:hover, .field select:hover { background: var(--hover); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--brand); background: var(--surface); }
.field textarea { min-height: 110px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ----- Overlays: palette, modal, flags --------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 200; background: #091e427d; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade-in .15s ease; }
.overlay[hidden] { display: none; }
.palette, .modal { width: min(600px, 100%); background: var(--surface-raised); border-radius: 8px; box-shadow: var(--shadow-overlay); overflow: hidden; animation: pop .2s var(--ease); }
@keyframes pop { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--border); color: var(--text-subtlest); }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: 16px var(--font); }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list .grp { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-subtlest); letter-spacing: .04em; }
.palette-list .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.palette-list .it.sel { background: var(--selected-bg); color: var(--selected-text); }
.palette-list .it .hint { margin-left: auto; font-size: 12px; color: var(--text-subtlest); }
.palette-list .it mark { background: none; color: var(--brand); font-weight: 700; }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-subtlest); }
.palette-foot kbd { margin-right: 2px; }

.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 8px; }
.modal-head h2 { font-size: 20px; font-weight: 600; }
.modal-body { padding: 8px 24px 16px; }
.modal-foot { padding: 12px 24px 20px; }
.shortcut-list { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 14px; }
.shortcut-list span:nth-child(even) { text-align: right; }

.lightbox { position: fixed; inset: 0; z-index: 300; background: #000c; display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade-in .2s; }
.lightbox img { max-height: 90vh; border-radius: 6px; background: #fff; animation: pop .25s var(--ease); }

.flags { position: fixed; left: 24px; bottom: 24px; z-index: 400; display: grid; gap: 8px; }
.flag { display: flex; gap: 12px; align-items: flex-start; width: min(380px, calc(100vw - 48px)); padding: 14px 16px; background: var(--surface-raised); border-radius: 6px; box-shadow: var(--shadow-overlay); animation: flag-in .35s var(--ease); }
.flag.out { animation: flag-out .25s ease forwards; }
.flag .ic { color: var(--green-bold); }
.flag.info .ic { color: var(--brand); }
.flag b { display: block; }
.flag small { color: var(--text-subtle); }
@keyframes flag-in { from { transform: translateX(-20px); opacity: 0; } }
@keyframes flag-out { to { transform: translateX(-20px); opacity: 0; } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 450; }

/* skeleton shimmer used while a view "loads" */
.skeleton { display: grid; gap: 16px; }
.sk { border-radius: 6px; background: linear-gradient(90deg, var(--hover) 25%, var(--pressed) 37%, var(--hover) 63%); background-size: 400% 100%; animation: shimmer 1.2s ease infinite; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.noscript { padding: 40px; }

/* ----- Responsive ------------------------------------------------------ */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero .workflow { max-width: 480px; }
  .grid-2, .issue, .contact-grid { grid-template-columns: 1fr; }
  .details { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topnav, .search-trigger .search-placeholder, .search-trigger kbd, .create-btn span, .top-avatar { display: none; }
  .search-trigger { width: 32px; padding: 0; justify-content: center; border: 0; border-radius: 50%; background: transparent; }
  .search-trigger:hover { background: var(--hover); }
  .create-btn { width: 32px; padding: 0; justify-content: center; }
  .only-mobile { display: grid; }
  .sidebar { position: fixed; top: var(--topbar-h); left: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-overlay); }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: var(--topbar-h) 0 0; z-index: 55; background: #091e4250; }
  .view { padding: 16px 16px 48px; }
  .hero { padding: 24px 20px; }
  .board { grid-template-columns: repeat(3, minmax(240px, 82vw)); scroll-snap-type: x mandatory; }
  .column { scroll-snap-align: start; }
  .issue-table .col-labels, .issue-table .col-updated, .issue-table .col-prio { display: none; }
  .flags { left: 16px; bottom: 16px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .num { font-size: 26px; }
  .brand-name { display: none; }
  .sibling-nav { grid-template-columns: 1fr; }
  .sibling-nav .next { grid-column: 1; }
  .details dl { grid-template-columns: 100px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ----- Print: the Resume page becomes a clean CV ----------------------- */
@media print {
  .topbar, .sidebar, .flags, .page-head .actions, .profile-links .btn, #boot, .reading-progress { display: none !important; }
  body { background: #fff; color: #000; }
  .view { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}
