/* brito.ai: /portfolio. Stacked case studies, picture on one side, story on the other.
   Generated pages come from tools/build-portfolio.py; this file uses brito.css tokens. */

.pf-hero { padding: clamp(48px, 9vh, 104px) 0 clamp(8px, 2vh, 20px); }
.pf-intro { max-width: 58ch; line-height: 1.6; }
/* Overview strip: every project as a small picture with its name below. It sits under the
   hero, then sticks under the site header while you scroll, shrinking to a slimmer row and
   marking the project on screen (portfolio.js sets .is-stuck and .is-current). */
.pf-jump {
  --pf-head: 68px;
  position: sticky; top: var(--pf-head); z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease);
}
.pf-jump.is-stuck { border-bottom-color: var(--line); }
.pf-jump-inner { width: min(var(--maxw), 100% - 48px); margin-inline: auto; padding: 12px 0; }
.pf-grid {
  position: relative; display: flex; gap: 18px; padding: 2px 0;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.pf-grid::-webkit-scrollbar { display: none; }
/* two sets, Professional then Personal, split by a thin rule */
.pf-set { min-width: 0; }
.pf-set:first-child { flex: 3 0 auto; }
.pf-set:last-child { flex: 6 0 auto; }
.pf-set + .pf-set { border-left: 1px solid var(--line); padding-left: 18px; }
.pf-set-label {
  display: block; margin-bottom: 7px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint);
}
.pf-set ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.pf-set li { flex: 1 0 92px; min-width: 0; scroll-snap-align: start; }
.pf-tile { display: block; color: var(--fg); text-decoration: none; }
.pf-thumb {
  display: block; height: 70px; border-radius: 8px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.pf-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
/* the strip stays quiet and on-brand: pictures in soft grey under a light veil. Colour
   comes back on hover and on the project you are reading. (The large pictures beside
   each project keep their colour.) */
.pf-thumb { position: relative; }
.pf-thumb img { filter: grayscale(0.55) saturate(0.85) contrast(0.96); transition: filter 0.45s var(--ease); }
.pf-thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: rgba(244, 244, 246, 0.12); transition: opacity 0.45s var(--ease);
}
.pf-tile:hover .pf-thumb img, .pf-tile:focus-visible .pf-thumb img, .pf-tile.is-current .pf-thumb img { filter: none; }
.pf-tile:hover .pf-thumb::after, .pf-tile:focus-visible .pf-thumb::after, .pf-tile.is-current .pf-thumb::after { opacity: 0; }
.pf-thumb-logo { display: flex; align-items: center; justify-content: center; background: #fff; }
.pf-thumb-logo img { width: 80%; height: auto; object-fit: contain; }
.pf-thumb-photo { background: #fff; }
.pf-thumb-photo img { object-fit: contain; object-position: center; mix-blend-mode: multiply; }
.pf-thumb-icon { display: flex; align-items: center; justify-content: center; background: var(--pf-icon-bg); }
.pf-thumb-icon img { width: auto; height: 70%; object-fit: contain; }
.pf-tile-name {
  display: block; margin-top: 6px; font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  line-height: 1.25; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--dur) var(--ease);
}
.pf-tile-year { display: block; margin-top: 1px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-faint); }
.pf-tile:hover .pf-thumb { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.pf-tile:focus-visible { outline: none; }
.pf-tile:focus-visible .pf-thumb { outline: 2px solid var(--fg); outline-offset: 2px; }

.pf-jump.is-stuck .pf-jump-inner { padding: 8px 0; }
.pf-jump.is-stuck .pf-thumb { height: 36px; }
.pf-jump.is-stuck .pf-tile-year { display: none; }
.pf-jump.is-stuck .pf-set-label { margin-bottom: 4px; font-size: 9px; }
.pf-jump.is-stuck .pf-tile-name { margin-top: 4px; font-size: 11px; color: var(--fg-muted); }
.pf-jump.is-stuck .pf-tile:hover .pf-tile-name,
.pf-tile.is-current .pf-tile-name { color: var(--fg); }
.pf-tile.is-current .pf-thumb { border-color: var(--fg); }

@media (max-width: 560px) {
  .pf-jump { --pf-head: 60px; }
  .pf-jump-inner { width: 100%; }
  .pf-grid { padding-inline: 16px; scroll-padding-inline: 16px; gap: 14px; }
  .pf-set:first-child, .pf-set:last-child { flex: 0 0 auto; }
  .pf-set + .pf-set { padding-left: 14px; }
  .pf-set li { flex: 0 0 96px; }
}
@media (prefers-reduced-motion: reduce) { .pf-thumb { transition: none; } }

/* each group (clients, myself) folds open and closed */
.pf-fold-head {
  list-style: none; display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 6px 0; user-select: none;
}
.pf-fold-head::-webkit-details-marker { display: none; }
.pf-fold-head .eyebrow { margin: 0; }
.pf-fold-count { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); }
.pf-fold-icon {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong);
  position: relative; flex: none; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pf-fold-icon::before {
  content: ""; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px;
  border-right: 1.6px solid var(--fg); border-bottom: 1.6px solid var(--fg);
  transform: translate(-50%, -50%) rotate(45deg);
}
.pf-fold[open] .pf-fold-icon { transform: rotate(180deg); }
.pf-fold-head:hover .pf-fold-icon { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.pf-fold-head:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 6px; }
.pf-fold .pf-group-sub { margin-top: 8px; }

