/* ============ Ink: the chosen look (bold, modern, confident) ============
   Loaded after style.css (and case.css) so these values win. */
:root {
  --bg: #fbfbfa; --surface: #ffffff; --ink: #0c0c0c; --ink-2: #444444; --ink-3: #8c8c8c; --line: #e6e6e4;
  --accent: #ff4a1c; --accent-soft: rgb(255 74 28 / .1); --live: #1f9d55;
  --serif: 'Inter Tight', system-ui, -apple-system, sans-serif; --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0b0b0b; --surface: #151515; --ink: #f4f4f2; --ink-2: #b5b5b5; --ink-3: #777777; --line: #262626;
  --accent: #ff6a40; --accent-soft: rgb(255 106 64 / .14); --live: #4cc47f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b; --surface: #151515; --ink: #f4f4f2; --ink-2: #b5b5b5; --ink-3: #777777; --line: #262626;
    --accent: #ff6a40; --accent-soft: rgb(255 106 64 / .14); --live: #4cc47f;
  }
}

/* type: heavy, tight headlines */
:is(h1, .c-hero h1) { font-weight: 700; letter-spacing: -.055em; line-height: .92; }
:is(.row h3, .chap h2, .contact-line, .about .lead, .featured h3, .dec h3, .next strong, .flow-title, .done-title, .tldr h2, .sub-head) { font-weight: 650; letter-spacing: -.035em; }
h1 em, .c-hero h1 em { font-style: normal; color: var(--accent); }
:is(.proof-chips b, .proof b, .stats b) { font-weight: 700; letter-spacing: -.04em; }
.label { color: var(--ink); }

/* crisper shapes */
.btn { border-radius: 8px; }
:is(.featured, .tldr, .dec, .flowfig, .face, .email, .proof) { border-radius: 10px; }

/* ===== Proof, grouped by project ===== */
.pp { display: grid; gap: 12px; margin-inline: calc(min(0px, (var(--col) - min(980px, 100vw - 64px)) / 2)); }
.pp-row { display: grid; grid-template-columns: 290px 1fr; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; transition: border-color .25s, transform .35s var(--ease); }
.pp-row:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.pp-id { display: flex; gap: 14px; align-items: center; padding: 18px; border-right: 1px solid var(--line); }
.pp-img { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.pp-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pp-img-mf { background: #fff; }
.pp-img-mf img { object-fit: contain; object-position: center; padding: 4px; }
.pp-txt { display: grid; gap: 2px; min-width: 0; }
.pp-txt b { font: 650 22px/1.1 var(--serif); letter-spacing: -.03em; color: var(--ink); }
.pp-txt i { font: normal 400 12.5px/1.4 var(--sans); color: var(--ink-3); }
.pp-txt em { font: normal 500 13px var(--sans); color: var(--accent); margin-top: 4px; }
.pp-id:hover .pp-txt em { text-decoration: underline; text-underline-offset: 3px; }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.pp-stats li { display: grid; gap: 6px; align-content: start; padding: 18px 20px; }
.pp-stats li + li { border-left: 1px solid var(--line); }
.pp-stats b { font: 700 clamp(30px, 3.4vw, 40px)/1 var(--serif); letter-spacing: -.045em; color: var(--ink); }
.pp-stats span { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pp-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 4px 2px 0; font-size: 14.5px; }
.pp-live span { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); display: inline-flex; align-items: center; gap: 7px; }
.pp-live span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.pp-live a { color: var(--ink-2); transition: color .2s; }
.pp-live a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .pp { margin-inline: 0; }
  .pp-row { grid-template-columns: 1fr; }
  .pp-id { border-right: 0; border-bottom: 1px solid var(--line); }
  .pp-stats { grid-template-columns: 1fr; }
  .pp-stats li { grid-template-columns: 92px 1fr; align-items: baseline; padding: 12px 18px; }
  .pp-stats li + li { border-left: 0; border-top: 1px solid var(--line); }
  .pp-stats b { font-size: 30px; }
}

