/* Minimalist, responsive, light/dark aware styles */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #e6e6e6;
  --brand: #111111;
  --link: #0b57d0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --text: #eaeaea;
    --muted: #a3a3a3;
    --border: #262626;
    --brand: #eaeaea;
    --link: #8ab4f8;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}
.container h1 { font-size: 2rem; margin: 0 0 10px; }
.container h2 { font-size: 1.35rem; margin: 18px 0 8px; }
.container p { margin: 8px 0 0; }
main.container section { margin: 8px 0 12px; }
.lead { font-size: 1.05em; }
.about section { margin: 8px 0 12px; }
.about .list li { padding: 4px 0; line-height: 1.5; }
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: color-mix(in oklab, var(--bg), transparent 10%);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.brand {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.nav { display: flex; gap: 14px; }
.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
}
.nav-link:hover { background: var(--border); }
.nav-link.active { outline: 2px solid var(--border); }

main.container { padding: 20px 16px; flex: 1; }
.hero { margin: 8px 0 4px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
.hero-aside { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.avatar { width: 212px; height: 212px; border-radius: 60%; border: 1px solid var(--border); object-fit: cover; }
.socials { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.icon { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); text-decoration: none; }
.icon:hover { opacity: 0.8; }
.email { margin-top: 4px; font-size: 0.95em; }
@media (max-width: 520px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-aside { order: 2; }
  .avatar { width: 140px; height: 140px; }
}
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 6px 0; }
.contact-list li { padding: 6px 0; }
.muted { color: var(--muted); font-size: 0.95em; }
.post h1 { margin-bottom: 0; }

/* Blog list items */
.post-item { padding: 10px 0 16px; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: 0; }
.post-item .title { font-weight: 600; text-decoration: none; color: var(--text); }
.post-item .title:hover { text-decoration: underline; }
.post-item .meta { margin-left: 6px; }
.post-item .excerpt { margin: 6px 0 0; color: var(--muted); }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 3; }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-left: 6px;
}
.status-reading { background: color-mix(in oklab, var(--link), transparent 85%); }
.status-to_read { background: color-mix(in oklab, #f59e0b, transparent 85%); }
.status-completed { background: color-mix(in oklab, #10b981, transparent 85%); }

/* Details/Summary for collapsible sections */
details {
  margin: 8px 0 12px;
}
summary {
  cursor: pointer;
  font-size: 1.35rem;
  margin: 18px 0 8px;
  font-weight: normal;
}
summary:hover {
  color: var(--link);
}

/* Polished collapsible cards */
.collapsible {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in oklab, var(--bg), white 4%);
  overflow: hidden;
}
.collapsible + .collapsible { margin-top: 12px; }

.collapsible summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 0; /* override generic summary margin */
  list-style: none; /* avoid default markers in some browsers */
}

/* Hide default marker and use custom caret */
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary::marker { content: ""; }
.collapsible summary::before {
  content: "\25B8"; /* ▸ */
  font-size: 0.95em;
  transition: transform 0.15s ease;
}
.collapsible[open] summary::before {
  content: "\25BE"; /* ▾ */
}

.collapsible[open] summary {
  border-bottom: 1px solid var(--border);
}

.collapsible .list {
  padding: 10px 12px 12px;
}

/* Slight hover feedback on header */
.collapsible summary:hover {
  background: color-mix(in oklab, var(--border), transparent 70%);
}
