/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --surface: #161b22;
  --border: #21262d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #c9a96e;
  --link: #58a6ff;
  --font-display: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 740px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  background: var(--surface);
  border: 2px solid var(--border);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

header h1 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.bio {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.bio a { color: var(--accent); }
.bio a:hover { color: var(--text); }

.subscribe {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.subscribe input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  padding: 8px 14px;
  width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe input::placeholder { color: var(--muted); }
.subscribe input:focus { border-color: var(--accent); }

.subscribe button {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #0f1117;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  transition: opacity 0.2s;
}

.subscribe button:hover { opacity: 0.85; }

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
  width: 100%;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-date {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.post-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.post-full { animation: fadeIn 0.2s ease; }
.post-full .post-date { margin-bottom: 12px; }

.post-full .post-title {
  font-family: var(--font-display);
  font-size: 30px;
  margin-bottom: 32px;
  line-height: 1.25;
}

.post-full .post-body {
  font-size: 16px;
  line-height: 1.8;
}

.post-full .post-body p { margin-bottom: 20px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

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

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pagination button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 14px;
  transition: all 0.15s;
}

.pagination button:hover { border-color: var(--accent); color: var(--text); }
.pagination button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f1117;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

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

@media (max-width: 600px) {
  header { padding: 40px 20px 32px; }
  .subscribe input { width: 100%; }
  .subscribe { flex-direction: column; align-items: stretch; padding: 0 8px; }
  .subscribe button { width: 100%; }
  main { padding: 0 16px 48px; }
  .post-card { padding: 20px; }
  .post-title { font-size: 19px; }
  .post-full .post-title { font-size: 24px; }
}