:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666666;
  --accent: #2563eb;
  --border: #e5e5e5;
  --max-width: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151a;
    --fg: #e6e6e6;
    --muted: #9a9a9a;
    --accent: #6ea8fe;
    --border: #2a2b31;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
}
.site-header nav a {
  color: var(--muted);
  margin-left: 1.25rem;
}
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a.active,
.site-header nav a:hover { color: var(--fg); }

main.wrap {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  min-height: 60vh;
}

.hero {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hero .portrait {
  border-radius: 50%;
  width: 160px;
  height: 160px;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-text { flex: 1; min-width: 240px; }
.hero-text h3:first-child { margin-top: 0; }

.projects { margin-top: 3rem; }

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.page h1 { margin-bottom: 0.25rem; }
.page .meta { margin-top: 0; margin-bottom: 1.5rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-footer .social a { margin-right: 1rem; color: var(--muted); }
.site-footer .legal a { margin-right: 1rem; }

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent) !important;
  text-decoration: none !important;
  margin: 0.25rem 0.5rem 0.25rem 0;
}
.button:hover { background: var(--accent); color: var(--bg) !important; }

img { max-width: 100%; height: auto; }

pre, code {
  background: rgba(127,127,127,0.12);
  border-radius: 4px;
}
pre { padding: 1rem; overflow-x: auto; }
code { padding: 0.15rem 0.35rem; }
pre code { padding: 0; background: none; }
