/* aksentijevic.com — one stylesheet for every page.
   Colors live in the tokens below; change them here and every page follows. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1f24;
  --muted: #5b6270;
  --line: #e4e1da;
  --accent: #1f4e79;        /* links, headings accents */
  --accent-soft: #e8eff6;
  --max: 46rem;             /* reading width */
  --wide: 64rem;            /* header/home width */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1b1f26;
    --text: #e6e4df;
    --muted: #a3a9b4;
    --line: #2c323c;
    --accent: #8fb8e0;
    --accent-soft: #1f2a37;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

/* ---------- Header / footer ---------- */

.site-header, .site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.site-header { border-bottom: 1px solid var(--line); }

.site-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }

/* ---------- Layout ---------- */

main { padding: 0 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; }
.read { max-width: var(--max); margin: 0 auto; }

section { margin: 3.5rem auto; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

/* ---------- Home ---------- */

.hero { margin-top: 4rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1rem;
}
.card h3 { margin-top: 0; }
.card p { margin: 0.5rem 0; color: var(--muted); font-size: 0.98rem; }
.card .more { font-size: 0.95rem; }

.stat {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  font-size: 0.9rem;
}

/* ---------- Post lists ---------- */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.post-list li:first-child { border-top: 1px solid var(--line); }
.post-list a { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }

.meta { color: var(--muted); font-size: 0.9rem; }

/* ---------- Articles ---------- */

article { margin-top: 3rem; }
article header { margin-bottom: 2rem; }
article p, article li { font-size: 1.08rem; }
article ul, article ol { padding-left: 1.3rem; }
article li { margin: 0.3rem 0; }

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

code { font-family: var(--mono); font-size: 0.92em; background: var(--accent-soft); padding: 0.05rem 0.3rem; border-radius: 4px; }

table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: 0.98rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.98rem;
}

/* ---------- About ---------- */

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: 0.97rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.9rem; color: var(--muted); }
