/* write.ulinnuha.id — Medium-style reading layout for scanned handwriting. */
:root {
  --bg: #fbfaf7;
  --fg: #23211d;
  --muted: #6b6862;
  --line: #e7e3da;
  --accent: #b4472f;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  letter-spacing: 0.003em;
}

a { color: inherit; }

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 10;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 24px;
  font-family: var(--sans);
  font-size: 14px;
}
.masthead .brand { text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.masthead .brand span { color: var(--muted); font-weight: 400; }
.masthead nav a { color: var(--muted); text-decoration: none; margin-left: 18px; }
.masthead nav a:hover { color: var(--fg); }

.column { max-width: 720px; margin: 0 auto; padding: 8px 24px 64px; }

.page-title { font-size: 40px; line-height: 1.15; margin: 24px 0 6px; letter-spacing: -0.02em; }
.lede { color: var(--muted); font-style: italic; margin: 0 0 40px; }

/* ---------- Archive ---------- */
.feed { display: flex; flex-direction: column; gap: 8px; }

.card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.card:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-media img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; display: block; filter: contrast(1.02); }
.card-body time { font-family: var(--sans); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.card-body h2 { font-size: 24px; margin: 4px 0 4px; line-height: 1.25; letter-spacing: -0.01em; }
.card-body p { margin: 0 0 8px; color: var(--muted); font-size: 17px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.tag {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--accent);
  background: rgba(180, 71, 47, 0.08);
  padding: 2px 9px;
  border-radius: 999px;
}
.muted { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }

/* ---------- Article ---------- */
.article-head { margin: 20px 0 48px; }
.article-head time { font-family: var(--sans); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.article-head h1 { font-size: 42px; line-height: 1.12; margin: 10px 0 14px; letter-spacing: -0.025em; }
.article-head .subtitle { font-size: 22px; color: var(--muted); font-style: italic; margin: 0 0 16px; }
.article-head .tags { display: flex; flex-wrap: wrap; gap: 8px; }

.page { margin: 0 0 26px; }
.page img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 12px 28px -18px rgba(0,0,0,0.35);
}

.back { margin: 40px 0 0; font-family: var(--sans); font-size: 15px; }
.back a { color: var(--accent); text-decoration: none; }
.back a:hover { text-decoration: underline; }

.foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); }

@media (max-width: 560px) {
  body { font-size: 18px; }
  .page-title, .article-head h1 { font-size: 32px; }
  .card { grid-template-columns: 96px 1fr; gap: 14px; }
  .card-media img { height: 78px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --fg: #ece7dc;
    --muted: #9a9488;
    --line: #2a2823;
    --accent: #e0826a;
  }
  .page img { box-shadow: 0 12px 28px -18px rgba(0,0,0,0.8); }
}
