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

:root {
  --ink: #1a1a18;
  --ink-muted: #6b6b67;
  --ink-faint: #a8a8a4;
  --paper: #faf9f6;
  --paper-warm: #f3f0ea;
  --rule: #dedad2;
  --accent: #1a3a5c;
  --accent-light: #e8eef5;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,246,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 0 5vw;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 13px; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-back {
  color: var(--accent) !important;
  border: 1px solid var(--accent-light);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 3px;
  font-weight: 500 !important;
  transition: background 0.2s, border-color 0.2s;
}
.nav-back:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent);
}

/* ── BLOG INDEX ── */
.blog-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 6vw 5vw;
}
.blog-page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.blog-page-subtitle {
  font-size: 15px; color: var(--ink-muted);
  font-weight: 300; margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.post-list { display: flex; flex-direction: column; gap: 1px; }
.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.2s;
}
.post-card:hover { padding-left: 6px; }
.post-card-meta {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 10px;
  display: flex; gap: 16px;
}
.post-card-title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.post-card-excerpt {
  font-size: 14px; font-weight: 300;
  color: var(--ink-muted); line-height: 1.7;
}
.post-card-arrow {
  font-size: 22px; color: var(--ink-faint);
  padding-top: 4px;
}

/* ── SINGLE POST ── */
.post-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 6vw 5vw;
}
.post-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.post-header-meta {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 16px; display: flex; gap: 16px;
}
.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.post-header-excerpt {
  font-size: 17px; font-weight: 300;
  color: var(--ink-muted); line-height: 1.75;
}

/* Post body typography */
.post-content { font-size: 16px; font-weight: 300; line-height: 1.85; color: var(--ink-muted); }
.post-content p { margin-bottom: 24px; }
.post-content h2 {
  font-family: var(--serif);
  font-size: 1.7rem; color: var(--ink);
  margin: 48px 0 16px; letter-spacing: -0.01em;
}
.post-content h3 {
  font-family: var(--serif);
  font-size: 1.3rem; color: var(--ink);
  margin: 36px 0 12px;
}
.post-content strong { color: var(--ink); font-weight: 500; }
.post-content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-light); }
.post-content a:hover { border-color: var(--accent); }
.post-content ul, .post-content ol { margin: 0 0 24px 20px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 32px 0; padding: 4px 0 4px 24px;
  font-family: var(--serif); font-size: 1.2rem;
  color: var(--ink); font-style: italic; line-height: 1.5;
}
.post-content code {
  font-size: 13px; background: var(--paper-warm);
  padding: 2px 6px; border-radius: 2px;
  border: 1px solid var(--rule); color: var(--ink);
}
.post-content pre {
  background: var(--ink); color: #e8eef5;
  padding: 24px; border-radius: 4px;
  overflow-x: auto; margin-bottom: 24px;
}
.post-content pre code {
  background: none; border: none;
  color: inherit; padding: 0; font-size: 13px;
}
.post-content img {
  width: 100%; border-radius: 4px;
  margin-bottom: 24px; border: 1px solid var(--rule);
}

/* ── FOOTER ── */
footer {
  padding: 28px 5vw;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
}
footer p { font-size: 12px; color: var(--ink-faint); }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { font-size: 12px; color: var(--ink-faint); text-decoration: none; }
.footer-nav a:hover { color: var(--ink-muted); }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { gap: 18px; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-arrow { display: none; }
}

/* ── PAGINATION ── */
.blog-pagination {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 8px;
}
.blog-pagination .page-numbers {
  font-size: 13px; font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── POST VIEW COUNT ── */
.post-header-meta span:last-child::before {
  content: '· ';
  color: var(--ink-faint);
}

/* ── COMMENTS ── */
.comments-area {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

/* Comments title — "One response to..." */
.comments-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  color: var(--ink);
}

/* Individual comment */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.comment-body {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 24px;
  transition: border-color 0.2s;
}
.comment-body:hover { border-color: var(--ink-faint); }

/* Avatar */
.comment-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  vertical-align: middle;
  margin-right: 10px;
}

