:root {
  --bg: #131417;
  --fg: #e8eaed;
  --body: #b6bcc3;
  --muted: #8d949c;
  --dim: #6b727a;
  --rule: #26292e;
  --edge: #3a3e44;
  --accent: #c98a3a;
  --up: #3fb950;
  --down: #d1495b;
  --unknown: #4a5056;
  --on-invert: #131417;
  --invert: #e8eaed;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

:root[data-theme="light"] {
  --bg: #fbfbfc;
  --fg: #1c1e21;
  --body: #40464d;
  --muted: #6e757c;
  --dim: #8b9096;
  --rule: #e4e6e9;
  --edge: #c4c8cc;
  --accent: #8c5a17;
  --up: #1a7f37;
  --down: #b3223b;
  --unknown: #b9bec4;
  --on-invert: #fbfbfc;
  --invert: #1c1e21;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/static/fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/static/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.column {
  width: min(560px, 100% - 40px);
  margin: 0 auto;
  padding: 34px 0 44px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand, .controls { font: 500 12px var(--mono); }
.brand { color: var(--muted); }

.controls { display: flex; align-items: center; gap: 18px; }

.segmented {
  display: inline-flex;
  border: 1px solid var(--edge);
  border-radius: 4px;
  overflow: hidden;
}
.segmented button {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--edge);
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 3px 9px;
  cursor: pointer;
}
.segmented button:first-child { border-left: 0; }
.segmented button[aria-pressed="true"] { background: var(--invert); color: var(--on-invert); }

.lang { display: inline-flex; gap: 5px; }
.lang-on { color: var(--fg); font-weight: 600; }
.lang-sep { color: var(--edge); }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--fg); }

.api { color: var(--accent); text-decoration: none; }
.api:hover { text-decoration: underline; }

main { margin: 88px 0 auto; }

.identity { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }

.avatar {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--rule);
  object-fit: cover;
}

h1 { margin: 0 0 4px; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.alias { margin: 0; font: 400 13px var(--mono); color: var(--muted); }

.bio { margin: 0 0 40px; font-size: 15px; line-height: 1.7; color: var(--body); }

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.contacts li {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
}
.label { color: var(--muted); }
.value { font-family: var(--mono); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.value:hover { color: var(--accent); }

.action {
  appearance: none;
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: 3px;
  padding: 2px 9px;
  font: 500 10.5px var(--mono);
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.action:hover { color: var(--fg); border-color: var(--muted); }
.action[data-copied] { color: var(--up); border-color: var(--up); }

.facts { margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; }
.facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); }
.dim { color: var(--muted); }

.services {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 36px 0 0;
  font: 400 13px var(--mono);
  color: var(--muted);
}
.service { display: inline-flex; align-items: center; gap: 7px; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--unknown);
  transition: background 200ms;
}
.dot[data-state="up"] { background: var(--up); }
.dot[data-state="down"] { background: var(--down); }

footer {
  margin-top: 96px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font: 400 11.5px var(--mono);
  color: var(--dim);
}

@media (max-width: 560px) {
  main { margin-top: 56px; }
  .contacts li { grid-template-columns: 88px 1fr auto; }
  .facts > div { grid-template-columns: 88px 1fr; }
  footer { margin-top: 56px; }
}

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