/*
 * Theme: Default
 * Author: Jottit
 * Version: 1.0
 * License: MIT
 */

/* ── Body ────────────────────────────── */
body {
  font-family: var(--site-font);
  font-size: var(--site-font-size);
  font-weight: var(--weight-normal);
  line-height: var(--site-leading);
  color: var(--site-text);
  background: var(--site-bg);
}

/* ── Headings ────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--site-text-bright);
  font-family: var(--site-font-header);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-5);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

h4, h5, h6 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

/* ── Text ────────────────────────────── */
p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--weight-bold);
  color: var(--site-text-bright);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
  color: var(--site-text-muted);
}

/* ── Links ───────────────────────────── */
a {
  color: var(--text-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--speed-fast);
}

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

/* ── Lists ───────────────────────────── */
ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
}

li {
  margin-bottom: var(--space-2);
}

li:last-child {
  margin-bottom: 0;
}

/* ── Blockquote ──────────────────────── */
blockquote {
  border-left: 2px solid var(--site-divider);
  padding-left: var(--space-4);
  color: var(--site-text-muted);
  margin-bottom: var(--space-4);
}

/* ── Code ────────────────────────────── */
code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--site-code-bg);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

pre {
  background: var(--site-code-bg);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

pre code {
  background: none;
  padding: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
}

/* ── Horizontal rule ─────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--site-divider);
  margin: var(--space-8) 0;
}

/* ── Images & figures ────────────────── */
img {
  margin-bottom: var(--space-4);
}

figure {
  margin-bottom: var(--space-4);
}

figcaption {
  font-size: var(--text-sm);
  color: var(--site-text-muted);
  margin-top: var(--space-2);
}

/* ── Tables ──────────────────────────── */
th, td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--site-divider);
}

th {
  font-weight: var(--weight-bold);
  color: var(--site-text-bright);
}

/* ── Header ──────────────────────────── */
header {
  text-align: center;
  margin-bottom: var(--space-8);
}

header.site-header {
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
}

.site-header p {
  font-size: var(--text-base);
  color: var(--site-text-muted);
}

header.site-header::after {
  content: "";
  display: block;
  width: 160px;
  height: 1px;
  background: var(--site-text-muted);
  margin: var(--space-8) auto 0;
}

header h1 {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--site-text);
}

header h1 a {
  text-decoration: none;
  color: inherit;
}

/* ── Footer ──────────────────────────── */
footer {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  font-size: var(--text-sm);
  color: var(--site-text-muted);
}

footer .license {
  margin-top: var(--space-4);
}

/* ── Article ─────────────────────────── */
article {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
}

article:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

article time {
  font-size: var(--text-sm);
  color: var(--site-text-muted);
  display: block;
  text-align: center;
}

article h2 {
  margin-bottom: var(--space-5);
  text-align: center;
}

article img {
  margin-bottom: var(--space-6);
}

article h2 a {
  color: var(--text-bright);
  text-decoration: none;
}

article h2 a:hover {
  color: var(--site-text-muted);
}

/* ── Post body ───────────────────────── */
.post-body {
  width: fit-content;
  margin: 0 auto;
  font-size: var(--text-lg);
}

.post-body a,
.page-body a {
  color: var(--site-accent);
}

.page-body {
  font-size: var(--text-lg);
}

/* ── Site header avatar ──────────────── */
.site-header img[alt="avatar"] {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto var(--space-4);
}

/* ── Nav ─────────────────────────────── */
nav {
  font-size: var(--text-sm);
}

nav a {
  color: var(--site-text-muted);
  text-decoration: none;
  margin-left: var(--space-4);
}

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

/* ── Page nav ────────────────────────── */
.page-nav {
  display: inline-block;
  position: relative;
  margin-top: var(--space-4);
  font-size: var(--text-base);
}

.page-nav a {
  color: var(--site-accent);
  text-decoration: none;
  margin: 0;
}

.page-nav a:hover {
  color: var(--site-text-bright);
}

.page-nav-sep {
  color: var(--site-text-muted);
  margin: 0 var(--space-2);
}

.page-nav-draft {
  opacity: 0.5;
}
