:root {
  --bg: #0f1117;
  --bg-alt: #171a23;
  --text: #e6e8ee;
  --text-dim: #9aa1b1;
  --accent: #10b981;
  --border: #262a36;
  --max-width: 760px;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --text: #1a1d24;
  --text-dim: #5c6270;
  --accent: #059669;
  --border: #e2e4ea;
}

* { box-sizing: border-box; }

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

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 24px;
  gap: 12px;
}
.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 18px;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.site-header nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
}
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { color: var(--accent); }

main.wrap { padding-top: 48px; padding-bottom: 64px; min-height: 60vh; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin-bottom: 0.4em; }
.hero h1 { margin-bottom: 0.2em; }
.lede { color: var(--text-dim); font-size: 1.05rem; }

a { color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}
.card h3 { margin-top: 0; }
.card-links a { margin-right: 14px; font-size: 0.9rem; }

.tags { margin: 10px 0; }
.tag {
  display: inline-block;
  background: rgba(110, 231, 183, 0.1);
  color: var(--accent);
  border: 1px solid rgba(110, 231, 183, 0.3);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  margin: 0 6px 6px 0;
}

.skill-group { margin-bottom: 28px; }

.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  margin-bottom: 32px;
}
.timeline-item h3 { margin-bottom: 2px; }
.timeline-item .meta { color: var(--text-dim); margin-top: 0; font-size: 0.9rem; }

.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: 8px; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 24px;
}
.footer-links a { color: var(--text-dim); margin-left: 14px; text-decoration: none; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--accent); }

.post-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.post-list-item .meta { color: var(--text-dim); font-size: 0.85rem; min-width: 90px; }
.post .meta { color: var(--text-dim); margin-top: -8px; }
.post img { max-width: 100%; border-radius: 8px; }
.post pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
}
.post pre code { background: none; padding: 0; }

code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hero-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .hero-inner { flex-direction: column; align-items: flex-start; }
}