/* ============================================
   Reset
   ============================================ */

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

h1, h2, h3, h4, p, ul, ol, article, figure {
  margin: 0;
}

:root {
  --bg: #1e1f26;          /* page background — deep navy-charcoal */
  --surface: #262833;     /* cards, surfaces */
  --border: #3a3d4d;      /* separators, pill borders */
  --text: #e8e6f0;        /* main text — soft off-white */
  --text-muted: #9d9bb0;  /* dates — gray-lavender */
  --link: #a3b5ff;        /* links — pastel periwinkle */
  --link-hover: #c3cfff;  /* lighter pastel on hover */
  --tag-bg: #35304a;      /* tag pill — muted plum */
  --tag-text: #cfc4f2;    /* tag pill text — pastel lilac */
  --tag-border: #4a4463;
}

/* ============================================
   General typography
   ============================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  max-width: 42rem;       /* ~672px — the 60–80 chars-per-line readable measure */
  margin: 0 auto;
  padding: 20px;
  padding-left: max(20px, env(safe-area-inset-left));    /* keeps clear of phone notches/curves */
  padding-right: max(20px, env(safe-area-inset-right));
  min-height: 100vh;          /* body at least as tall as the screen */
  display: flex;
  flex-direction: column;     /* header / main / footer stack, main grows */
  text-align: justify;
}

main {
  flex: 1;                    /* main stretches, pushing footer to the bottom */
}

a { color: var(--link); }


ol {
  margin: 0.5rem;
}

ul {
  margin: 0.5rem;
}

/* ============================================
   Navigation
   ============================================ */

nav {
  padding: 0.5rem 0 1.5rem;
}

nav ul {
  list-style: none;                  /* remove bullets */
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--link);
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link);  /* pastel underline on hover */
}

/* ============================================
   Home page sections
   ============================================ */

.home-head {
  padding: 1rem 0 1.5rem;
}

/* ============================================
   Article cards
   ============================================ */

.home-article {
  padding: 1rem 0;                    /* breathing room around the line */
  border-bottom: 1px solid var(--border);
}

.home-article:last-child {
  border-bottom: none;               /* no line after the last one */
}

.article-created-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: block;                     /* date sits on its own line above the head */
}

/* --- headline row: title left, tags right --- */

.home-article-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-article-head-right {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.home-article-title {
  font-size: 1.25rem;
}

.home-article-title a,
.home-article-link {
  text-decoration: none;
  color: var(--link);
}

.home-article-title a:hover,
.home-article-link:hover {
  text-decoration: underline;
  color: var(--link-hover);
}

/* --- tag pills --- */

.article-tag-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-tag {
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.15rem 0.6rem;
  background-color: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  border-radius: 999px;              /* pill shape */
}

/* ============================================
   Post page body (when you build it)
   ============================================ */

.post-body p {
  margin-bottom: 1rem;               /* paragraphs breathe again — zeroed in the reset */
}

.post-body pre {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;                  /* long code lines scroll, never stretch the page */
  margin-bottom: 1rem;
  line-height: 1.45;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* inline code chips only — not inside <pre> */
.post-body :not(pre) > code {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

#home-title{
  display: none;
}


figure {
  display: flex;
  flex-direction: column;  /* ← this line is what stacks them vertically */
  align-items: center;
  margin: 2rem auto;  /* space above/below, auto = centered horizontally */
}

figcaption {
  font-size: 0.85em;
  font-weight: normal;
  color: var(--text-muted); /* #9d9bb0 — your gray-lavender for secondary text */
  text-align: center;
}

/* ============================================
   Footer — pinned to the bottom, darker shade
   ============================================ */

footer {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;   /* centered */
}

footer p {
  letter-spacing: 0.4em;  /* breathing room between name/icons */
  margin: 0;
}

footer a {
  color: var(--link);
  margin: 0 0.5em;   /* extra space around each link */
}
