:root {
  --fg: #1a1a1a;
  --muted: #666;
  --border: #e5e5e5;
  --link: #0066cc;
  --code-bg: #f6f8fa;
  --content-width: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header.site .brand {
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--fg);
}

header.site nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

header.site nav a:hover,
header.site nav a.active {
  color: var(--fg);
}

/* Links */
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Headings */
h1, h2, h3, h4 {
  line-height: 1.25;
  margin: 1.8em 0 0.6em;
  font-weight: 600;
}
h1 { font-size: 1.8rem; margin-top: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

/* Profile */
.profile {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.profile img {
  width: 140px;
  height: 140px;
  border-radius: 6px;
  object-fit: cover;
}
.profile .meta { flex: 1 1 280px; }
.profile h1 { margin-top: 0; }

.cv-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--fg);
  border-radius: 4px;
  color: var(--fg);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
.cv-button:hover {
  background: var(--fg);
  color: #fff;
  text-decoration: none;
}

.socials { margin-top: 1rem; font-size: 0.95rem; }
.socials a { margin-right: 1rem; color: var(--muted); }
.socials a:hover { color: var(--fg); }

/* GitHub contribution chart */
.gh-chart {
  width: 100%;
  overflow-x: auto;
}
.gh-chart img {
  width: 100%;
  height: auto;
  display: block;
  min-width: 0;
}

/* Listing (notashes-style) */
ul.listing {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.listing li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
ul.listing li:first-child { padding-top: 0; }
ul.listing li:last-child { border-bottom: none; }

ul.listing .date {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
ul.listing .title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.15rem 0 0.3rem;
}
ul.listing .desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}
ul.listing .tags { font-size: 0.8rem; color: var(--muted); }
ul.listing .tags a { color: var(--muted); margin-right: 0.5rem; }
ul.listing .tags a:hover { color: var(--fg); }

/* Article (rendered post) */
article .post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
}
article pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.45;
}
article code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}
article pre code {
  background: transparent;
  padding: 0;
}
article blockquote {
  border-left: 3px solid var(--border);
  margin: 1rem 0;
  padding: 0 1rem;
  color: var(--muted);
}
article ul, article ol { padding-left: 1.4rem; }
article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 540px) {
  .wrap { padding: 1.5rem 1rem 3rem; }
  .profile img { width: 110px; height: 110px; }
  header.site nav a { margin-left: 0; margin-right: 1rem; }
}
