/* ==========================================================================
   Fabio Cicerchia — Blog theme  (dark)
   Matched to fabiocicerchia.it: blue-black bg + faint grid, mint-green accent,
   orange secondary, grotesk display + serif body + mono labels.
   All tokens live here — tune to taste.
   ========================================================================== */

:root {
  --bg:        #0B0E13;   /* blue-black background            */
  --bg-soft:   #10151C;   /* card fill                        */
  --ink:       #F4F6F7;   /* headings / white text            */
  --body:      #A3ABB3;   /* serif body copy (muted)          */
  --muted:     #6C7480;   /* labels, meta, nav                */
  --faint:     #1E252E;   /* borders / hairlines              */
  --grid:      rgba(255,255,255,0.022);
  --accent:    #29E5A4;   /* mint green — links, accents      */
  --accent-dk: #17c489;   /* green hover                      */
  --accent-2:  #FB7B4B;   /* orange — used sparingly          */

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-serif:   "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1024px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--body);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; text-underline-offset: 3px; }

/* --- eyebrow: short dash + tracked mono uppercase, green ------------------ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
.eyebrow--plain { gap: 8px; }
.eyebrow--plain::before { display: none; }
.eyebrow--plain a { color: var(--muted); }
.eyebrow--plain a:hover { color: var(--accent); }

/* --- header --------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--faint); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: var(--ink); }
.logo .dot { color: var(--accent); }

.nav { display: flex; gap: 26px; }
.nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav a:hover { color: var(--accent); text-decoration: none; }

/* --- home intro ----------------------------------------------------------- */
.intro { padding: 76px 0 44px; }
.page-title {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 20px;
}
.lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--body);
  margin: 0;
}

/* --- post list (bordered cards) ------------------------------------------- */
.post-list { list-style: none; margin: 0; padding: 0 0 40px; display: grid; gap: 14px; }
.post-item {
  border: 1px solid var(--faint);
  border-radius: 8px;
  background: var(--bg-soft);
  transition: border-color .16s ease, background .16s ease;
}
.post-item:hover { border-color: rgba(41,229,164,0.45); background: #121820; }
.post-item.is-draft { border-color: rgba(251,123,75,0.35); }
.post-item.is-draft:hover { border-color: rgba(251,123,75,0.6); }

.post-link { display: grid; grid-template-columns: 104px 1fr; gap: 22px; padding: 24px 26px; color: inherit; }
.post-link:hover { text-decoration: none; }
.post-link:hover .post-heading { color: var(--accent); }

.post-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 6px;
  white-space: nowrap;
}
.post-heading {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
  transition: color .15s ease;
}
.post-summary { font-family: var(--font-serif); color: var(--body); font-size: 16px; line-height: 1.55; margin: 0 0 14px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--accent);
  border: 1px solid rgba(41,229,164,0.25);
  padding: 2px 8px;
  border-radius: 4px;
}
.tag.time { color: var(--muted); border: none; padding-left: 0; }
.tag.draft { color: var(--accent-2); border-color: rgba(251,123,75,0.35); }

/* --- pagination ------------------------------------------------------------ */
.pagination { display: flex; justify-content: space-between; padding-bottom: 40px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

/* --- single post ---------------------------------------------------------- */
.post { padding: 56px 0 24px; }
.post-title-full {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 18px;
}
.post-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding-bottom: 34px; margin-bottom: 38px;
  border-bottom: 1px solid var(--faint);
}
.post-meta .dot { color: var(--faint); }

/* --- prose (serif body, grotesk headings) --------------------------------- */
.prose { font-family: var(--font-serif); font-size: 18.5px; color: var(--body); }
.prose p { margin: 0 0 22px; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); margin: 46px 0 16px;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600; color: var(--ink); margin: 34px 0 12px;
}
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose img { border-radius: 8px; margin: 8px 0 24px; display: block; }

.prose blockquote {
  margin: 26px 0; padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--ink); font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: #141A22;
  color: #CFE9DC;
  padding: 2px 6px; border-radius: 4px;
}
.prose pre {
  background: #0D131A;
  border: 1px solid var(--faint);
  border-radius: 8px;
  padding: 18px 20px; overflow-x: auto;
  font-size: 14px; line-height: 1.6; margin: 0 0 24px;
}
.prose pre code { background: none; padding: 0; color: #C6D0D9; font-size: inherit; }
.prose pre .c-key { color: var(--accent); }
.prose pre .c-com { color: #5C6570; }
.prose pre .c-str { color: var(--accent-2); }

.prose hr { border: none; border-top: 1px solid var(--faint); margin: 40px 0; }

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--faint); padding: 8px 12px; text-align: left; }
.prose th { color: var(--ink); font-family: var(--font-display); }

/* --- footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--faint); margin-top: 44px; padding: 32px 0 56px; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted);
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .page-title { font-size: 34px; }
  .post-title-full { font-size: 31px; }
  .lede { font-size: 20px; }
  .post-link { grid-template-columns: 1fr; gap: 8px; padding: 22px 20px; }
  .post-date { padding-top: 0; }
  .nav { gap: 16px; }
}
