/* riskr Blog — Ink Indigo + Copper on Paper
   Matches Greybox Industries theme tokens. */

:root {
  --background: 38 30% 96%;
  --foreground: 230 35% 12%;
  --paper: 36 38% 97%;
  --paper-deep: 34 24% 92%;
  --primary: 230 38% 16%;
  --primary-foreground: 38 30% 96%;
  --muted: 34 18% 88%;
  --muted-foreground: 230 10% 38%;
  --accent: 24 62% 48%;
  --accent-foreground: 38 30% 96%;
  --accent-soft: 24 55% 92%;
  --border: 34 18% 84%;

  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;

  --shadow-paper: 0 1px 2px hsl(230 35% 12% / .04), 0 8px 32px -12px hsl(230 35% 12% / .10);
  --shadow-card:  0 1px 0 hsl(230 35% 12% / .04), 0 1px 3px hsl(230 35% 12% / .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.01em; margin: 0; font-weight: 400; color: hsl(var(--primary)); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.page { display: flex; flex-direction: column; min-height: 100vh; }

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid hsl(var(--border) / .7);
  background: hsl(var(--background) / .85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px; gap: 16px; flex-wrap: wrap;
}
@media (min-width: 768px) {
  .site-header__inner { padding: 18px 32px; }
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  transition: transform .25s ease; flex-shrink: 0;
}
.brand:hover .brand-mark { transform: rotate(12deg); }
.brand-name { font-family: var(--font-display); font-size: 26px; color: hsl(var(--primary)); line-height: 1; }
.brand-sub { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-top: 2px; }

/* Nav */
.site-nav { display: none; align-items: center; gap: 24px; font-size: 13px; color: hsl(var(--foreground) / .75); }
.site-nav a { transition: color .2s; }
.site-nav a:hover { color: hsl(var(--accent)); }
.site-nav a:last-child {
  border: 1px solid hsl(var(--primary) / .8); padding: 8px 14px;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: hsl(var(--primary)); transition: all .2s;
}
.site-nav a:last-child:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
@media (min-width: 768px) { .site-nav { display: flex; } }

/* Hamburger — hidden by default, mobile only */
.nav-toggle { display: none; }
@media (max-width: 767px) {
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 28px; height: 20px; padding: 0; background: none; border: none;
    cursor: pointer; flex-shrink: 0;
  }
  .nav-toggle span {
    display: block; height: 2px; background: hsl(var(--primary));
    border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
    transform-origin: center;
  }
  .nav-toggle--open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle--open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .site-nav {
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    width: 100%; padding: 12px 0 20px; border-top: 1px solid hsl(var(--border) / .7);
  }
  .site-nav.nav-open { display: flex; }
  .site-nav .nav-link {
    width: 100%; padding: 12px 0; font-size: 15px;
    border-bottom: 1px solid hsl(var(--border) / .5);
    color: hsl(var(--foreground) / .8);
  }
  .site-nav a:last-child { margin-top: 16px; align-self: flex-start; }
}

/* ===== Main ===== */
.site-main { flex: 1; padding: 56px 0 80px; }
@media (min-width: 768px) { .site-main { padding: 88px 0 120px; } }

/* ===== Archive (index) ===== */
.archive__intro { max-width: 760px; margin-bottom: 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: hsl(var(--accent)); margin: 0 0 20px;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 28px; height: 1px; background: hsl(var(--accent));
}
.archive__intro h1 {
  font-size: clamp(32px, 6.4vw, 78px); line-height: 1.05;
}
.archive__intro p {
  margin-top: 20px; font-size: clamp(15px, 4vw, 18px); line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

.post-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0;
  background: hsl(var(--paper)); box-shadow: var(--shadow-paper);
}
.post-list li { border-top: 1px solid hsl(var(--border)); }
.post-list li:first-child { border-top: 0; }
.post-card {
  display: block; padding: 32px 28px;
  transition: background .2s ease;
}
@media (min-width: 768px) { .post-card { padding: 40px 48px; } }
.post-card:hover { background: hsl(var(--foreground) / .025); }
.post-card .meta {
  margin: 0 0 12px; font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: hsl(var(--accent));
}
.post-card h2 {
  font-size: clamp(24px, 3.2vw, 34px); line-height: 1.2;
  margin: 0 0 12px; transition: color .2s;
}
.post-card:hover h2 { color: hsl(var(--accent)); }
.post-card p {
  margin: 0; font-size: 15px; line-height: 1.7;
  color: hsl(var(--foreground) / .8); max-width: 720px;
}

/* ===== Article (post) ===== */
.article { background: transparent; }
.article__header {
  max-width: 820px; margin: 0 auto; padding-bottom: 40px;
  border-bottom: 1px solid hsl(var(--border));
}
.article .title {
  font-size: clamp(28px, 5.6vw, 64px); line-height: 1.05;
  letter-spacing: -.015em;
}
.article .dek {
  margin-top: 20px; font-size: clamp(15px, 4vw, 19px); line-height: 1.55;
  color: hsl(var(--muted-foreground)); max-width: 680px;
}

.byline {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-top: 36px;
}
.byline__author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / .75));
  color: hsl(var(--primary-foreground));
  outline: 4px solid hsl(var(--primary) / .06);
}
.byline__name { margin: 0; font-size: 14px; font-weight: 600; color: hsl(var(--primary)); }
.byline__role {
  margin: 2px 0 0; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: hsl(var(--muted-foreground));
}
.byline__meta {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: hsl(var(--accent)); font-weight: 600;
}

/* ===== Prose ===== */
.prose {
  max-width: 720px; margin: 0 auto; padding-top: 48px;
  font-size: 17px; line-height: 1.75; color: hsl(var(--foreground) / .9);
}
.prose > * + * { margin-top: 1.2em; }
.prose p { margin: 0; }
.prose h2 {
  font-family: var(--font-display); font-size: 32px; line-height: 1.2;
  margin-top: 1.6em; color: hsl(var(--primary));
}
.prose h3 {
  font-family: var(--font-display); font-size: 24px; line-height: 1.25;
  margin-top: 1.5em; color: hsl(var(--primary));
}
.prose a {
  color: hsl(var(--accent)); text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: hsl(var(--primary)); }
.prose strong { color: hsl(var(--primary)); }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul li::marker { color: hsl(var(--accent)); }
.prose ol li::marker { color: hsl(var(--accent)); font-weight: 600; }
.prose img { margin: 1.5em auto; box-shadow: var(--shadow-card); }
.prose blockquote {
  border-left: 2px solid hsl(var(--accent));
  background: hsl(var(--accent-soft) / .4);
  padding: 18px 22px; margin: 1.4em 0;
  font-family: var(--font-display); font-size: 22px; font-style: italic;
  line-height: 1.5; color: hsl(var(--primary));
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em; background: hsl(var(--muted)); padding: 2px 6px;
  border-radius: 3px; color: hsl(var(--primary));
}
.prose pre {
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.6;
  box-shadow: var(--shadow-card);
}
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose hr { border: 0; border-top: 1px solid hsl(var(--border)); margin: 2em 0; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--paper-deep));
}
.site-footer__inner {
  display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
  padding: 32px 0; font-size: 13px; color: hsl(var(--muted-foreground));
}
@media (min-width: 768px) {
  .site-footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.site-footer a { color: hsl(var(--primary)); transition: color .2s; }
.site-footer a:hover { color: hsl(var(--accent)); }
.site-footer__links {
  display: flex; gap: 20px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
}
