/* ── the front page: the short version ─────────────────────────
   shares the tokens, footer and cursor with the lens (styles.css) */

/* the bar: name on the left, the viewfinder and the theme on the right */
.fbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  backdrop-filter: blur(18px) saturate(1.35); -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
.fbar__name { font-size: 14px; letter-spacing: .02em; }
.fbar__right { display: flex; align-items: center; gap: 4px; }
.fbar__look, .fbar__theme {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  color: var(--mute); transition: color .3s, background .3s;
}
.fbar__look:hover, .fbar__theme:hover { color: var(--ink); background: var(--soft); }
.fbar__look svg, .fbar__theme svg {
  grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  transition: opacity .45s var(--ease), transform .6s var(--ease);
}

/* ── who i am ── */
.fhero {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: clamp(24px, 4vw, 72px);
  padding: 96px var(--gutter) clamp(32px, 6vh, 72px);
}
.fhero__name {
  font-weight: 700; font-size: clamp(56px, 10.5vw, 200px); line-height: .86; letter-spacing: -.06em;
  margin: 14px 0 clamp(20px, 3vw, 36px);
  animation: f-rise 1.1s var(--ease) both;
}
.fhero__lead { max-width: 36ch; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.35; animation: f-rise 1.1s var(--ease) .12s both; }
.fhero__meta { margin-top: 22px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; animation: f-rise 1.1s var(--ease) .2s both; }
.fhero__pic { position: relative; animation: f-rise 1.2s var(--ease) .08s both; }
.fhero__pic img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; border-radius: 14px;
  background: var(--soft); filter: grayscale(1) contrast(1.05);
  transition: filter 1.2s var(--ease);
}
.fhero__pic:hover img { filter: none; }
/* never taller than the screen: the picture crops in a little instead */
@media (min-width: 761px) { .fhero__pic img { max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); } }
.fhero__pic figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); }
@keyframes f-rise { from { opacity: 0; transform: translateY(18px); } }

/* ── sections ── */
.fsec { padding: clamp(72px, 12vh, 140px) var(--gutter) 0; }
.fsec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: clamp(22px, 3vw, 40px); }
.fsec__more { font-size: 14px; color: var(--mute); white-space: nowrap; transition: color .3s; }
.fsec__more:hover { color: var(--ink); }
.fsec > * { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fsec.is-in > * { opacity: 1; transform: none; }

/* ── worked with: two rows of names drifting past each other ── */
.fwith { padding-left: 0; padding-right: 0; }
.fwith .fsec__head { padding: 0 var(--gutter); }
.fwith__rows { display: grid; gap: 6px; }
.fwith__row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.fwith__track { display: flex; width: max-content; animation: f-drift 280s linear infinite; }
.fwith__row--back .fwith__track { animation-direction: reverse; animation-duration: 320s; }
.fwith__row:hover .fwith__track { animation-play-state: paused; }
.fwith__track > div { display: flex; align-items: center; flex: none; }
.fwith__track a { font-size: clamp(26px, 3.6vw, 56px); font-weight: 400; letter-spacing: -.03em; white-space: nowrap; padding: 0 .35em; transition: color .3s; }
.fwith__row--back a { color: var(--mute); }
.fwith__track a:hover, .fwith__track a:focus-visible { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.fwith__track i { font-style: normal; font-size: .9em; color: var(--dim); }
@keyframes f-drift { to { transform: translateX(-50%); } }

/* ── path ── */
.fpath__list { list-style: none; border-top: 1px solid var(--line); }
.fpath__list li { border-bottom: 1px solid var(--line); }
.fpath__list summary {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 16px; align-items: baseline;
  padding: 16px 0; cursor: pointer; list-style: none;
}
.fpath__list summary::-webkit-details-marker { display: none; }
.fpath__years { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.fpath__place { font-size: clamp(17px, 1.5vw, 22px); font-weight: 400; }
.fpath__role { color: var(--ink-2); }
.fpath__role em { font-style: normal; font-size: 12px; color: var(--mute); margin-left: 10px; }
.fpath__plus { position: relative; width: 12px; height: 12px; align-self: center; justify-self: end; }
.fpath__plus::before, .fpath__plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 1.5px; background: var(--mute); transition: transform .4s var(--ease); }
.fpath__plus::after { transform: rotate(90deg); }
details[open] .fpath__plus::after { transform: rotate(0); }
.fpath__more { max-width: 62ch; margin: -4px 0 18px 156px; color: var(--ink-2); line-height: 1.5; }

/* ── projects ── */
.fwork__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.fcard { display: grid; gap: 4px; align-content: start; opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--k) % 3 * 80ms); }
.fcard.is-in { opacity: 1; transform: none; }
.fcard__pic { display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 4 / 3; background: var(--soft); margin-bottom: 8px; }
.fcard__pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.fcard:hover .fcard__pic img { transform: scale(1.04); }
.fcard__name { font-size: 17px; font-weight: 400; }
.fcard__what { font-size: 13px; color: var(--mute); }