/* Author name */
.comment-author .fn {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.comment-author a {
  text-decoration: none;
  color: var(--ink);
}

/* Comment meta — date/time */
.comment-metadata {
  margin: 6px 0 14px;
}
.comment-metadata a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
}
.comment-metadata a:hover { color: var(--ink-muted); }

/* Comment text */
.comment-content p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* Reply link */
.reply {
  margin-top: 12px;
}
.comment-reply-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
  transition: border-color 0.2s;
}
.comment-reply-link:hover { border-color: var(--accent); }

/* Awaiting moderation notice */
.comment-awaiting-moderation {
  font-size: 11px;
  color: var(--ink-faint);
  font-style: italic;
  margin-top: 8px;
}

/* ── COMMENT FORM ── */
.comment-respond {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px;
  margin-top: 8px;
}

/* "Leave a Reply" title */
.comment-reply-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--ink);
}
.comment-reply-title small {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
  margin-left: 12px;
}
.comment-reply-title small a {
  color: var(--accent);
  text-decoration: none;
}

/* Required fields note */
.comment-notes {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 24px;
  font-weight: 300;
}

/* Form fields */
.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
  border-color: var(--accent);
}

/* Stack name/email/url fields in a row on desktop */
.comment-form-author,
.comment-form-email,
.comment-form-url {
  display: inline-block;
  width: calc(33.333% - 8px);
  margin-right: 10px;
  margin-top: 16px;
  vertical-align: top;
}
.comment-form-url { margin-right: 0; }

.comment-form-comment {
  margin-bottom: 16px;
}

/* Cookie consent checkbox */
.comment-form-cookies-consent {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.comment-form-cookies-consent input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.comment-form-cookies-consent label {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Submit button */
.form-submit {
  margin-top: 24px;
}
.form-submit .submit {
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.form-submit .submit:hover {
  background: #0f2640;
  transform: translateY(-1px);
}

/* Nested/child comments */
.children {
  list-style: none;
  padding-left: 32px;
  margin-top: 1px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .comment-form-author,
  .comment-form-email,
  .comment-form-url {
    width: 100%;
    margin-right: 0;
    display: block;
  }
  .comment-respond { padding: 24px 18px; }
  .children { padding-left: 16px; }
}

/* ── BLOG OUTER WRAPPER ── */
.blog-outer {
  width: 100%;
}
.blog-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6vw 5vw;
}

/* ── TWO COLUMN LAYOUT ── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}
.blog-main {
  min-width: 0; /* prevents grid blowout */
}

/* ── SIDEBAR ── */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 80px; /* clears the nav */
}

/* Sidebar widget */
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 24px;
}
.sidebar-widget-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

/* Search form */
.sidebar-search .search-form {
  display: flex;
  gap: 0;
}
.sidebar-search .search-field {
  flex: 1;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-right: none;
  border-radius: 3px 0 0 3px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.sidebar-search .search-field:focus {
  border-color: var(--accent);
}
.sidebar-search .search-submit {
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-search .search-submit:hover {
  background: #0f2640;
}

/* Sidebar post list */
.sidebar-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-post-item a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: padding-left 0.2s;
}
.sidebar-post-item:last-child a {
  border-bottom: none;
  padding-bottom: 0;
}
.sidebar-post-item a:hover {
  padding-left: 4px;
}
.sidebar-post-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.sidebar-post-date {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.sidebar-post-item.no-posts {
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 300;
}

/* ── HIDE SIDEBAR ON MOBILE ── */
@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    display: none; /* hidden on mobile */
  }
  .blog-wrap {
    max-width: 100%;
    padding: 10vw 6vw;
  }
}
/* ── PRELOADER ── */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.preloader-inner svg {
  animation: preloader-pulse 1.4s ease-in-out infinite;
}
@keyframes preloader-pulse {
  0%, 100% { opacity: 1;     transform: scale(1);    }
  50%       { opacity: 0.5;  transform: scale(0.92); }
}
.preloader-text {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  animation: preloader-pulse 1.4s ease-in-out infinite;
}
