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

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #e8e8e8;
  --accent: #2a5a8c;
  --max-width: 680px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  padding: 0 1.5rem;
}

.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

/* Navigation */
header nav {
  display: flex;
  align-items: baseline;
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.site-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: 0.01em;
}

nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

/* Typography */
h1 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

ul, ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.3rem;
}

/* Post list — Writing page */
.post-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

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

.post-list a {
  color: var(--text);
}

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

.post-list .date {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Progress log — list */
.log-list {
  margin-top: 1.5rem;
}

.log-entry {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.log-entry:first-child {
  border-top: 1px solid var(--border);
}

.log-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.log-body p:last-child {
  margin-bottom: 0;
}

/* Progress log — single entry page */
.log-entry-single time {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* Post layout */
.post-header {
  margin-bottom: 2rem;
}

.post-date {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.post-content p,
.post-content li {
  margin-bottom: 1rem;
}

.post-content h2 {
  margin-top: 2.5rem;
}

/* Empty state */
.empty-state {
  color: var(--muted);
  font-style: italic;
  margin-top: 1.5rem;
}

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

/* Responsive */
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.4rem; }
  .post-list li { flex-direction: column; gap: 0.2rem; }
  .post-list .date { font-size: 0.8rem; }
}
