/* Extra styles for case-study, blog and post pages (loaded after styles.css) */
.page-nav .nav-links { display: flex; }
.page { max-width: 1100px; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 5rem; }
.back { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .8rem; color: var(--ink-2); margin-bottom: 2rem; }
.back:hover { color: var(--blue); }
.page h1.display { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 18ch; }
.lede { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-2); max-width: 62ch; margin-top: 1.4rem; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 1.6rem; }
.meta-row .tags { margin: 0; }
.meta-row .plink { margin: 0; }
.shot { margin-top: 3rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: .7rem 1rem; font-family: var(--mono); font-size: .75rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.shots { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 1rem; padding-bottom: .5rem; }
.shots img { height: 220px; width: auto; border-radius: 14px; border: 1px solid var(--line); scroll-snap-align: start; cursor: zoom-in; }
.phone-shots img { height: 420px; }

.cs-block { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--line); }
.cs-block:first-of-type { margin-top: 3.5rem; }
.cs-label { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.cs-label b { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 3rem; line-height: 1; color: var(--orange); letter-spacing: 0; text-transform: none; margin-bottom: .4rem; }
.cs-text { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.55; max-width: 60ch; }

/* approach → pipeline diagram */
.pipeline { display: flex; flex-wrap: wrap; gap: 1.2rem 0; counter-reset: step; }
.pipe-step { position: relative; flex: 1 1 200px; min-width: 180px; padding: 1.1rem 1.1rem 1.2rem; margin-right: 2.4rem; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 110ms); }
.pipeline.in .pipe-step { opacity: 1; transform: none; }
.pipe-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: .75rem; color: var(--orange); margin-bottom: .5rem; }
.pipe-step:nth-child(1) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pipe-step:nth-child(1)::before { color: var(--lime); }
.pipe-step:last-child { background: var(--blue); color: #fff; border-color: var(--blue); margin-right: 0; }
.pipe-step:last-child::before { color: var(--lime); }
.pipe-step:not(:last-child)::after { content: "→"; position: absolute; right: -2rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--blue); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translate(5px, -50%); } }
.pipe-step p { font-weight: 500; line-height: 1.4; }

.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.result { background: var(--bg); padding: 1.6rem 1.4rem; }
.result b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--blue); }
.result span { color: var(--ink-2); font-size: .95rem; display: block; margin-top: .5rem; }
.learned { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.2; max-width: 30ch; }
.learned::before { content: "“"; color: var(--orange); }
.learned::after { content: "”"; color: var(--orange); }

.next-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-top: 3rem; padding: 2rem; border-radius: var(--radius); background: var(--ink); color: var(--bg); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.next-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.next-card small { font-family: var(--mono); color: var(--lime); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.next-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; margin-top: .3rem; }
.next-card .arrow { font-size: 2.4rem; color: var(--lime); }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.cta-row h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); color: var(--blue); }
.cta-row h2 em { color: var(--ink); }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; margin-top: 3rem; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.post-card:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: var(--shadow); }
.post-card .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--blue), var(--orange)); position: relative; overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .cover span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 3rem; color: rgba(255,255,255,.9); }
.post-card .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-card .date { font-family: var(--mono); font-size: .75rem; color: var(--ink-2); }
.post-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.post-card p { color: var(--ink-2); font-size: .95rem; flex: 1; }
.empty-state { margin-top: 3rem; padding: 3rem 1.5rem; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }
.empty-state b { display: block; font-family: var(--serif); font-weight: 400; font-size: 2rem; color: var(--ink); margin-bottom: .4rem; }

.article { max-width: 720px; margin: 0 auto; }
.article .display { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: none; }
.byline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-top: 1.4rem; font-family: var(--mono); font-size: .8rem; color: var(--ink-2); }
.article .cover-img { margin: 2.4rem 0 0; border-radius: var(--radius); overflow: hidden; }
.article .cover-img img { width: 100%; display: block; }
.prose { margin-top: 2.6rem; font-size: 1.12rem; line-height: 1.75; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 400; color: var(--blue); line-height: 1.1; margin: 2.2rem 0 .8rem; }
.prose h2 { font-size: 2.2rem; } .prose h3 { font-size: 1.7rem; } .prose h4 { font-size: 1.35rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure { margin: 0 0 1.3rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-left: 4px solid var(--orange); padding: .2rem 0 .2rem 1.2rem; font-family: var(--serif); font-size: 1.4rem; color: var(--ink); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); padding: .1em .35em; border-radius: 5px; }
.prose pre { background: #0E0F1C; color: #E8E6F0; padding: 1.2rem; border-radius: 14px; overflow-x: auto; font-size: .9rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { max-width: 100%; border-radius: 14px; }
.share { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.share .mono { color: var(--ink-2); }

.skeleton { height: 1.2em; border-radius: 8px; background: linear-gradient(90deg, var(--bg-2), var(--card), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; margin-bottom: .8rem; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(13,14,26,.85); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 14px; }

@media (max-width: 760px) {
  .cs-block { grid-template-columns: 1fr; gap: 1rem; }
  .pipe-step { margin-right: 0; flex-basis: 100%; }
  .pipe-step:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -1.25rem; transform: translateX(50%); animation: none; }
  .pipeline { gap: 1.6rem 0; }
  .shots img { height: 160px; } .phone-shots img { height: 320px; }
  .page-nav .nav-links { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pipe-step { opacity: 1; transform: none; } }