.pf-group { padding-top: clamp(40px, 7vh, 72px); }
.pf-group-sub {
  font-family: var(--font-sans); font-size: 15px; line-height: 1.6; color: var(--fg-muted);
  max-width: 60ch; margin: -4px 0 8px;
}

.pf-case {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 64px); align-items: center;
  padding: clamp(32px, 6vh, 56px) 0; border-top: 1px solid var(--line);
  scroll-margin-top: 170px;
}
.pf-group .pf-case:first-of-type { border-top: 0; }
.pf-case.pf-flip .pf-art { order: 2; }

.pf-art {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  overflow: hidden; background: var(--card-bg); border: 1px solid var(--line);
}
.pf-art-line, .pf-art-ai { background: #fff; }
.pf-art-gradient { background: #fbfafc; }
.pf-svg { display: block; width: 100%; height: 100%; }
.pf-art img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.pf-art-ai img { object-fit: contain; }
.pf-art-shot img { object-position: top left; }
.pf-blur-note {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--fg); background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 10px;
}

.pf-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg-faint);
}
.pf-status {
  color: var(--fg); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 3px 9px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px;
}
.pf-title {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.08; letter-spacing: -0.01em; margin: 0; color: var(--fg);
}
.pf-kicker {
  font-family: var(--font-serif); font-style: italic; font-size: clamp(18px, 2vw, 21px);
  color: var(--fg-muted); margin: 6px 0 20px;
}
.pf-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-faint); margin: 18px 0 6px;
}
.pf-text { font-family: var(--font-sans); font-size: 15.5px; line-height: 1.65; color: var(--fg); margin: 0; max-width: 62ch; }
.pf-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0 0; }
.pf-tags li {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted);
  background: color-mix(in srgb, var(--fg) 5%, transparent); border-radius: 6px; padding: 4px 8px;
}
.pf-link { margin-top: 20px; }

.pf-cta { padding-bottom: clamp(56px, 10vh, 112px); border-top: 1px solid var(--line); margin-top: 8px; padding-top: clamp(40px, 7vh, 72px); }