/* ===== case study cards (all three share the featured format) ===== */
.cases { display: grid; gap: 22px; }
.feat-media { display: block; position: relative; min-height: 340px; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.feat-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.featured:hover .feat-media img { transform: scale(1.04); }
.feat-media-mf { background: #fff; }
.feat-media-mf img { object-fit: contain; padding: 28px; }
@media (max-width: 760px) { .feat-media { min-height: 240px; } }
.live-today { margin-top: 22px; padding: 14px 4px 0; border-top: 1px solid var(--line); }

/* ===== the site cat: plays with the tangled line ===== */
.cat { position: absolute; right: -14px; bottom: calc(50% - 2px); width: 74px; height: 74px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; transform-origin: 50% 100%; }
.cat svg { width: 100%; height: 100%; overflow: visible; }
.cat svg path, .cat svg circle { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.cat .cat-fill { fill: var(--bg); }
.cat .cat-eyes circle { fill: var(--ink); stroke: none; transition: transform .12s linear; }
.cat .cat-eyes { transition: transform .15s; transform-origin: 44px 36px; }
.cat .cat-shut { opacity: 0; }
.cat .cat-face { stroke-width: 1.4; }
.cat .cat-bell { fill: var(--accent); stroke: none; }
.cat .cat-tail { transform-origin: 64px 84px; animation: tail 2.6s ease-in-out infinite; }
.cat .cat-paw { transform-origin: 34px 82px; }
.cat .cat-head { transform-origin: 44px 50px; transition: transform .3s var(--ease); }
.cat:hover .cat-head { transform: rotate(-6deg); }
.cat.blink .cat-eyes { transform: scaleY(.1); }
.cat.bat .cat-paw { animation: bat .7s ease-in-out; }
.cat.hop { animation: hop .55s cubic-bezier(.3, 1.6, .5, 1); }
.cat.calm .cat-eyes { opacity: 0; }
.cat.calm .cat-shut { opacity: 1; }
.cat.calm .cat-tail { animation-duration: 5s; }
.cat-bubble { position: absolute; right: 52px; bottom: 74px; white-space: nowrap; font: 500 12.5px var(--mono); padding: 6px 10px; border-radius: 10px 10px 2px 10px; background: var(--ink); color: var(--bg); opacity: 0; transform: translateY(6px) scale(.9); transform-origin: 100% 100%; transition: opacity .25s, transform .35s var(--ease); pointer-events: none; }
.cat-bubble.on { opacity: 1; transform: none; }
.cat:focus-visible { outline: none; }
.cat:focus-visible svg { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
@keyframes tail { 50% { transform: rotate(9deg); } }
@keyframes bat { 30% { transform: rotate(18deg) translateY(-3px); } 60% { transform: rotate(-4deg); } }
@keyframes hop { 40% { transform: translateY(-16px) scale(1.04); } }
@media (max-width: 560px) { .cat { width: 56px; height: 56px; right: -6px; } .cat-bubble { bottom: 56px; right: 40px; } }
@media (prefers-reduced-motion: reduce) { .cat .cat-tail { animation: none; } }

/* ===== About: experience timeline + toolkit ===== */
.tl { display: grid; margin-top: 4px; }
.tl li { display: grid; grid-template-columns: 170px 1fr; gap: 6px 22px; padding: 16px 0; border-top: 1px solid var(--line); position: relative; }
.tl-when { font: 400 13px var(--mono); color: var(--ink-3); padding-top: 3px; }
.tl-what { display: grid; gap: 4px; }
.tl-role { color: var(--ink); }
.tl-role b { font-weight: 650; }
.tl-what p:not(.tl-role) { font-size: 15px; color: var(--ink-2); }
.tl li:first-child .tl-when::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.tools-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tools-chips li { font: 400 13px var(--mono); padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); transition: border-color .2s, color .2s, transform .3s var(--ease); }
.tools-chips li:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px) rotate(-2deg); }
.about .cta { margin-top: 18px; }
@media (max-width: 560px) { .tl li { grid-template-columns: 1fr; } }

/* ===== How I work: three cats, drawn in when they scroll into view ===== */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; }
.how-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px 18px; display: grid; gap: 4px; align-content: start; transition: border-color .25s, transform .35s var(--ease); }
.how-card:hover { border-color: var(--ink-3); transform: translateY(-3px); }
.how-art { width: 100%; height: auto; aspect-ratio: 160 / 110; margin-bottom: 6px; overflow: visible; }
.how-art path, .how-art circle { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.how-art .fill { fill: var(--surface); }
.how-art .dot { fill: var(--ink); stroke: none; }
.how-art .ledge { stroke: var(--line); stroke-width: 2; }
.how-art .tape { stroke: var(--accent); stroke-width: 6; stroke-linecap: butt; }
.how-art .glass { fill: var(--surface); transition: fill .4s; }
.how-art .rays { stroke: var(--accent); opacity: 0; }
.how-art .tick circle, .how-art .tick path { stroke: var(--live); }
.how-n { font: 400 12px var(--mono); color: var(--accent); }
.how-card h4 { font: 650 19px/1.2 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.how-card p { font-size: 14.5px; color: var(--ink-2); }

/* draw-in: every line traces itself once */
.how-art :is(path, circle) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.how-art .dot { stroke-dasharray: none; opacity: 0; }
.how.play .how-art :is(path, circle) { animation: draw 1.1s var(--ease) forwards; }
.how.play .how-art .dot { animation: pop .3s 1s forwards; }
.how.play .how-card:nth-child(2) .how-art :is(path, circle) { animation-delay: .25s; }
.how.play .how-card:nth-child(3) .how-art :is(path, circle) { animation-delay: .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

/* then each cat keeps doing its thing */
.how.play .art-watch .eyes { animation: scan 3.2s 1.4s ease-in-out infinite; }
.how.play .art-watch .walker { animation: stroll 3.2s 1.4s ease-in-out infinite; }
.how.play .art-watch .leg-a { transform-origin: 30px 84px; animation: legA .5s 1.4s ease-in-out infinite alternate; }
.how.play .art-watch .leg-b { transform-origin: 30px 84px; animation: legB .5s 1.4s ease-in-out infinite alternate; }
.how.play .art-idea .glass { animation: glow 2.8s 1.6s ease-in-out infinite; }
.how.play .art-idea .rays { animation: rays 2.8s 1.6s ease-in-out infinite; }
.how.play .art-idea .tail { transform-origin: 98px 100px; animation: wag 2.4s 1.6s ease-in-out infinite; }
.how.play .art-ship .peek { animation: peek 3s 1.8s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
@keyframes stroll { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(8px); } }
@keyframes legA { to { transform: rotate(14deg); } }
@keyframes legB { to { transform: rotate(-14deg); } }
@keyframes glow { 0%, 30%, 100% { fill: var(--surface); } 45%, 85% { fill: color-mix(in srgb, var(--accent) 55%, var(--surface)); } }
@keyframes rays { 0%, 30%, 100% { opacity: 0; } 45%, 85% { opacity: 1; } }
@keyframes wag { 50% { transform: rotate(10deg); } }
@keyframes peek { 0%, 100% { transform: translateY(14px); } 30%, 70% { transform: translateY(0); } }
@media (max-width: 700px) { .how { grid-template-columns: 1fr; gap: 10px; } .how-card { grid-template-columns: 112px 1fr; column-gap: 14px; align-items: center; padding: 12px 14px; } .how-art { grid-row: 1 / span 3; margin: 0; } .how-card h4 { font-size: 17px; } .how-card p { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .how-art :is(path, circle) { stroke-dashoffset: 0; } .how-art .dot { opacity: 1; } }

/* ===== Off the clock: photo wall ===== */
.wall-photos { columns: 3 220px; column-gap: 12px; margin-inline: calc(min(0px, (var(--col) - min(980px, 100vw - 64px)) / 2)); }
.shot { break-inside: avoid; margin: 0 0 12px; position: relative; }
.shot-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; transform: rotate(var(--tilt, 0deg)); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.shot:nth-child(3n+1) .shot-btn { --tilt: -1.2deg; } .shot:nth-child(3n+2) .shot-btn { --tilt: .9deg; } .shot:nth-child(3n) .shot-btn { --tilt: -.5deg; }
.shot-btn img { display: block; width: 100%; height: auto; transition: transform .8s var(--ease), filter .4s; }
.shot-btn:hover, .shot-btn:focus-visible { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 34px rgb(0 0 0 / .18); }
.shot-btn:hover img { transform: scale(1.04); }
.shot figcaption { position: absolute; left: 10px; bottom: 10px; font: 500 11.5px var(--mono); padding: 4px 9px; border-radius: 999px; background: rgb(12 12 12 / .72); color: #f4f4f2; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .35s var(--ease); pointer-events: none; }
.shot:hover figcaption, .shot:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .shot figcaption { opacity: 1; transform: none; } }
@media (max-width: 760px) { .wall-photos { margin-inline: 0; columns: 2 140px; column-gap: 8px; } .shot { margin-bottom: 8px; } }
.photo-box { border: 0; padding: 0; background: none; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.photo-box::backdrop { background: rgb(8 8 8 / .82); backdrop-filter: blur(4px); }
.photo-box img { display: block; max-width: 100%; max-height: 84vh; border-radius: 12px; margin: 0 auto; }
.photo-box p { text-align: center; font: 500 13px var(--mono); color: #f4f4f2; margin-top: 10px; }
.photo-box .p-x { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f4f4f2; color: #0c0c0c; font-size: 14px; cursor: pointer; }
.photo-box[open] { animation: boxIn .35s var(--ease); }
@keyframes boxIn { from { opacity: 0; transform: scale(.96); } }
