:root {
  --bg: #090909;
  --text: #f4f4f4;
  --muted: #9b9b9b;
  --soft: #6c6c6c;
  --line: #232323;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f7f7f5;
  --text: #111111;
  --muted: #5f5f5f;
  --soft: #8b8b8b;
  --line: #e6e6e3;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
html[data-theme="light"] a:hover { color: #111; }

strong {
  color: var(--text);
  font-weight: 500;
}

.shell {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #d8d8d8;
}

html[data-theme="light"] .brand { color: #222; }

.back {
  color: var(--soft);
  font-size: 13px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.045em;
  font-weight: 500;
  line-height: 1.1;
}

.updated {
  margin: 0 0 40px;
  color: var(--soft);
  font-size: 13px;
}

h2 {
  margin: 42px 0 14px;
  font-size: 18px;
  letter-spacing: -0.025em;
  font-weight: 500;
}

h3 {
  margin: 28px 0 10px;
  font-size: 15px;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: #d0d0d0;
}

html[data-theme="light"] h3 { color: #333; }

p, address {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
}

.meta a {
  color: #d8d8d8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #333;
}

html[data-theme="light"] .meta a {
  color: #111;
  text-decoration-color: #bbb;
}

.site-footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: #555;
  font-size: 12px;
}

html[data-theme="light"] .site-footer { color: #888; }

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: #999;
  font-size: 13px;
}

.footer-links a:hover { color: #fff; }
html[data-theme="light"] .footer-links a { color: #777; }
html[data-theme="light"] .footer-links a:hover { color: #111; }

#theme-toggle {
  position: fixed;
  left: 18px;
  right: auto;
  bottom: 18px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(18,18,18,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f4f4f4;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}

#theme-toggle svg { width: 20px; height: 20px; display: block; }
#theme-toggle .icon-sun { display: block; }
#theme-toggle .icon-moon { display: none; }

html[data-theme="light"] #theme-toggle {
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.1);
  color: #111;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

html[data-theme="light"] #theme-toggle .icon-sun { display: none; }
html[data-theme="light"] #theme-toggle .icon-moon { display: block; }
