/* Minimal site: plain text and links. Dark by default, light on request. */
:root {
  --bg: #121212;
  --text: #ececec;
  --muted: #9a9a9a;
  --soft: #c9c9c9;
  --link: #8fb3ff;
  --line: #2a2a2a;
  --hover: #222;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fff;
  --text: #111;
  --muted: #6b6b6b;
  --soft: #333;
  --link: #1a4bd8;
  --line: #ececec;
  --hover: #f1f1f1;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 64px;
}

/* Sidebar */
.side { position: sticky; top: 64px; align-self: start; }
.photo { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 4px; background: var(--hover); }
.side-head { position: relative; }
.theme {
  position: absolute; top: 0; left: 132px;
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--muted);
}
.theme:hover { color: var(--text); background: var(--hover); }
.theme svg, .ctl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 16px 0 2px; }
.side .tag { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.5; }
.side nav ul, .side-links { list-style: none; padding: 0; margin: 24px 0 0; }
.side nav li { margin: 2px 0; }
.side nav a { color: var(--text); text-decoration: none; }
.side nav a:hover { text-decoration: underline; }
.side-links { font-size: 14px; }
.side-links li { margin: 2px 0; }

/* Content */
.content section { margin: 0 0 44px; scroll-margin-top: 32px; }
.content h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0 0 10px;
}
.content p { margin: 0 0 12px; max-width: 64ch; }
.items { list-style: none; padding: 0; margin: 0; }
.item { padding: 8px 0; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.title { font-weight: 500; min-width: 0; }
a.title { color: var(--link); }
.right { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.date { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: 13.5px; }
.meta strong { color: var(--soft); font-weight: 600; }
.desc { color: var(--soft); font-size: 14px; max-width: 72ch; margin-top: 2px; }

footer { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 16px; }

@media (max-width: 760px) {
  .page { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 56px; }
  .side { position: static; }
  .side-head { display: flex; align-items: center; gap: 14px; }
  .theme { position: static; margin-left: auto; flex-shrink: 0; }
  .photo { width: 64px; height: 64px; border-radius: 50%; }
  .side h1 { margin: 0; font-size: 18px; }
  .side nav ul, .side-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; }
  .side-links { margin-top: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .content section { margin-bottom: 32px; }
  .row { gap: 12px; }
}
