/* MyStudioLedger portfolio — the shared client page and its in-app preview. Everything is scoped
   under .pf so the preview can sit inside the studio app without touching its styles. */
.pf {
  --pf-paper: #f4f1ea; --pf-sheet: #fbf9f4; --pf-ink: #1a1a1a; --pf-ink-2: #4a463f; --pf-ink-3: #857f74; --pf-rule: #dcd5c7;
  --pf-red: #c8372d; --pf-ochre: #e3a91b; --pf-blue: #1f4e9e; --pf-accent: #c8372d; --pf-r: 22px; --pf-auto: 6000ms;
  --pf-gut: clamp(12px, 2.4vw, 28px);
  background: var(--pf-paper); color: var(--pf-ink); font-family: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', Arial, sans-serif;
  -webkit-font-smoothing: antialiased; position: relative;
}
.pf *, .pf *::before, .pf *::after { box-sizing: border-box; }
.pf button { font: inherit; color: inherit; cursor: pointer; }
.pf img { display: block; }

/* bar */
.pf-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px calc(var(--pf-gut) + 8px); }
.pf-name { font-weight: 600; font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.1; letter-spacing: -.02em; }
.pf-logo { max-height: 40px; max-width: 200px; width: auto; object-fit: contain; }
.pf-bar-meta { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-ink-3); text-align: right; }

/* hero carousel */
.pf-hero { position: relative; margin: 0 var(--pf-gut); height: min(calc(100svh - 96px), 880px); min-height: 440px; border-radius: var(--pf-r); overflow: hidden; background: #111; outline: none; isolation: isolate; }
.pf-hero:focus-visible { box-shadow: 0 0 0 3px var(--pf-accent); }
.pf-embedded .pf-hero { height: 520px; min-height: 0; }
.pf-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.2, .7, .2, 1); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.pf-slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; overflow: hidden; }
.pf-slide > img, .pf-slide > .pf-ph { width: 100%; height: 100%; object-fit: cover; }
.pf-hero .pf-slide > img { transform: scale(1.04); transition: transform 7s linear; }
.pf-hero .pf-slide[aria-hidden="false"] > img { transform: scale(1); }
.pf-slide-text {
  position: absolute; inset: auto 0 0 0; padding: clamp(24px, 5vw, 64px) clamp(22px, 4vw, 56px) clamp(64px, 7vw, 84px);
  color: #fff; background: linear-gradient(to top, rgba(10, 10, 9, .78), rgba(10, 10, 9, .35) 55%, transparent);
  display: grid; gap: 10px; justify-items: start;
}
.pf-slide-text h2 { margin: 0; font-size: clamp(2.2rem, 6vw, 5.2rem); line-height: .95; font-weight: 600; letter-spacing: -.035em; max-width: 16ch; text-wrap: balance; }
.pf-slide-text p { margin: 0; font-size: clamp(1rem, 1.4vw, 1.2rem); opacity: .9; }
.pf-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pf-open { margin-top: 8px; border: 0; border-radius: 999px; padding: 12px 20px; background: #fff; color: var(--pf-ink) !important; font-weight: 600; font-size: 15px; transition: background .2s, color .2s; }
.pf-open:hover, .pf-open:focus-visible { background: var(--pf-accent); color: #fff !important; }
.pf-arrow { position: absolute; bottom: clamp(18px, 3vw, 30px); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--pf-ink); display: grid; place-items: center; font-size: 18px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); transition: transform .2s, background .2s; z-index: 2; }
.pf-arrow:hover { transform: translateY(-2px); background: #fff; }
.pf-arrow:focus-visible { outline: 3px solid var(--pf-accent); outline-offset: 2px; }
.pf-hero .pf-prev { right: calc(clamp(18px, 3vw, 30px) + 58px); }
.pf-hero .pf-next { right: clamp(18px, 3vw, 30px); }
.pf-dots { position: absolute; left: 50%; bottom: clamp(24px, 3.4vw, 36px); transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.pf-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: width .3s, background .3s; }
.pf-dots button[aria-current="true"] { width: 28px; background: #fff; }
.pf-count { position: absolute; top: clamp(16px, 2.4vw, 24px); right: clamp(16px, 2.4vw, 24px); z-index: 2; font-size: 13px; font-weight: 600; letter-spacing: .1em; color: #fff; background: rgba(0, 0, 0, .35); padding: 6px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.pf-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .18); z-index: 2; }
.pf-progress i { display: block; height: 100%; width: 0; background: var(--pf-accent); }
.pf-run .pf-progress i { animation: pf-fill var(--pf-auto) linear infinite; }
.pf-paused .pf-progress i { animation-play-state: paused; }
@keyframes pf-fill { from { width: 0; } to { width: 100%; } }

/* placeholder when a project has no photo */
.pf-ph { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; justify-items: center; gap: 8%; padding: 18%; background: #efe9dd; width: 100%; height: 100%; aspect-ratio: 4 / 3; }
.pf-ph i { width: 70%; aspect-ratio: 1; background: var(--pf-red); border-radius: 18%; }
.pf-ph i:nth-child(2) { background: var(--pf-ochre); border-radius: 50%; }
.pf-ph i:nth-child(3) { background: var(--pf-blue); clip-path: polygon(50% 4%, 100% 96%, 0 96%); border-radius: 0; }

/* intro */
.pf-intro { padding: clamp(48px, 8vw, 110px) calc(var(--pf-gut) + 8px) clamp(28px, 4vw, 48px); max-width: 1100px; }
.pf-intro h1 { margin: 18px 0 16px; font-size: clamp(2.4rem, 6vw, 5rem); line-height: .95; font-weight: 600; letter-spacing: -.04em; }
.pf-intro p { margin: 0 0 12px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--pf-ink-2); max-width: 62ch; }
.pf-marks { display: inline-flex; gap: 8px; align-items: center; }
.pf-marks i { width: 16px; height: 16px; background: var(--pf-red); border-radius: 4px; }
.pf-marks i:nth-child(2) { background: var(--pf-ochre); border-radius: 50%; }
.pf-marks i:nth-child(3) { background: var(--pf-blue); clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.pf-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--pf-red); flex: none; }
.pf-dot.d-interiors { background: var(--pf-ochre); border-radius: 50%; }
.pf-dot.d-execution { background: var(--pf-blue); clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }

/* grid */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 2vw, 24px); padding: 0 calc(var(--pf-gut) + 8px) clamp(48px, 7vw, 96px); }
.pf-card { display: grid; text-align: left; padding: 0; border: 0; background: var(--pf-sheet); border-radius: var(--pf-r); overflow: hidden; box-shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 18px 36px -24px rgba(26, 26, 26, .45); transition: transform .25s, box-shadow .25s; }
.pf-card:hover, .pf-card:focus-visible { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 28px 44px -24px rgba(26, 26, 26, .55); }
.pf-card:focus-visible { outline: 3px solid var(--pf-accent); outline-offset: 3px; }
.pf-card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7e0d2; }
.pf-card-img img, .pf-card-img .pf-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.pf-card:hover .pf-card-img img { transform: scale(1.04); }
.pf-card-text { display: grid; gap: 6px; padding: 16px 18px 20px; }
.pf-card-text strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.pf-card-text span { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pf-ink-3); }
.pf-card-text em { font-style: normal; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-accent); }

