@import url('https://rsms.me/iosevka/iosevka.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #0e0e0e;
  --fg:     #d4d0c8;
  --muted:  #555;
  --dim:    #2a2a2a;
  --accent: #a8c5a0;
  --max:    640px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Iosevka', monospace;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── homepage ── */

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.avatar-image {
  width: 180px;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

.card h1 {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.12em;
}

.card nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.card nav a {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  transition: color 0.2s;
  position: relative;
}

.card nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.card nav a:hover { color: var(--accent); }
.card nav a:hover::after { width: 100%; }

.sep {
  color: var(--dim);
  font-size: 12px;
  user-select: none;
}

/* ── inner pages ── */

.page {
  width: 100%;
  max-width: var(--max);
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-header {
  margin-bottom: 48px;
}

.back {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back:hover { color: var(--accent); }

.page-header h1 {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* ── blog list ── */

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--dim);
  gap: 16px;
}

.post-item:first-child {
  border-top: 1px solid var(--dim);
}

.post-item a {
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.post-item a:hover { color: var(--accent); }

.post-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.empty {
  font-size: 12px;
  color: var(--muted);
  padding: 14px 0;
}

/* ── single post ── */

.page-header .post-date {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

.prose {
  font-size: 14px;
  line-height: 1.85;
  color: #b8b4ac;
  text-align: justify;
}

.prose p         { margin-bottom: 1.4em; }
.prose h2        { font-size: 13px; font-weight: 400; letter-spacing: 0.08em; color: var(--fg); margin: 2em 0 0.8em; }
.prose h3        { font-size: 12px; font-weight: 400; color: var(--muted); margin: 1.6em 0 0.6em; }
.prose a         { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.prose a:hover   { border-color: var(--accent); }
.prose strong, .prose b { font-weight: 600; color: var(--fg); }
.prose em, .prose i { font-style: italic; }
.prose code      { font-family: 'Iosevka', monospace; font-size: 14px; background: #1a1a1a; padding: 1px 5px; border-radius: 2px; color: var(--fg); }
.prose pre       { background: #141414; border: 1px solid var(--dim); border-radius: 4px; padding: 16px; overflow-x: auto; margin-bottom: 1.4em; }
.prose pre code  { background: none; padding: 0; }
.prose blockquote { border-left: 1px solid var(--dim); padding-left: 16px; color: var(--muted); margin-bottom: 1.4em; }
.prose hr        { border: none; border-top: 1px solid var(--dim); margin: 2em 0; }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 1.4em; }
.prose li        { margin-bottom: 0.4em; }
.prose figure    { width: 100%; margin-bottom: 1.4em; }
.prose img       { max-width: 100%; height: auto; width: 100%; display: block; }
.prose figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