/* ── the viewfinder ── */
.fview { padding-bottom: 0; }
.viewfinder {
  position: relative; display: grid; place-items: center; min-height: clamp(300px, 52vh, 520px);
  border-radius: 18px; overflow: hidden; background: var(--soft-2);
  --in: 28px; /* how far the corners sit in from the edge */
}
.viewfinder__corner {
  position: absolute; width: 34px; height: 34px; border: 0 solid var(--ink);
  transition: inset .7s var(--ease), width .7s var(--ease), height .7s var(--ease);
}
.viewfinder__corner--tl { top: var(--in); left: var(--in); border-top-width: 1.5px; border-left-width: 1.5px; }
.viewfinder__corner--tr { top: var(--in); right: var(--in); border-top-width: 1.5px; border-right-width: 1.5px; }
.viewfinder__corner--bl { bottom: var(--in); left: var(--in); border-bottom-width: 1.5px; border-left-width: 1.5px; }
.viewfinder__corner--br { bottom: var(--in); right: var(--in); border-bottom-width: 1.5px; border-right-width: 1.5px; }
/* hover: the frame pulls in, like the camera finding focus */
.viewfinder:hover { --in: 56px; }
.viewfinder:hover .viewfinder__corner { width: 22px; height: 22px; }
.viewfinder__rec, .viewfinder__count, .viewfinder__read {
  position: absolute; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.viewfinder__rec { top: calc(var(--in) + 8px); left: calc(var(--in) + 46px); display: flex; align-items: center; gap: 7px; transition: top .7s var(--ease), left .7s var(--ease); }
.viewfinder__rec i { width: 8px; height: 8px; border-radius: 50%; background: #e2193a; animation: f-blink 1.4s steps(2, jump-none) infinite; }
.viewfinder__count { top: calc(var(--in) + 8px); right: calc(var(--in) + 46px); transition: top .7s var(--ease), right .7s var(--ease); }
.viewfinder__read { bottom: calc(var(--in) + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; transition: bottom .7s var(--ease); }
@keyframes f-blink { 50% { opacity: .15; } }
.viewfinder__cross { position: absolute; inset: 0; pointer-events: none; }
.viewfinder__cross::before, .viewfinder__cross::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--ink); opacity: .25; transform: translate(-50%, -50%);
}
.viewfinder__cross::before { width: 1px; height: 64px; }
.viewfinder__cross::after { width: 64px; height: 1px; }
.viewfinder__copy { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 0 24px; }
.viewfinder__big {
  font-weight: 700; font-size: clamp(40px, 7vw, 120px); line-height: .9; letter-spacing: -.05em;
  filter: blur(6px); opacity: .55; transition: filter .9s var(--ease), opacity .9s var(--ease);
}
.viewfinder:hover .viewfinder__big, .viewfinder:focus-visible .viewfinder__big, .fview.is-in .viewfinder__big { filter: none; opacity: 1; transition-delay: .25s; }
.viewfinder__small { font-size: 14px; color: var(--mute); }
.front .kfoot { margin-top: clamp(72px, 12vh, 140px); }

/* ── phone ── */
@media (max-width: 760px) {
  .fhero { grid-template-columns: 1fr; align-items: start; padding-top: 84px; gap: 28px; }
  .fhero__pic { order: -1; }
  .fhero__pic img { aspect-ratio: 4 / 5; }
  .fhero__name { font-size: clamp(52px, 16vw, 96px); }
  .fpath__list summary { grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 12px; }
  .fpath__years, .fpath__role { grid-column: 1; }
  .fpath__plus { grid-column: 2; grid-row: 1 / span 3; }
  .fpath__more { margin-left: 0; }
  .fwork__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fcard__name { font-size: 15px; }
  .viewfinder { --in: 16px; min-height: 380px; }
  .viewfinder:hover { --in: 28px; }
  .viewfinder__read { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fwith__track { animation: none; }
  .fsec > *, .fcard { opacity: 1; transform: none; }
}
