/* Founder portfolio — a separate page. Fonts and colours come from premium.css. */
.portfolio { overflow-x: hidden; }
.portfolio .nav { margin-bottom: 0; }
.scroll-line { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60; background: linear-gradient(90deg, var(--accent), #c9a46a); transform: scaleX(0); transform-origin: left; }

/* Flow: elements rise into place as they enter the screen */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.split span { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); animation: word-in .9s cubic-bezier(.2,.7,.2,1) forwards; }
.split span:nth-child(1) { animation-delay: .05s; } .split span:nth-child(2) { animation-delay: .17s; } .split span:nth-child(3) { animation-delay: .29s; }
@keyframes word-in { to { opacity: 1; transform: none; } }

.pf-hero { position: relative; padding: 150px 0 80px; overflow: hidden; }
.pf-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.pf-orb-a { width: 460px; height: 460px; right: -120px; top: 40px; background: color-mix(in srgb, var(--accent) 38%, transparent); animation: drift 14s ease-in-out infinite alternate; }
.pf-orb-b { width: 340px; height: 340px; left: -120px; bottom: -60px; background: #c9a46a55; animation: drift 17s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.12); } }
.pf-hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.pf-hero h1 { font-family: var(--retro-display); font-weight: 500; font-size: clamp(48px, 7vw, 100px); letter-spacing: -.03em; line-height: 1; margin: 6px 0 22px; }
.pf-roles { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font: 600 11px var(--retro-font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pf-roles i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.pf-hook { margin: 26px 0 16px; font-family: var(--retro-display); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.25; color: var(--accent); }
.pf-lede { max-width: 560px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.pf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* The photo is shown whole: a square frame matches the square source, so nothing is cropped. */
.pf-photo { position: relative; margin: 0; }
.pf-frame { position: relative; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; border: var(--outline); box-shadow: 0 30px 60px -28px rgba(60,20,20,.55); transform: perspective(1000px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .25s ease-out; }
.pf-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 60%, rgba(147,2,40,.18)); pointer-events: none; }
.pf-badge { position: absolute; padding: 10px 16px; border-radius: 40px; background: var(--surface); border: var(--outline); font: 600 12px var(--retro-font); box-shadow: 0 12px 28px -14px rgba(60,20,20,.5); animation: bob 5s ease-in-out infinite; }
.pf-badge.b1 { left: -22px; top: 12%; }
.pf-badge.b2 { right: -18px; bottom: 10%; animation-delay: -2.5s; background: #1e1210; color: #f6e7d8; border-color: #1e1210; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.pf-section { padding: 90px 0; }
.pf-section h2 { font-size: clamp(30px, 4vw, 54px); margin-bottom: 8px; }
.pf-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 90px; }
.pf-why h2 { max-width: 900px; }
.pf-why-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
.pf-why-cols p { font-size: 15px; line-height: 1.85; color: var(--muted); }

.timeline { position: relative; list-style: none; margin: 50px 0 0; padding: 0 0 0 34px; display: grid; gap: 34px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline::after { content: ''; position: absolute; left: 7px; top: 6px; width: 2px; height: var(--tl, 0%); max-height: calc(100% - 12px); background: var(--accent); transition: height .2s linear; }
.timeline li { position: relative; padding: 22px 26px; border: var(--outline); border-radius: 16px; background: var(--surface); }
.timeline li::before { content: ''; position: absolute; left: -34px; top: 28px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline li.in::before { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
.timeline time { font: 600 11px var(--retro-font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.timeline h3 { margin: 8px 0 6px; font-size: 21px; letter-spacing: -.02em; }
.timeline p { font-size: 14px; line-height: 1.75; color: var(--muted); max-width: 720px; }

.pf-build { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 40px 0 26px; }
.pf-build a { display: block; padding: 28px; border: var(--outline); border-radius: 18px; background: var(--surface); transition: transform .25s, box-shadow .25s; }
.pf-build a:hover { transform: translateY(-6px); box-shadow: 0 24px 44px -20px rgba(60,20,20,.45); }
.pf-build span { font: 600 10px var(--retro-font); letter-spacing: .18em; color: var(--accent); }
.pf-build h3 { margin: 12px 0 10px; font-family: var(--retro-display); font-weight: 500; font-size: 24px; line-height: 1.2; }
.pf-build p { font-size: 13px; line-height: 1.75; color: var(--muted); }

.pf-principles { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: pr; }
.pf-principles li { counter-increment: pr; padding: 22px 18px; border-top: 2px solid var(--ink); background: var(--surface); border-radius: 0 0 14px 14px; }
.pf-principles li::before { content: '0' counter(pr); display: block; font: 600 11px var(--retro-font); letter-spacing: .16em; color: var(--accent); margin-bottom: 14px; }
.pf-principles b { font-family: var(--retro-display); font-weight: 500; font-size: 20px; }
.pf-principles p { margin-top: 8px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }

.pf-contact { text-align: center; }
.pf-contact .pf-actions, .pf-contact .contact-row { justify-content: center; }
.pf-contact-lede { margin: 10px auto 22px; max-width: 520px; color: var(--muted); }
.pf-footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 0 50px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pf-footer a { color: var(--accent); font-weight: 600; }

@media (max-width: 960px) {
  .pf-hero { padding-top: 120px; }
  .pf-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .pf-photo { max-width: 460px; }
  .pf-badge.b1 { left: 8px; } .pf-badge.b2 { right: 8px; }
  .pf-numbers { grid-template-columns: repeat(2, 1fr); }
  .pf-why-cols, .pf-build { grid-template-columns: 1fr; }
  .pf-principles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .pf-numbers, .pf-principles { grid-template-columns: 1fr; } .timeline { padding-left: 26px; } .timeline li::before { left: -26px; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .split span { opacity: 1; transform: none; transition: none; animation: none; }
  .pf-orb, .pf-badge { animation: none; } .pf-frame { transition: none; }
}


/* ================= Richer portfolio layer ================= */
html { scroll-behavior: smooth; }
.pf-glow { position: absolute; width: 520px; height: 520px; left: 0; top: 0; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); transform: translate(var(--gx, 50vw), var(--gy, 30vh)) translate(-50%, -50%); transition: opacity .4s; opacity: 0; }
.pf-hero:hover .pf-glow { opacity: 1; }
.pf-hero-grid { z-index: 1; }
.pf-orb { will-change: transform; }

/* Photo: wipe-in reveal, spinning text ring */
.pf-photo { opacity: 1; }
.pf-frame { clip-path: inset(0 0 100% 0 round 22px); animation: wipe 1.3s .35s cubic-bezier(.77,0,.18,1) forwards; }
.pf-frame img { transform: scale(1.18); animation: settle 1.8s .35s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0 round 22px); } }
@keyframes settle { to { transform: scale(1); } }
.pf-ring { position: absolute; inset: -46px; z-index: 0; animation: spin 38s linear infinite; pointer-events: none; opacity: .8; }
.pf-ring text { font: 600 9.6px var(--retro-font); letter-spacing: .32em; fill: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.pf-frame, .pf-badge { position: relative; z-index: 1; }
.pf-badge { position: absolute; z-index: 2; }
.pf-scroll { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border: 2px solid color-mix(in srgb, var(--ink) 60%, transparent); border-radius: 14px; transform: translateX(-50%); }
.pf-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Big outlined marquee, skewed by scroll speed */
.bigmarquee { overflow: hidden; padding: 26px 0; border-block: 1px solid var(--line); background: var(--surface); }
.bigmarquee-track { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.bigmarquee-track span { font-family: var(--retro-display); font-weight: 500; font-size: clamp(54px, 9vw, 130px); line-height: 1; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); padding-right: .4em; }

/* Word-fill statement */
.fill-text { font-family: var(--retro-display); font-weight: 500; font-size: clamp(28px, 4.6vw, 66px); line-height: 1.16; letter-spacing: -.02em; max-width: 1060px; margin-top: 10px; text-wrap: balance; }
.fill-text .w { color: color-mix(in srgb, var(--ink) 16%, transparent); transition: color .35s ease; }
.fill-text .w.on { color: var(--ink); }
.pf-numbers { margin-bottom: 110px; }

/* Pinned chapters */
.chapters { padding: 40px 0 60px; }
.chapters-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start; }
.chapters-sticky { position: sticky; top: 120px; padding: 40px 0; }
.chapter-num { display: flex; align-items: baseline; gap: 10px; font-family: var(--retro-display); color: var(--accent); }
.chapter-num span { font-size: clamp(90px, 13vw, 190px); line-height: .9; letter-spacing: -.04em; transition: opacity .3s, transform .5s; display: inline-block; }
.chapter-num small { font: 600 14px var(--retro-font); color: var(--muted); letter-spacing: .1em; }
.chapters-sticky h2 { font-size: clamp(34px, 4.6vw, 64px); margin: 6px 0 22px; }
.chapter-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; max-width: 320px; }
.chapter-bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(.33); transform-origin: left; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.chapters-list { display: grid; }
.chapter { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 0; opacity: .25; transform: translateX(24px); transition: opacity .6s, transform .6s; }
.chapter.on { opacity: 1; transform: none; }
.chapter h3 { font-family: var(--retro-display); font-weight: 500; font-size: clamp(26px, 3vw, 42px); line-height: 1.15; letter-spacing: -.02em; }
.chapter p { margin-top: 18px; font-size: 16px; line-height: 1.85; color: var(--muted); max-width: 560px; }

/* Timeline: cards enter from alternating sides */
.timeline { padding-left: 0; max-width: 1080px; margin-inline: auto; }
.timeline::before, .timeline::after { left: 50%; margin-left: -1px; }
.timeline li { width: calc(50% - 40px); }
.timeline li:nth-child(odd) { justify-self: start; }
.timeline li:nth-child(even) { justify-self: end; }
.timeline li::before { top: 30px; }
.timeline li:nth-child(odd)::before { left: auto; right: -49px; }
.timeline li:nth-child(even)::before { left: -49px; }
.reveal.from-l { transform: translateX(-46px); } .reveal.from-r { transform: translateX(46px); }
.reveal.from-l.in, .reveal.from-r.in { transform: none; }

/* Horizontal showcase pinned to the scroll */
.hscroll { position: relative; height: 320vh; }
.hscroll-pin { position: sticky; top: 0; height: 100vh; min-height: 640px; display: flex; flex-direction: column; justify-content: center; gap: 30px; overflow: hidden; }
.hscroll-head h2 { font-size: clamp(30px, 4vw, 54px); margin-top: 6px; }
.hscroll-view { overflow: hidden; }
.hscroll-track { display: flex; gap: 22px; padding-inline: max(44px, calc((100vw - 1240px) / 2)); width: max-content; will-change: transform; }
.hcard { position: relative; flex: 0 0 clamp(270px, 28vw, 380px); min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; border-radius: 20px; border: 1px solid #ffffff22; color: #f6e7d8; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 5%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), linear-gradient(160deg, #1d0a0d, #0d0405); transition: transform .35s, box-shadow .35s; }
.hcard::before { content: ''; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(180deg, transparent, #000); }
.hcard span { position: relative; font: 600 10px var(--retro-font); letter-spacing: .18em; color: #c9a46a; }
.hcard h3 { position: relative; margin: 12px 0 8px; font-family: var(--retro-display); font-weight: 500; font-size: 28px; line-height: 1.15; }
.hcard p { position: relative; font-size: 13px; color: #f6e7d8b0; }
.hcard i { position: absolute; right: 22px; top: 22px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #ffffff40; border-radius: 50%; font-style: normal; transition: background .25s, color .25s, transform .25s; }
.hcard:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -24px rgba(147,2,40,.6); }
.hcard:hover i { background: #c9a46a; color: #1e1210; transform: rotate(45deg); }
.hscroll-foot { display: grid; gap: 18px; }
.hscroll-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; max-width: 420px; }
.hscroll-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* Stacking principle cards */
.stack { margin-top: 50px; display: grid; gap: 0; }
.scard { position: sticky; top: calc(110px + var(--i) * 26px); display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px 30px; padding: 34px 38px; margin-bottom: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 -12px 40px -24px rgba(60,20,20,.4); transform-origin: top center; transition: transform .25s linear, filter .25s linear; }
.scard:nth-child(even) { background: var(--surface2); }
.scard span { grid-row: span 2; font-family: var(--retro-display); font-size: 54px; color: var(--accent); line-height: 1; }
.scard h3 { font-family: var(--retro-display); font-weight: 500; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.02em; }
.scard p { font-size: 15px; color: var(--muted); }

.pf-mission { margin-top: 20px; }
.magnetic { transition: transform .25s cubic-bezier(.2,.7,.2,1), background .2s; will-change: transform; }

@media (max-width: 960px) {
  .chapters-grid { grid-template-columns: 1fr; gap: 10px; }
  .chapters-sticky { position: sticky; top: 76px; z-index: 3; padding: 14px 0; background: var(--bg); }
  .chapter-num span { font-size: 64px; } .chapters-sticky h2 { font-size: 30px; margin: 0 0 10px; }
  .chapter { min-height: 60vh; }
  .timeline::before, .timeline::after { left: 8px; margin: 0; }
  .timeline li { width: auto; margin-left: 34px; justify-self: stretch !important; }
  .timeline li::before, .timeline li:nth-child(odd)::before, .timeline li:nth-child(even)::before { left: -34px; right: auto; }
  .reveal.from-l, .reveal.from-r { transform: translateY(26px); }
  /* On small screens the showcase scrolls sideways under the finger instead of being pinned. */
  .hscroll { height: auto; padding: 60px 0; }
  .hscroll-pin { position: static; height: auto; min-height: 0; }
  .hscroll-view { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .hscroll-track { transform: none !important; padding-inline: 20px; }
  .hcard { scroll-snap-align: start; }
  .hscroll-bar { display: none; }
  .scard { top: calc(90px + var(--i) * 16px); grid-template-columns: 56px 1fr; padding: 24px; } .scard span { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pf-frame { clip-path: none; animation: none; } .pf-frame img { transform: none; animation: none; }
  .pf-ring, .pf-scroll span { animation: none; }
  .fill-text .w { color: var(--ink); } .chapter { opacity: 1; transform: none; }
  .hscroll { height: auto; padding: 60px 0; } .hscroll-pin { position: static; height: auto; } .hscroll-view { overflow-x: auto; } .hscroll-track { transform: none !important; }
}
body.portfolio { overflow-x: clip; }
.pf-hero, .chapters { overflow-x: clip; }
@media (max-width: 960px) { .chapter { transform: translateY(16px); } .chapter.on { transform: none; } }
.pf-hook em{font-style:italic;color:var(--ink)}
.pf-sub{font:500 13px/1.6 var(--retro-font);letter-spacing:.04em;color:var(--muted);max-width:520px;margin:0 0 16px;padding-left:14px;border-left:2px solid var(--accent)}
.pf-quote{font:italic 500 clamp(19px,2vw,26px)/1.3 var(--retro-display);color:var(--ink);margin:0 0 10px}
.pf-tag{font:600 11px var(--retro-font);letter-spacing:.2em;text-transform:uppercase;color:var(--accent);margin:0 0 16px}
.pf-hook{font-size:clamp(20px,2.1vw,29px);text-wrap:balance}
