/* ===================================================================
   styles.css — shared styles for jimramirez.com
   Contains only site-wide pieces: tokens, base, nav, container,
   shared type helpers, buttons, footer, and shared responsive rules.
   Page-unique CSS stays inline in each page's <style> block.
   =================================================================== */

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

:root {
  --ink:       #1a1a1a;
  --ink-muted: #555555;
  --ink-faint: #909090;
  --surface:   #ffffff;
  --surface-2: #f7f6f3;
  --surface-3: #efede7;
  --border:    rgba(0,0,0,0.1);
  --accent:    rgba(118, 84, 52, 0.18);
  --max:       740px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e8e6e0;
    --ink-muted: #aaaaaa;
    --ink-faint: #666666;
    --surface:   #111111;
    --surface-2: #1c1c1c;
    --surface-3: #242424;
    --border:    rgba(255,255,255,0.1);
    --accent:    rgba(214, 178, 128, 0.12);
  }
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}

.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; height: 58px;
}

.nav-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mobile-label { display: none; }
.desktop-label { display: inline; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a {
  position: relative;
  font-size: 14px; color: var(--ink-muted); text-decoration: none; transition: color 0.15s; white-space: nowrap;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.15s ease; opacity: 0.55;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); font-weight: 500; }

/* ---- LAYOUT ---- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }

/* ---- SHARED TYPE ---- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600; line-height: 1.15;
  letter-spacing: -0.03em; margin-bottom: 1.25rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.625rem 1.25rem; border-radius: 7px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
  cursor: pointer; border: none; line-height: 1;
}

.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { opacity: 0.82; }
.btn-ghost { background: transparent; color: var(--ink-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--ink); border-color: rgba(0,0,0,0.25); }

@media (prefers-color-scheme: dark) {
  .btn-ghost:hover { border-color: rgba(255,255,255,0.25); }
}

.btn-row { display: flex; gap: 0.875rem; flex-wrap: wrap; }

/* ---- FOOTER ---- */
footer { border-top: 1px solid var(--border); padding: 2.5rem 2rem; }

.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}

.footer-note { font-size: 13px; color: var(--ink-faint); }
.footer-links { display: flex; gap: 1.75rem; }
.footer-links a { font-size: 13px; color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--ink); }

/* ---- SHARED RESPONSIVE (nav/footer/container) ---- */
@media (max-width: 600px) {
  .nav-inner { height: 56px; gap: 0.75rem; }
  .nav-name { font-size: 14px; white-space: nowrap; }
  .nav-links { gap: 0.85rem; align-items: center; }
  .nav-links a { font-size: 13px; white-space: nowrap; }
  .desktop-label { display: none; }
  .mobile-label { display: inline; }
  nav, footer { padding: 0 1.25rem; }
  .container { padding: 0 1.25rem; }
}

/* ===================================================================
   THINKING / WRITING — shared styles for the /thinking/ section
   Used by /thinking/index.html and /thinking/<slug>/index.html
   =================================================================== */

/* ---- Writing list (index) ---- */
.writing-intro {
  font-size: 15px; color: var(--ink-muted);
  max-width: 580px; line-height: 1.75; margin-bottom: 2rem;
}

.writing-list { list-style: none; display: flex; flex-direction: column; gap: 0; }

.writing-item { border-top: 1px solid var(--border); }
.writing-item:last-child { border-bottom: 1px solid var(--border); }

.writing-link {
  display: block; padding: 1.5rem 0; text-decoration: none;
  transition: opacity 0.15s;
}
.writing-link:hover { opacity: 0.6; }

.writing-item-title {
  font-size: 1.05rem; font-weight: 600; color: var(--ink);
  letter-spacing: -0.015em; line-height: 1.35; margin-bottom: 0.4rem;
}

.writing-item-summary {
  font-size: 14px; color: var(--ink-muted); line-height: 1.6; max-width: 580px;
}

/* ---- Post meta (date line) ---- */
.post-meta {
  font-size: 13px; color: var(--ink-faint);
  letter-spacing: 0.01em; margin-bottom: 1.5rem;
}

/* ---- Prose body (post content) ---- */
.prose { max-width: 640px; }

.prose p {
  font-size: 1.0625rem; color: var(--ink-muted);
  line-height: 1.8; margin-bottom: 1.4rem;
}

.prose p:last-child { margin-bottom: 0; }

.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }

.prose ul {
  list-style: none; display: flex; flex-direction: column;
  gap: 0.55rem; margin: 0 0 1.4rem;
}

.prose ul li {
  position: relative; padding-left: 1.3rem;
  font-size: 1.0625rem; color: var(--ink-muted); line-height: 1.7;
}

.prose ul li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--ink-faint);
}

/* Emphasised standalone lines rendered as blockquotes */
.prose blockquote {
  border-left: 3px solid var(--border);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 0 0 1.4rem;
}

.prose blockquote p {
  font-size: 1.15rem; font-weight: 500; font-style: italic;
  color: var(--ink); line-height: 1.5; margin: 0;
}

/* ---- Post footer nav ---- */
.post-nav {
  border-top: 1px solid var(--border);
  margin-top: 3rem; padding-top: 2rem;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}

.post-nav .back-link { font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.post-nav .back-link:hover { text-decoration: underline; }

.post-nav-adjacent { display: flex; flex-direction: column; gap: 0.35rem; text-align: right; }
.post-nav-adjacent a { font-size: 13px; color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.post-nav-adjacent a:hover { color: var(--ink); }

/* ---- "Read the full post" inline link ---- */
.read-full {
  display: inline-block; margin-top: 0.5rem;
  font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.read-full:hover { text-decoration: underline; }

/* ---- Writing list: optional date ---- */
.writing-item-date {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.4rem;
}

/* ---- Post sources (optional, end of article) ---- */
.post-sources {
  max-width: 640px; margin-top: 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}

.post-sources-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.75rem;
}

.post-sources ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.post-sources li { font-size: 14px; line-height: 1.5; }
.post-sources a { color: var(--ink-muted); text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s; }
.post-sources a:hover { color: var(--ink); }

/* ---- Post banner / header image (optional) ---- */
.post-banner {
  margin: 0 0 2.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.post-banner img {
  display: block;
  width: 100%;
  height: auto;
}
