:root {
  --bg: #161d2b;
  --bg-elevated: #1c2438;
  --fg: #e8eaf0;
  --fg-muted: #8993a8;
  --accent: #d7dbe6;
  --border: #2a324a;
  --max-width: 640px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.site-header {
  text-align: center;
  margin-bottom: 4rem;
}

.site-header__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  background: var(--bg-elevated);
}

.site-header__name {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
}

.site-header__name:hover {
  color: var(--fg);
}

.back-link {
  display: inline-block;
  margin-bottom: 3rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
}

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

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list__item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list__item:first-child {
  padding-top: 0;
}

.post-list__date {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}

.post-list__title a {
  color: var(--fg);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
}

.post-list__title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-list__empty {
  color: var(--fg-muted);
}

.post-date {
  display: block;
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 2.5rem;
}

.post-body {
  font-size: 1.05rem;
}

.post-body p {
  margin: 0 0 1.4rem;
}

.post-body a {
  color: var(--fg);
  text-decoration-color: var(--fg-muted);
}

.post-body img,
.post-body video {
  max-width: 100%;
  border-radius: 6px;
}

.post-body blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--border);
  color: var(--fg-muted);
  font-style: italic;
}

.post-body pre {
  background: var(--bg-elevated);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.post-footer__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.post-footer__name {
  color: var(--fg);
  font-weight: 600;
}

.admin-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  font-size: 0.8rem;
}

.admin-bar a,
.admin-bar button {
  background: none;
  border: none;
  color: var(--fg-muted);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.admin-bar a:hover,
.admin-bar button:hover {
  color: var(--fg);
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.form-field input[type="text"],
.form-field input[type="datetime-local"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-size: 1rem;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.admin-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-post-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-post-list__meta {
  color: var(--fg-muted);
  font-size: 0.85rem;
}