.pf-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px calc(var(--pf-gut) + 8px) 34px; border-top: 1px solid var(--pf-rule); font-size: 14px; color: var(--pf-ink-3); }
.pf-foot a { color: inherit; text-underline-offset: 4px; }

/* empty */
.pf-empty { margin: 0 var(--pf-gut) var(--pf-gut); padding: clamp(40px, 8vw, 100px) clamp(24px, 5vw, 64px); border-radius: var(--pf-r); background: var(--pf-sheet); border: 2px dashed var(--pf-rule); }
.pf-empty h1 { margin: 16px 0 10px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.03em; }
.pf-empty p { margin: 0; color: var(--pf-ink-2); max-width: 56ch; }

/* project viewer */
.pf-viewer { position: fixed; inset: 0; z-index: 2000; background: rgba(12, 12, 11, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: clamp(0px, 2vw, 28px); }
.pf-viewer[hidden] { display: none; }
.pf-viewer-inner { position: relative; width: min(1320px, 100%); max-height: 100%; height: min(860px, 100%); background: var(--pf-sheet); border-radius: var(--pf-r); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.pf-gallery { position: relative; background: #111; overflow: hidden; outline: none; min-height: 0; }
.pf-gallery .pf-slide { display: grid; place-items: center; }
.pf-gallery .pf-slide img { width: 100%; height: 100%; object-fit: contain; }
.pf-gallery .pf-prev { left: 18px; bottom: 50%; transform: translateY(50%); }
.pf-gallery .pf-next { right: 18px; bottom: 50%; transform: translateY(50%); }
.pf-gallery .pf-arrow:hover { transform: translateY(50%) scale(1.05); }
.pf-about { padding: clamp(24px, 3vw, 40px); overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.pf-about .pf-chip { background: #efe9dd; color: var(--pf-ink-2); backdrop-filter: none; align-self: flex-start; }
.pf-about h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.03em; }
.pf-about dl { margin: 0; display: grid; gap: 0; }
.pf-about dl div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pf-rule); }
.pf-about dl div:last-child { border-bottom: 1px solid var(--pf-rule); }
.pf-about dt { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-ink-3); padding-top: 3px; }
.pf-about dd { margin: 0; font-size: 15.5px; }
.pf-about p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--pf-ink-2); }
.pf-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 4px; }
.pf-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #e7e0d2; }
.pf-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.pf-thumbs button[aria-current="true"] { border-color: var(--pf-accent); }
.pf-about-nav { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--pf-rule); }
.pf-about-nav button { border: 0; background: none; padding: 6px 0; font-size: 14px; font-weight: 500; color: var(--pf-ink-2); text-align: left; max-width: 48%; }
.pf-about-nav button:last-child { text-align: right; }
.pf-about-nav button:hover { color: var(--pf-accent); }
.pf-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); font-size: 26px; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
.pf-close:focus-visible { outline: 3px solid var(--pf-accent); outline-offset: 2px; }
html.pf-lock, html.pf-lock body { overflow: hidden; }

@media (max-width: 820px) {
  .pf-viewer { padding: 0; }
  .pf-viewer-inner { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 48vh) 1fr; height: 100%; border-radius: 0; }
  .pf-bar-meta { display: none; }
  .pf-hero .pf-prev, .pf-hero .pf-next { display: none; }
  .pf-dots { left: auto; right: 22px; transform: none; }
  .pf-embedded .pf-hero { height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-track, .pf-hero .pf-slide > img, .pf-card, .pf-card-img img { transition: none !important; }
}
