:root,
[data-theme="light"] {
  --ink: #1a1a1a;
  --muted: #6e6e6e;
  --line: #d8d8d8;
  --bg: #fafafa;
}
[data-theme="dark"] {
  --ink: #ededed;
  --muted: #8a8a8a;
  --line: #2e2e2e;
  --bg: #141414;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 72px 32px 80px;
  position: relative;
}
.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  background: #1a1a1a;
  color: #fafaf8;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  z-index: 10;
}
.theme-toggle:hover { opacity: 0.85; }
[data-theme="dark"] .theme-toggle {
  background: #fafaf8;
  color: #1a1a1a;
  border-color: #fafaf8;
}
.layout {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 56px;
  align-items: start;
}
.content > :first-child {
  margin-top: 0;
}
.sidebar .portrait {
  width: 160px;
  display: block;
  filter: grayscale(100%);
}
h1 {
  font-weight: 400;
  font-size: 2.25rem;
  letter-spacing: 0.04em;
  margin: 0 0 40px;
}
h2 {
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 44px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
p {
  margin: 0 0 20px;
}
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover {
  text-decoration-color: var(--ink);
}
.links {
  list-style: disc;
  padding: 0 0 0 1.4em;
  margin: 0;
}
.links li {
  padding: 4px 0;
}
@media (max-width: 720px) {
  main { padding: 56px 22px 72px; }
  .layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .sidebar {
    order: -1;
    text-align: center;
  }
  .sidebar .portrait {
    width: 180px;
    margin: 0 auto;
  }
  h1 { font-size: 1.75rem; margin-bottom: 28px; }
}
