/* ── Custom properties ── */
:root {
  --color-bg: #FAF8F5;
  --color-text: #2C2C2C;
  --color-accent: #4A7C59;
  --color-muted: #9B9488;
  --color-border: #E8E4DE;
  --font-body: 'Lora', Georgia, serif;
  --font-heading: 'Newsreader', Georgia, serif;
  --font-mono: 'DM Mono', monospace;
}

/* ── Reset ── */
html, body, p, ul, li, h1, h2, h3 {
  margin: 0;
  padding: 0;
}

ul { list-style: none; }

/* ── Base ── */
::selection {
  background: var(--color-accent);
  color: #fff;
}

body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.4s ease;
}

body::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--color-accent);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

/* ── Navigation ── */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  border-bottom: 1px solid var(--color-border);
}

.nav-home {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.nav-home:hover {
  color: var(--color-accent);
}

.nav-link {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 400;
}

.nav-link:hover {
  color: var(--color-accent);
}

/* ── Main content ── */
.site-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  box-sizing: border-box;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

b, strong {
  font-weight: 600;
  color: var(--color-text);
}

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

/* ── Homepage ── */
.home {
  text-align: center;
  padding-top: 2rem;
}

.presentation {
  font-size: 1.3rem;
  line-height: 1.7;
}

.presentation p {
  max-width: 500px;
  margin: 0 auto;
}

.presentation .name {
  color: var(--color-accent);
}

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-muted);
}

.status p {
  display: flex;
  align-items: center;
  margin-bottom: 0.4rem;
}

.status svg {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
  fill: var(--color-muted);
}

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

.status a:hover {
  color: var(--color-accent);
}

.home-posts {
  text-align: left;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.home-posts-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ── Blog listing ── */
.page-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-item:last-child {
  border-bottom: none;
}

.post-link {
  text-decoration: none;
}

.post-link:hover {
  text-decoration: none;
}

.post-item-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  transition: color 0.15s;
}

.post-link:hover .post-item-title {
  color: var(--color-accent);
}

.post-item-desc {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

.post-item-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
}

.no-posts {
  color: var(--color-muted);
  font-style: italic;
}

/* ── Blog post ── */
.post-header {
  margin-bottom: 2.5rem;
}

.post-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
}

.meta-separator {
  margin: 0 0.5rem;
}

.post-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.3rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.3rem 1.5rem;
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: 0.35rem;
}

.post-content blockquote {
  border-left: 2px solid var(--color-accent);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  font-style: italic;
  color: #5A5A5A;
}

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

/* ── Code ── */
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #EDEBE7;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-content pre {
  background: #2D2D2D;
  color: #F8F8F2;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* ── Syntax highlighting ── */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #75715E;
}

.token.punctuation {
  color: #F8F8F2;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #F92672;
}

.token.boolean,
.token.number {
  color: #AE81FF;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #A6E22E;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string {
  color: #F8F8F2;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #66D9EF;
}

.token.function,
.token.class-name {
  color: #E6DB74;
}

.token.regex,
.token.important,
.token.variable {
  color: #FD971F;
}

/* ── Post nav ── */
.post-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ── Footer ── */
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-links a {
  text-decoration: none;
  display: inline-flex;
  padding: 0.5rem;
}

.social-links a:hover {
  text-decoration: none;
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: var(--color-muted);
  transition: fill 0.15s;
}

.social-links a:hover svg {
  fill: var(--color-accent);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-nav {
    padding: 1.25rem 1.25rem;
  }

  .site-content {
    padding: 2rem 1.25rem 3rem;
  }

  .presentation {
    font-size: 1.15rem;
  }

  .post-title {
    font-size: 1.7rem;
  }

  .page-title {
    font-size: 1.7rem;
  }

  .post-content pre {
    padding: 1rem;
    font-size: 0.8rem;
    border-radius: 0;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
