/* =========================================================
   Promix — personal blog
   Aesthetic inspired by warm, editorial, minimal layouts:
   cream background, serif display type, generous whitespace,
   a single clay/coral accent.
   ========================================================= */

:root {
  --bg:        #F4F1EA;   /* warm cream */
  --bg-card:   #FBFAF6;   /* slightly lighter card */
  --ink:       #1A1915;   /* near-black warm */
  --ink-soft:  #51504A;   /* secondary text */
  --ink-faint: #8A887F;   /* meta text */
  --line:      #E4E0D5;   /* hairlines */
  --accent:    #C9684A;   /* clay / coral */
  --accent-dk: #A8492F;
  --max:       1080px;
  --measure:   46rem;     /* reading width */
  --radius:    14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 64px; }
.hero .eyebrow {
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero p {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 0 32px;
}
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 0.98rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }

/* ---------- section heading ---------- */
.section { padding: 24px 0 88px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px; margin-bottom: 8px;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.6rem; letter-spacing: -0.01em; margin: 0;
}
.section-head .count { color: var(--ink-faint); font-size: 0.9rem; }

/* ---------- post list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { border-bottom: 1px solid var(--line); }
.post-item a {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  padding: 28px 8px;
  color: inherit;
  align-items: start;
  border-radius: 10px;
  transition: background .15s ease, padding .15s ease;
}
.post-item a:hover { text-decoration: none; background: var(--bg-card); }
.post-item .date {
  color: var(--ink-faint); font-size: 0.9rem; padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.post-item h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.45rem; line-height: 1.25; margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.post-item .excerpt { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }
.post-item .tag {
  display: inline-block; margin-top: 12px;
  font-size: 0.78rem; color: var(--accent); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- article ---------- */
.article { padding: 64px 0 40px; }
.article-header { max-width: var(--measure); margin: 0 auto 40px; }
.article-header .kicker {
  color: var(--accent); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 16px;
}
.article-header h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.1;
  letter-spacing: -0.02em; margin: 0 0 20px;
}
.article-meta { color: var(--ink-faint); font-size: 0.95rem; }
.article-meta a { color: var(--ink-soft); }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose > * + * { margin-top: 1.4em; }
.prose p { color: var(--ink); }
.prose h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.7rem; letter-spacing: -0.01em;
  margin-top: 2.2em; line-height: 1.2;
}
.prose h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.3rem; margin-top: 1.8em;
}
.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic;
  font-family: var(--serif); font-size: 1.2rem;
}
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.5em; }
.prose code {
  background: #ECE8DD; padding: 2px 6px; border-radius: 6px;
  font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.prose pre {
  background: #2A2823; color: #F4F1EA; padding: 20px 22px;
  border-radius: var(--radius); overflow-x: auto; font-size: 0.9rem;
  line-height: 1.55;
}
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose img { border-radius: var(--radius); }
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.prose figcaption {
  margin-top: 10px; font-size: 0.88rem; color: var(--ink-faint);
  text-align: center; line-height: 1.5;
}

/* tables */
.prose .table-wrap { overflow-x: auto; margin: 1.8em 0; -webkit-overflow-scrolling: touch; }
.prose table {
  border-collapse: collapse; width: 100%; font-size: 0.92rem;
  background: var(--bg-card); border-radius: 10px; overflow: hidden;
}
.prose th, .prose td {
  border: 1px solid var(--line); padding: 10px 14px;
  text-align: left; vertical-align: top; line-height: 1.5;
}
.prose thead th { background: #ECE8DD; font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: rgba(0,0,0,0.012); }

/* callout / source note */
.prose .source {
  font-size: 0.85rem; color: var(--ink-faint); margin: 0.4em 0 0;
}
.prose .callout {
  background: #F7EFE9; border: 1px solid #EBD9CE;
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 16px 20px; margin: 1.8em 0;
  font-size: 0.96rem;
}
.prose .callout strong { color: var(--accent-dk); }

/* rating star */
.prose .rating { color: var(--accent); font-size: 1.1rem; letter-spacing: 2px; }

/* lead paragraph */
.prose .lead { font-size: 1.15rem; color: var(--ink-soft); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.6em 0; }

.article-footer {
  max-width: var(--measure); margin: 56px auto 0;
  padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}

/* ---------- about / generic content ---------- */
.page { padding: 64px 0 40px; }
.page .prose h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em;
  margin: 0 0 24px; line-height: 1.1;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  color: var(--ink-faint); font-size: 0.92rem;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-inner a { color: var(--ink-soft); }
.social { display: flex; gap: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 680px) {
  body { font-size: 17px; }
  .hero { padding: 64px 0 40px; }
  .nav-links { gap: 18px; }
  .post-item a { grid-template-columns: 1fr; gap: 6px; padding: 22px 8px; }
  .post-item .date { padding-top: 0; order: -1; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
