/* Fresh Rots — writing collection. House theme: single true-black ground, coded
   accents, coherent with the portfolio hub, talks page, and web CV.
   Real Hanken Grotesk + JetBrains Mono come from the linked fonts.css. */
:root {
  --ground: #0A0C0B; --panel: #141614; --ink: #E9EDE3; --muted: #A9B4AC;
  --blue: #4FA3D1; --green: #4FCE7E; --purple: #A98FE0; --coral: #E8794E;
  --link: #4FCE7E;
  --line: rgba(233,237,227,0.14); --line-soft: rgba(233,237,227,0.075);
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 2.4rem 1.4rem 5rem; }
a { color: var(--link); text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--link) 45%, transparent); }
a:hover { border-bottom-color: var(--link); }

/* Top nav (back-links) */
.topnav { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin-bottom: 2.4rem; }
.topnav a { color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.topnav a:hover { color: var(--link); border-bottom-color: var(--link); }

/* Writing index */
.kicker { font-family: var(--mono); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--green); margin: 0 0 1rem; }
.w-head h1 { font-weight: 800; font-size: clamp(2.4rem, 7vw, 3.6rem); letter-spacing: -0.03em;
  line-height: 1.0; margin: 0 0 0.7rem; }
.w-head .lede { color: var(--muted); font-size: 1.14rem; max-width: 40ch; margin: 0 0 2.8rem; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 1.4rem 0; border-top: 1px solid var(--line-soft); }
.post-list li:first-child { border-top: 0; }
.post-list a { display: block; border-bottom: 0; }
.post-list .pdate { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--green); }
.post-list .ptitle { display: block; font-weight: 700; font-size: 1.4rem; color: var(--ink);
  letter-spacing: -0.015em; margin: 0.2rem 0; }
.post-list a:hover .ptitle { color: var(--link); }
.post-list .psum { color: var(--muted); font-size: 1rem; margin: 0.25rem 0 0; max-width: 60ch; }

/* Post article */
article .post-date { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green); margin: 0 0 0.5rem; }
article h1 { font-weight: 800; font-size: clamp(2rem, 5.5vw, 2.9rem); letter-spacing: -0.03em;
  line-height: 1.04; margin: 0 0 1.6rem; }
article h2 { font-weight: 800; font-size: 1.55rem; letter-spacing: -0.02em; margin: 2.2rem 0 0.6rem; }
article h3 { font-weight: 700; font-size: 1.22rem; margin: 1.8rem 0 0.5rem; }
article p { margin: 0 0 1.15rem; overflow-wrap: break-word; }
article ul, article ol { padding-left: 1.3rem; margin: 0.4rem 0 1.15rem; }
article li { margin: 0.35rem 0; }
article strong, article b { font-weight: 700; color: var(--ink); }
article em, article i { font-style: italic; }
article blockquote { margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--line); color: var(--muted); }
article code { font-family: var(--mono); font-size: 0.88em; color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent); padding: 0.05em 0.35em; border-radius: 4px; }
article pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem; overflow-x: auto; }
article pre code { background: none; color: var(--ink); padding: 0; }
article img { max-width: 100%; height: auto; display: block; border-radius: 8px;
  border: 1px solid var(--line); margin: 0.6rem 0; }
article .figure { margin: 1.8rem 0; }
article .figure .caption, article figcaption { font-family: var(--mono); font-size: 0.8rem;
  color: var(--muted); margin-top: 0.5rem; }

.foot { margin-top: 3.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.foot a { color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.foot a:hover { color: var(--link); }
