/* -----------------------------------------------
   kakafelota.com — minimal stylesheet
   ----------------------------------------------- */

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

:root {
  --text: #1a1a1a;
  --muted: #666;
  --border: #e0e0e0;
  --bg: #fff;
  --link: #1a1a1a;
  --link-hover: #444;
  --max-width: 680px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Layout */

header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

main {
  padding-top: 1rem;
  padding-bottom: 4rem;
  min-height: 60vh;
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  margin: 0;
}

/* Site name */

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

.site-name:hover {
  color: var(--link-hover);
}

/* Navigation */

nav {
  display: flex;
  gap: 1.5rem;
}

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

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

/* Links */

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

/* Typography */

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

li {
  margin-bottom: 0.25rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Home page */

.home h1 {
  display: none; /* site name in header is enough */
}

.home .recent-writing {
  margin-top: 3rem;
}

.home .recent-writing h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.home .recent-writing ul {
  list-style: none;
  padding: 0;
}

.home .recent-writing li {
  margin-bottom: 1rem;
}

.home .recent-writing .summary {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

/* Writing list */

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

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

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

.post-list a {
  font-weight: 500;
  font-size: 1rem;
  display: block;
}

.post-list time {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-top: 0.15rem;
}

.post-list .summary {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* Article */

article .post-header {
  margin-bottom: 2.5rem;
}

article .post-header h1 {
  margin-bottom: 0.4rem;
}

article .post-header time {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-content {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
}

.post-content h2, .post-content h3 {
  font-family: var(--font);
}

.post-content p:last-child {
  margin-bottom: 0;
}

/* Mobile */

@media (max-width: 600px) {
  html { font-size: 16px; }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
