/* Subpages (posts/*.html): one pink paper sheet on the black ground, torn bottom edge.
   Same paper, tear and type as the home page — kept deliberately simple. */


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ground: #111;
  --ink:    #161616;
  --ink2:   rgba(22,22,22,.66);
  --paper:  #f59cb8;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Gloock', 'Archivo', Georgia, serif;   /* one weight: no faux bold */
}
body { background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.6; font-synthesis: none; overflow-x: hidden; }
a { color: inherit; }

.wrap { max-width: 860px; margin: 0 auto; padding: 28px 12px 64px; container-type: inline-size; }

/* the sheet: straight top, torn bottom (mask + fibres from TornPaper-Page-Mockups-04) */
.sheet {
  --capw: max(100cqw, 760px);
  --hb: calc(var(--capw) * .2373);
  position: relative;
  padding: clamp(28px, 6cqw, 64px) clamp(20px, 7cqw, 72px) calc(var(--hb) * .62 + 48px);
  background-color: var(--paper);
  background-image: url(/public/paper/t04a-bot-fib.webp), url(/public/paper/paper.jpg);
  background-size: var(--capw) var(--hb), 1600px auto;
  background-position: center bottom, center top;
  background-repeat: no-repeat, repeat;
  -webkit-mask-image: linear-gradient(#000,#000), url(/public/paper/t04a-bot.webp);
          mask-image: linear-gradient(#000,#000), url(/public/paper/t04a-bot.webp);
  -webkit-mask-size: 100% calc(100% - var(--hb) + 2px), var(--capw) var(--hb);
          mask-size: 100% calc(100% - var(--hb) + 2px), var(--capw) var(--hb);
  -webkit-mask-position: 0 0, center bottom;
          mask-position: 0 0, center bottom;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* back label — same black label as LinkedIn / Medium on the home page */
.back {
  display: inline-block; font-family: var(--mono); font-size: 13px; padding: .55rem 1rem; text-decoration: none;
  background: var(--ink); color: var(--paper); border-radius: 2px; transform: rotate(-1.5deg); transition: transform .2s;
  -webkit-mask: url(/public/paper/worn.webp) 0 0 / 180px repeat; mask: url(/public/paper/worn.webp) 0 0 / 180px repeat;  /* worn ink */
}
.back:hover { transform: rotate(0) translateY(-2px); }
.back.end { margin-top: 3rem; transform: rotate(1.2deg); }

.post-meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); margin: 2.2rem 0 .6rem; }
.post h1 { font-weight: 700; font-size: clamp(34px, 6.4cqw, 58px); line-height: 1.05; letter-spacing: -.005em; }
.post-content { margin-top: 2rem; }
.post-content p { margin-bottom: 1.15rem; max-width: 62ch; }
.post-content h2 { font-weight: 700; font-size: clamp(24px, 3.4cqw, 30px); line-height: 1.15; margin: 2.4rem 0 .7rem; }
.post-content h3 { font-weight: 700; font-size: 21px; margin: 1.8rem 0 .5rem; }
.post-content a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-content a:hover { text-decoration-thickness: 4px; }
.post-content ul, .post-content ol { padding-left: 1.4rem; margin-bottom: 1.15rem; max-width: 60ch; }
.post-content li { margin-bottom: .35rem; }
.post-content strong { font-weight: 700; }

/* images: pasted prints — white border, shadow, slight tilt */
.post-content img {
  display: block; max-width: 100%; height: auto; margin: 1.8rem 0;
  background: #fff; padding: 8px; box-shadow: 0 8px 18px rgba(60,10,30,.28);
  transform: rotate(-.6deg);
}
.post-content .figure:nth-of-type(2n) img, .post-content img:nth-of-type(2n) { transform: rotate(.7deg); }
.post-content .figure { margin: 1.8rem 0; }

blockquote { border-left: 4px solid var(--ink); padding-left: 1.1rem; margin: 1.6rem 0; }
blockquote p { font-style: italic; }
.viz-link { display: inline-block; font-family: var(--mono); font-size: 12.5px; text-decoration: none !important;
  background: var(--ink); color: var(--paper); padding: .4rem .8rem; border-radius: 2px; margin-top: -.6rem;
  -webkit-mask: url(/public/paper/worn.webp) 0 0 / 180px repeat; mask: url(/public/paper/worn.webp) 0 0 / 180px repeat; }
.viz-link:hover { transform: translateY(-2px); }

pre { background: var(--ink); color: #f2ede4; padding: 1.1rem 1.2rem; overflow-x: auto; margin: 1.3rem 0; border-radius: 2px; }
code { font-family: var(--mono); font-size: 13.5px; }
p code { background: rgba(22,22,22,.1); padding: .05rem .3rem; border-radius: 2px; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 15px; }
th, td { padding: .5rem .7rem; border-bottom: 1px solid rgba(22,22,22,.25); text-align: left; }
th { font-weight: 700; border-bottom: 2px solid var(--ink); }
