@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/plex-sans-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/plex-sans-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/plex-sans-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(fonts/plex-sans-700.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/plex-sans-400i.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/plex-mono-400.woff2) format("woff2"); }
:root {
  --bg: #0e1319;
  --side: #11171e;
  --card: #141a22;
  --line: #222b36;
  --ink: #e7ecf2;
  --ink2: #b9c2cd;
  --sub: #8b96a5;
  --blue: #5b9cf5;
  --green: #3ccf91;
  --amber: #e9b44c;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--ink); color-scheme: dark; }
body { margin: 0; font: 15px/1.6 var(--sans); }
a { color: var(--ink); text-decoration-color: rgba(91,156,245,.6); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
code { font: 13px var(--mono); color: var(--ink); }
[data-copy] { cursor: copy; border-bottom: 1px dashed #3a4656; position: relative; }
[data-copy]:hover { border-bottom-color: var(--blue); }
[data-copy].copied::after { content: "copied"; position: absolute; left: 0; top: -22px; font: 500 11px var(--sans); background: var(--blue); color: #fff; padding: 0 6px; border-radius: 4px; }
.slot { color: var(--sub); font-style: italic; }
.good { color: var(--green); } .warn { color: var(--amber); } .info { color: var(--blue); }

.layout { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }

/* sidebar */
.side { position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--side); border-right: 1px solid var(--line); padding: 30px 24px 22px; display: flex; flex-direction: column; gap: 20px; }
.me { display: flex; flex-direction: column; gap: 14px; }
.avatar { width: 78px; height: 78px; border-radius: 50%; background: #1b232d; border: 1px solid var(--line); display: grid; place-items: center; color: var(--sub); font-size: 12px; position: relative; }
.avatar .dot { position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--green); border: 3px solid var(--side); }
.side h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.tag { margin: 2px 0 0; color: var(--ink2); }
.tag b { color: var(--ink); font-weight: 600; }
.bio { margin: 0; }
.mini { margin: 0; display: grid; gap: 7px; font-size: 13.5px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mini div { display: grid; grid-template-columns: 78px 1fr; }
.mini dt { color: var(--sub); }
.mini dd { margin: 0; }
.ok { color: var(--green); font-size: 10px; vertical-align: 1px; }
.links { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.links a { text-decoration: none; color: var(--ink2); display: flex; justify-content: space-between; }
.links a::after { content: "↗"; color: var(--sub); transition: transform .2s; }
.links a:hover { color: var(--ink); }
.links a:hover::after { transform: translate(2px, -2px); color: var(--blue); }
.side-foot { margin-top: auto; font-size: 12px; color: var(--sub); letter-spacing: .02em; }

/* main: one column until wide, then map and tabs side by side */
main { padding: 24px 28px 48px; min-width: 0; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-content: start; }
@media (min-width: 1700px) {
  main { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; padding: 28px 36px 48px; }
  .mapcol { position: sticky; top: 28px; align-self: start; }
}

.mapcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 8px; }
.maphead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--sub); }
.maphead b { color: var(--ink); font-size: 14.5px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.mapcard svg { display: block; width: 100%; height: auto; }
.pop { position: absolute; z-index: 2; width: 270px; background: #18202a; border: 1px solid #2f3a48; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.pop .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sub); }
.pop b { display: block; font-size: 16px; margin: 2px 0 4px; }
.pop p { margin: 0; color: var(--ink2); }
.pop button { all: unset; position: absolute; right: 12px; top: 6px; cursor: pointer; color: var(--sub); }

.events { margin-top: 16px; }
h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--sub); font-weight: 500; }
.events ol { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.events li { display: grid; grid-template-columns: 74px 14px 1fr; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--ink2); }
.events time { color: var(--sub); font-family: var(--mono); font-size: 12.5px; }

/* tabs */
.tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { all: unset; cursor: pointer; padding: 9px 12px; font-weight: 500; font-size: 14.5px; color: var(--sub); white-space: nowrap; transition: color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--ink); }
.tabs .bar { position: absolute; bottom: 0; height: 2px; background: var(--blue); border-radius: 2px; transition: left .3s cubic-bezier(.3,1.3,.5,1), width .3s cubic-bezier(.3,1.3,.5,1); }
.panel { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }

/* projects as rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 210px 1fr auto; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows li:first-child { padding-top: 4px; }
.rows .name { font-weight: 600; }
.rows em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--green); margin-left: 8px; }
.rows em.wip { color: var(--amber); }
.rows p { margin: 0; color: var(--ink2); }
.stack { font: 12.5px var(--mono); color: var(--sub); white-space: nowrap; }

/* tables */
.t { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 18px; }
.t th { text-align: left; color: var(--sub); font-weight: 500; padding: 7px 14px 7px 0; border-bottom: 1px solid var(--line); }
.t td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.t.kv th { width: 120px; }
.t code { margin-right: 6px; }
.vis .meter { display: inline-block; width: 90px; height: 6px; background: #1d2530; border-radius: 3px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.vis .meter i { display: block; height: 100%; background: var(--green); }
.vis tr.muted td { color: var(--sub); }
.vis small { color: var(--sub); margin-left: 6px; }
.intro { color: var(--ink2); margin: 0 0 14px; max-width: 70ch; }
.fine { color: var(--sub); font-size: 13px; margin: 4px 0 0; }
.fine code { margin-right: 6px; }

/* looking glass */
.lgform { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.lgform label { display: grid; gap: 4px; font-size: 12px; color: var(--sub); }
.lgform .grow { flex: 1; min-width: 160px; }
.lgform select, .lgform input { font: 14px var(--sans); color: var(--ink); background: #10161d; border: 1px solid #2a3441; border-radius: 7px; padding: 7px 10px; }
.lgform input { font-family: var(--mono); font-size: 13.5px; width: 100%; }
.lgform select:focus, .lgform input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
.lgform button { font: 600 14px var(--sans); color: #fff; background: var(--blue); border: 0; border-radius: 7px; padding: 8px 18px; cursor: pointer; transition: filter .15s, transform .1s; }
.lgform button:hover { filter: brightness(1.1); }
.lgform button:active { transform: translateY(1px); }
.out { margin: 0; min-height: 220px; max-height: 420px; overflow: auto; background: #0a0e13; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font: 12.5px/1.55 var(--mono); color: #cfd8e3; white-space: pre; }
.out .dim { color: var(--sub); }
.out .hl { color: var(--green); }
.out .as { color: #c4a6ff; }
.out.busy { color: var(--sub); }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.posts a { text-decoration: none; font-weight: 500; }
.posts time { color: var(--sub); font-size: 13px; white-space: nowrap; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 20px 18px; gap: 14px; }
  .me { flex-direction: row; align-items: center; }
  .avatar { width: 60px; height: 60px; }
  .links { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .side-foot { display: none; }
  main { padding: 16px 14px 40px; }
  .mapcard { overflow-x: auto; }
  .mapcard svg { width: 760px; max-width: none; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* presence (Discord) */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar .initial { font-size: 30px; font-weight: 600; color: var(--ink2); }
.avatar .dot.online { background: var(--green); }
.avatar .dot.idle { background: #e9b44c; }
.avatar .dot.dnd { background: #ef6b5b; }
.avatar .dot.offline { background: #5b6573; }
.custom { margin: -6px 0 0; font-size: 14px; color: var(--ink2); display: flex; gap: 6px; align-items: center; }
.custom img { width: 18px; height: 18px; }
.legend .k-up { background: #3ccf91; } .legend .k-ix { background: #a98cf0; } .legend .k-intra { background: #5b9cf5; } .legend .k-svc { background: #e98bb0; }
.node { cursor: pointer; transition: opacity .25s; }
.node:focus { outline: none; }
.node:focus-visible rect, .node:focus-visible circle:first-of-type { stroke: #fff; }
.events .none { display: block; color: var(--sub); border: 0; }
.dim { color: var(--sub); }
.posts .slot { padding: 10px 0; border: 0; display: block; }
.err { color: #ef6b5b; }
.rows p { max-width: 78ch; }

/* very wide screens: scale the whole page so text keeps up with the map */
@media (min-width: 2200px) { body { zoom: 1.2; } }
@media (min-width: 2800px) { body { zoom: 1.4; } }
