/* =============================================
   NÎMESYS — Design System
   Inspired by the landing page
   ============================================= */

:root {
  --navy:        #1B2A4A;
  --navy-subtle: #E8ECF3;
  --ochre:       #D4892A;
  --ochre-wash:  #FDF7EF;
  --text-dark:   #0F1A2E;
  --text-body:   #3A4560;
  --text-muted:  #6B7590;
  --bg:          #FFFFFF;
  --maxw:        720px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

a {
  color: var(--ochre);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
a:hover { border-bottom-color: var(--ochre); }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.site-nav {
  background: var(--navy);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.nav-links a:hover { color: var(--ochre); border-bottom: none; }

/* ===== Content Pages (article, page, archives) ===== */
.content-page {
  padding: 3rem 0 4rem;
}

/* Header */
.article-header, .page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--navy-subtle);
}
.article-header h1, .page-header h1 {
  margin-bottom: 0.6rem;
}
.article-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.article-meta a { color: var(--text-muted); border-bottom: none; }
.article-meta a:hover { color: var(--ochre); }

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.4rem;
}

/* Article body */
.article-body {
  max-width: var(--maxw);
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body h2 { margin-top: 2rem; margin-bottom: 0.8rem; }
.article-body h3 { margin-top: 1.5rem; margin-bottom: 0.6rem; font-family: 'Figtree', sans-serif; color: var(--text-dark); }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--text-dark); font-weight: 600; }
.article-body blockquote {
  border-left: 3px solid var(--ochre);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--ochre-wash);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--text-dark);
}
.article-body code {
  background: var(--navy-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.article-body pre {
  background: var(--navy-subtle);
  padding: 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.article-body pre code {
  background: none;
  padding: 0;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--navy-subtle);
  margin: 2rem 0;
}
.article-body img {
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* ===== Article list (archives, category, tag pages) ===== */
.article-list { max-width: var(--maxw); }

.list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--navy-subtle);
}
.list-item:last-child { border-bottom: none; }
.list-item time {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.list-item h2 { margin-bottom: 0.4rem; }
.list-item h2 a {
  border-bottom: none;
  color: var(--text-dark);
}
.list-item h2 a:hover { color: var(--ochre); }
.list-summary { font-size: 0.95rem; color: var(--text-body); margin-bottom: 0.5rem; }

.list-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.pill {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  background: var(--navy-subtle);
  color: var(--text-muted);
  border-bottom: none;
  transition: background .15s, color .15s;
}
.pill:hover {
  background: var(--ochre);
  color: #fff;
  border-bottom: none;
}
.pill-tag { background: var(--ochre-wash); color: var(--ochre); }
.pill-tag:hover { background: var(--ochre); color: #fff; }

/* ===== Tags cloud ===== */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--navy-subtle);
}
.page-num { font-size: 0.88rem; color: var(--text-muted); }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  border-bottom: none;
}
.btn:hover {
  background: var(--ochre);
  color: #fff;
  border-bottom: none;
  transform: translateY(-1px);
}

.btn-small {
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
}

/* ===== Footer ===== */
.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--navy-subtle);
}
.foot-grid {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.foot-grid a {
  color: var(--text-body);
  border-bottom: none;
}
.foot-grid a:hover { color: var(--ochre); }
.site-footer p { margin-top: 0.6rem; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .site-nav .container {
    flex-direction: column;
    gap: 0.5rem;
  }
  .nav-links { gap: 0.8rem; }
  .content-page { padding: 2rem 0 3rem; }
}

/* ===== Code syntax highlight overrides ===== */
.highlight { background: var(--navy-subtle); border-radius: 6px; padding: 1.2rem; overflow-x: auto; margin-bottom: 1.2rem; }
.highlight pre { background: none; padding: 0; margin: 0; }
.highlight .c { color: var(--text-muted); font-style: italic; }
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: #7B3E8D; font-weight: 600; }
.highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss { color: #2E7D32; }
.highlight .na, .highlight .nb, .highlight .nc, .highlight .no, .highlight .nd, .highlight .ni, .highlight .ne, .highlight .nf, .highlight .nx { color: #1A56DB; }
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .mo { color: #D4892A; }
.highlight .o { color: var(--text-dark); font-weight: 600; }
.highlight .err { color: #C62828; background: #FFEBEE; }