/* option pages only (never on the live page) */
.pf-option-bar {
  font-family: var(--font-mono); font-size: 12px; padding: 9px 16px; background: #111317; color: #fff;
  display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center;
}
.pf-option-bar a { color: rgba(255, 255, 255, 0.7); text-decoration: underline; text-underline-offset: 3px; }
.pf-option-bar a[aria-current] { color: #fff; font-weight: 500; text-decoration: none; }

@media (max-width: 820px) {
  .pf-case { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .pf-case.pf-flip .pf-art { order: 0; }
}

.pf-logo { display: block; height: 26px; width: auto; margin: 6px 0 4px; }

/* quotes between projects: one argument, read in order */
.pf-quote {
  margin: 0; padding: clamp(36px, 7vh, 64px) 0; border-top: 1px solid var(--line);
  display: flex; justify-content: center;
}
.pf-quote p {
  position: relative; max-width: 34ch; margin: 0; padding-left: 22px; text-align: left;
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(22px, 2.8vw, 30px); line-height: 1.3; color: var(--fg);
}
.pf-quote p::before {
  content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, #8893a6, #4a5365 35%, #6b5a9c 70%, #c07ab0);
}

/* the smart home dashboard has its tab bar at the bottom centre: keep the note in the empty top band */
#home-assistant .pf-blur-note { top: 10px; bottom: auto; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* screenshots open large on click */
button.pf-art-shot {
  display: block; width: 100%; padding: 0; font: inherit; color: inherit; text-align: left;
  cursor: zoom-in; transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
button.pf-art-shot:hover { border-color: var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
button.pf-art-shot:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.pf-lightbox {
  border: 0; padding: 0; margin: auto; background: transparent; max-width: 96vw; max-height: 94vh;
  overflow: visible;
}
.pf-lightbox::backdrop { background: rgba(10, 11, 14, 0.82); backdrop-filter: blur(4px); }
.pf-lightbox img {
  display: block; max-width: 96vw; max-height: 90vh; width: auto; height: auto;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); cursor: zoom-out;
}
.pf-lightbox-close {
  position: fixed; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.35); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.pf-lightbox-close:hover { background: rgba(0, 0, 0, 0.6); }
.pf-noscroll { overflow: hidden; }

/* Projects plus a sticky quote column on wide screens. The layout keeps the header's left
   edge and grows to the right, so the projects lose little width to the quotes. */
.pf-layout { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
.pf-aside { display: none; }

@media (min-width: 1180px) {
  .pf-layout {
    --side: 300px; --gap: 56px;
    margin-left: max(24px, (100% - var(--maxw)) / 2); margin-right: 24px;
    width: auto; max-width: calc(var(--maxw) + var(--side) + var(--gap));
    display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--gap);
  }
  .pf-main .pf-quote { display: none; }
  .pf-aside { display: block; border-left: 1px solid var(--line); padding-left: 28px; }
  .pf-aside-inner {
    position: sticky; top: 168px; display: flex; flex-direction: column; gap: 1.4vh;
    margin-top: clamp(28px, 5vh, 56px);
  }
  /* waiting: on screen from the start, but faint and soft, so you can tell there is a
     whole text here without reading it yet. current: dark. earlier: eased to grey. */
  .pf-side-quote {
    margin: 0; opacity: 0.16; filter: blur(1.6px); color: var(--fg);
    transition: opacity 0.9s var(--ease), filter 0.9s var(--ease), color 1.4s var(--ease);
  }
  .pf-side-quote.is-on, .pf-side-quote.is-past { opacity: 1; filter: none; }
  .pf-side-quote.is-past { color: var(--fg-faint); }
  .pf-side-quote p {
    position: relative; margin: 0; padding-left: 16px; color: inherit;
    font-family: var(--font-serif); font-style: italic; font-size: clamp(13px, 1.8vh, 18px); line-height: 1.3;
  }
  .pf-side-quote p::before {
    content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 3px; border-radius: 2px;
    background: linear-gradient(180deg, #8893a6, #4a5365 35%, #6b5a9c 70%, #c07ab0);
    transition: opacity 1.4s var(--ease);
  }
  .pf-side-quote.is-past p::before { opacity: 0.25; }
  .pf-side-quote:last-child p { font-size: clamp(15px, 2.2vh, 21px); font-weight: 500; }
}
@media (min-width: 1180px) and (prefers-reduced-motion: reduce) {
  .pf-side-quote { transition: none; }
}

/* screen recordings sit in the frame like the stills */
.pf-art video { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.pf-lightbox video {
  display: block; max-width: 96vw; max-height: 90vh; width: auto; height: auto;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); cursor: zoom-out;
}

/* a client logo in place of a screenshot: always on white so the black logo reads in dark mode */
.pf-art-logo { display: flex; align-items: center; justify-content: center; background: #fff; }
.pf-art-logo img { width: 62%; height: auto; object-fit: contain; }

/* an app icon in place of a screenshot, on a soft brand wash */
:root { --pf-icon-bg: radial-gradient(circle at 50% 45%, #f3f1f8 0%, #e9ebf0 60%, #e2e4ea 100%); }
.pf-art-icon { display: flex; align-items: center; justify-content: center; background: var(--pf-icon-bg); }
.pf-art-icon img { width: auto; height: 46%; object-fit: contain; filter: drop-shadow(0 14px 28px rgba(20, 24, 40, 0.18)); }
.pf-year { color: var(--fg-muted); }

/* a product photo on white */
.pf-art-photo { background: #fff; }
.pf-art-photo img { object-fit: contain; object-position: center; padding: 6%; box-sizing: border-box; mix-blend-mode: multiply; }


/* ---------- Projects / Apps tabs: the two panes sit side by side and slide ---------- */
.pf-hero { padding-bottom: 0; }
.pf-tabs { display: flex; gap: 28px; margin-top: clamp(22px, 4vh, 36px); border-bottom: 1px solid var(--line); }
.pf-tabs button {
  position: relative; background: none; border: 0; padding: 10px 0 12px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-faint); transition: color var(--dur) var(--ease);
}
.pf-tabs button:hover { color: var(--fg-muted); }
.pf-tabs button[aria-selected="true"] { color: var(--fg); }
.pf-tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #8893a6, #4a5365 35%, #6b5a9c 70%, #c07ab0);
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease);
}
.pf-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.pf-tabs button:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 4px; }

/* clip, not hidden: hidden would turn this into a scroller and break the sticky strip */
.pf-panes { overflow-x: clip; }
.pf-track { display: flex; align-items: flex-start; transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1); }
.pf-pane { flex: 0 0 100%; min-width: 0; }
.pf-panes[data-active="apps"] .pf-track { transform: translateX(-100%); }
/* the pane slid out of view folds away once the slide ends, so the page height follows the open tab */
.pf-pane.is-away { height: 0; overflow: hidden; visibility: hidden; }
.pf-pane > .wrap > .pf-intro { margin-top: clamp(20px, 3.5vh, 30px); }
@media (prefers-reduced-motion: reduce) { .pf-track { transition: none; } }

/* end of the projects: the way on to the apps */
.pf-next { padding: clamp(36px, 7vh, 64px) 0 clamp(48px, 9vh, 96px); }
.pf-next-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: none; border: 0; border-top: 1px solid var(--line); padding: clamp(24px, 4vh, 36px) 0 0;
  cursor: pointer; text-align: left; color: var(--fg); font: inherit;
}
.pf-next-text { display: flex; flex-direction: column; }
.pf-next-btn .pf-label { margin: 0 0 6px; }
.pf-next-title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; }
.pf-next-sub { font-family: var(--font-sans); font-size: 15px; color: var(--fg-muted); margin-top: 6px; }
.pf-next-arrow {
  flex: none; width: clamp(52px, 6vw, 68px); height: clamp(52px, 6vw, 68px); border-radius: 50%;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pf-next-arrow svg { width: 44%; height: 44%; }
.pf-next-btn:hover .pf-next-arrow { transform: translateX(6px); background: var(--fg); color: var(--bg, #fff); }
.pf-next-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 6px; border-radius: 6px; }

/* the apps pane */
.pf-apps-pane { padding-bottom: clamp(48px, 9vh, 96px); }
.pf-app-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px);
  margin-top: clamp(26px, 4.5vh, 40px);
}
.pf-app {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card-bg); padding: clamp(20px, 2.4vw, 28px);
}
.pf-app-icon-link { align-self: flex-start; border-radius: 18px; }
.pf-app-icon-link:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.pf-app-icon { transition: transform var(--dur) var(--ease); }
.pf-app-icon-link:hover .pf-app-icon { transform: translateY(-2px) scale(1.04); }
.pf-app-icon { width: 76px; height: 76px; margin: -6px 0 14px -6px; filter: drop-shadow(0 8px 16px rgba(20, 24, 40, 0.16)); }
.pf-app-name { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1.1; margin: 0; color: var(--fg); }
.pf-app-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg-faint); margin: 6px 0 14px; }
.pf-app .pf-text { font-size: 15px; flex: 1; }
.pf-app-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pf-back {
  display: inline-flex; align-items: center; gap: 10px; margin-top: clamp(32px, 6vh, 52px);
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg-muted);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
}
.pf-back svg { width: 18px; height: 18px; }
.pf-back:hover { color: var(--fg); }
@media (max-width: 900px) { .pf-app-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
