/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #d9d9d6;
  --card: #ffffff;
  --sub: #f2f2f0;
  --sub-hover: #ebebe8;
  --ink: #0d0d0d;
  --muted: #6e6e6a;
  --line: rgba(13, 13, 13, 0.1);
  --accent: #ff5b37;           /* darkroom safelight — swap here to retheme */
  --accent-ink: #0d0d0d;

  --r-card: 20px;
  --r-inner: 14px;
  --gap: 8px;
  --pad: 16px;

  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --serif: "Instrument Serif", "Times New Roman", serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h2, h3, p, figure { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* =========================================================
   Shell — fixed app frame, each column scrolls on its own
   ========================================================= */
.shell {
  display: grid;
  grid-template-columns: minmax(380px, 34%) 1fr;
  gap: var(--gap);
  height: 100dvh;
  padding: var(--gap);
}

.card {
  background: var(--card);
  border-radius: var(--r-card);
}

.left {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}

.right {
  background: #ededea;
  min-height: 0;
}

/* =========================================================
   Nav
   ========================================================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 14px;
  flex: none;
}

.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}
.mark__m {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  transform: translate(-1px, 2px);
}
.mark__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  transition: transform 0.45s var(--ease), stroke 0.3s;
}
.mark:hover .mark__frame,
.mark:focus-visible .mark__frame {
  transform: scale(0.82);
  stroke: var(--accent);
}

.toggles { display: flex; gap: 6px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 16px;
  border-radius: 999px;
  background: var(--sub);
  font-size: 18px;
  transition: background 0.3s var(--ease);
}
.pill:hover { background: var(--sub-hover); }
.pill.is-active { background: var(--accent); color: var(--accent-ink); }

.pill__label {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.pill__icon {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.pill__icon::before,
.pill__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.35s var(--ease);
}
.pill__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.pill.is-active .pill__icon::after { transform: translate(-50%, -50%) rotate(0deg); }

/* =========================================================
   Views (Info / Contact)
   ========================================================= */
.views {
  position: relative;
  flex: 1;
  min-height: 0;
}

.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* header, bio and logos stay put — only the experience list scrolls */
.view--info { overflow: hidden; }

/* each info card slides out to the left in sequence */
.view--info > * {
  transition: transform 0.7s var(--ease), opacity 0.5s var(--ease);
}
.view--info > :nth-child(2) { transition-delay: 0.05s; }
.view--info > :nth-child(3) { transition-delay: 0.1s; }
.view--info:not(.is-active) { pointer-events: none; }
.view--info:not(.is-active) > * {
  transform: translateX(calc(-100% - 40px));
  opacity: 0;
}

.view--contact {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.view--contact.is-active { opacity: 1; pointer-events: auto; transition-delay: 0.15s; }

/* =========================================================
   Bio card
   ========================================================= */
.bio {
  padding: var(--pad);
  flex: none;
}

.photo {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-inner);
  overflow: hidden;
  background: #cfcfcc;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.photo:hover img { transform: scale(1.03); }

/* viewfinder corners on hover */
.photo::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  --c: rgba(255, 255, 255, 0.9);
  --l: 18px;
  --t: 1.5px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}
.photo:hover::after { opacity: 1; transform: scale(1); }

.exif {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  width: max-content;
  margin-inline: auto;
  display: flex;
  gap: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.photo:hover .exif { opacity: 1; transform: none; }

.bio__text {
  margin-top: 18px;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.28;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* =========================================================
   Logo marquee
   ========================================================= */
.logos {
  flex: none;
  height: 64px;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.logos__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.logos:hover .logos__track { animation-play-state: paused; }

.logos__set {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-right: 44px;
}
.logos__set a {
  display: flex;
  align-items: center;
  height: 64px;
  opacity: 0.82;
  transition: opacity 0.25s;
}
.logos__set a:hover { opacity: 1; }

.lg {
  width: auto;
  max-width: none;
  flex: none;
  filter: brightness(0);   /* every brand rendered in one ink colour */
}
/* optical sizing — each mark tuned so they read as one weight */
.lg--jumper        { height: 20px; }
.lg--ledger        { height: 24px; }
.lg--thirdweb      { height: 18px; }
.lg--cointelegraph { height: 30px; }
.lg--synfutures    { height: 20px; }
.lg--aleo          { height: 20px; }
.lg--energent      { height: 28px; }
.lg--marketacross  { height: 36px; }

.lg-text {
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* =========================================================
   Latest experience
   ========================================================= */
.work {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px;
  overflow: hidden;
}

/* fade lengths animate via registered custom properties */
@property --fade-top { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-bottom { syntax: "<length>"; inherits: false; initial-value: 0px; }

.work__list {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border-radius: var(--r-inner);
  --fade-top: 0px;
  --fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  transition: --fade-top 0.35s var(--ease), --fade-bottom 0.35s var(--ease);
}
.work__list::-webkit-scrollbar { display: none; }
/* main.js toggles these: more below / scrolled past the top */
.work__list.has-more-below { --fade-bottom: var(--fade-size, 44px); }
.work__list.has-more-above { --fade-top: 20px; }

/* main.js sets --job-h so the next card always peeks into view */
.work__list.is-fitted .job { height: var(--job-h); }
.work__list.is-fitted .job__thumb { aspect-ratio: auto; height: 100%; }

.job {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: var(--r-inner);
  background: var(--sub);
  transition: background 0.3s var(--ease);
}
.job:hover { background: var(--sub-hover); }

.job__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.job__thumb > * { transition: transform 0.6s var(--ease); }
.job:hover .job__thumb > img { transform: scale(1.06); }

.job__thumb--jumper {
  background:
    radial-gradient(120% 90% at 20% 0%, #9a2fe0 0%, transparent 60%),
    #3d0a7a;
}
.job__thumb--jumper img {
  width: 68%;
  max-width: 220px;
  height: auto;
  filter: brightness(0) invert(1);
}

.job__thumb--synfutures {
  background:
    radial-gradient(100% 80% at 80% 100%, rgba(83, 230, 212, 0.22) 0%, transparent 60%),
    #0b0f12;
}
.job__thumb--synfutures img { width: 74%; height: auto; }

.job__thumb--unhashed {
  background:
    radial-gradient(100% 80% at 15% 100%, rgba(234, 186, 98, 0.16) 0%, transparent 60%),
    #202020;
}
.job__thumb--unhashed img {
  width: 76%;
  max-width: 260px;
  height: auto;
}

.job__body { padding-top: 2px; min-width: 0; }
.job__name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.job__desc {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.38;
  color: var(--muted);
  text-wrap: pretty;
}

/* =========================================================
   Contact view
   ========================================================= */
.contact-photo {
  position: absolute;
  inset: 0;
  border-radius: var(--r-card);
  overflow: hidden;
}
.contact-photo picture { display: block; height: 100%; }
.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease);
}
.view--contact.is-active .contact-photo img { transform: scale(1); }

/* headline sits in the open sky, top-left, clear of the figure */
.contact-headline {
  position: absolute;
  top: 26px;
  left: 26px;
  right: 26px;
  max-width: 12ch;
  font-size: clamp(30px, 2.9vw, 42px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.8s var(--ease) 0.3s, opacity 0.6s var(--ease) 0.3s;
}
.contact-headline span { display: block; color: var(--accent); }
.view--contact.is-active .contact-headline { transform: none; opacity: 1; }

/* =========================================================
   Footer
   ========================================================= */
.foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 12px 14px;
}

.email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 14px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.25s var(--ease);
}
.email:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.email__icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.2; }

.socials { display: flex; gap: 6px; }
.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.25s, background 0.25s;
}
.socials a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* =========================================================
   Load-in reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateX(-24px);
}
.is-loaded .reveal {
  opacity: 1;
  transform: none;
  transition: transform 0.9s var(--ease), opacity 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
/* main.js removes .reveal once the intro finishes, handing transforms back to the view transitions */

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .shell {
    display: block;
    height: auto;
    min-height: 100dvh;
  }
  .right { display: none; }

  .nav { position: sticky; top: var(--gap); z-index: 5; }

  .views { position: static; margin: var(--gap) 0; }
  .view { position: static; }
  .view--info,
  .work,
  .work__list { overflow: visible; }
  .work__list { -webkit-mask-image: none; mask-image: none; }
  .view:not(.is-active) { display: none; }

  .view--contact { min-height: 78dvh; position: relative; }

  .left > .foot { margin-top: 0; }

  .exif { opacity: 1; transform: none; }
  .bio__text { font-size: 19px; }
}

@media (max-width: 420px) {
  .job { grid-template-columns: 1fr; }
  .job__thumb { aspect-ratio: 16 / 7; }
  .email__text { font-size: 14px; }
  .socials a { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .logos__track { animation: none; }
}

/* =========================================================
   DARKROOM — exploration layer (redesign copy only)
   Same skeleton and fonts as the original; new material:
   a dark room, matte prints with paper borders, one safelight.
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --card: rgba(236, 235, 230, 0.015);
  --sub: rgba(236, 235, 230, 0.035);
  --sub-hover: rgba(255, 91, 55, 0.09);
  --ink: #ecebe6;              /* text = paper white */
  --muted: #8b8a85;
  --line: rgba(236, 235, 230, 0.13);
  --accent-ink: #0b0b0a;
  --paper: #efede7;            /* print paper */
  --paper-ink: #1a1a18;
  --r-card: 3px;
  --r-inner: 2px;
  --gap: 10px;

  --raw: brightness(1.9) contrast(0.18);   /* an undeveloped print */
  --develop: 2.2s;
}

body {
  background:
    radial-gradient(60% 50% at 12% -8%, rgba(255, 91, 55, 0.11), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

.card { border: 1px solid var(--line); }
.right { background: var(--card); }

/* ---- nav: equipment labels ---- */
.pill {
  height: 36px;
  padding: 0 7px 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pill:hover { background: var(--sub-hover); border-color: rgba(255, 91, 55, 0.4); }
.pill.is-active { border-color: var(--accent); }
.pill__icon { width: 18px; height: 18px; border-width: 1px; }
.pill__icon::before, .pill__icon::after { width: 8px; height: 1px; }

/* ---- the photo is a print: paper border, edge printing ---- */
.photo {
  aspect-ratio: auto;
  padding: 10px 10px 0;
  background: var(--paper);
  border-radius: 2px;
  overflow: hidden;
}
.photo picture {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper);
}
.photo img { filter: var(--raw); }
.photo.is-dev img { animation: develop var(--develop) var(--ease) both; }
.photo::after { inset: 22px 22px 46px; }

.exif {
  position: static;
  width: auto;
  margin: 0;
  justify-content: space-between;
  padding: 9px 2px 10px;
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  color: var(--paper-ink);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  transform: none;
}
.photo:hover .exif { opacity: 1; }

/* safelight wash while a print develops */
.photo::before,
.contact-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--accent);
  mix-blend-mode: multiply;
  opacity: 0;
  pointer-events: none;
}
.photo.is-dev::before { animation: safelight var(--develop) ease-out both; }

@keyframes develop {
  0%   { filter: var(--raw); }
  35%  { filter: brightness(1.45) contrast(0.55); }
  100% { filter: none; }
}
@keyframes safelight {
  0%   { opacity: 0; }
  25%  { opacity: 0.34; }
  100% { opacity: 0; }
}

.bio__text { color: var(--ink); }

/* ---- logos printed in paper white ---- */
.lg { filter: brightness(0) invert(1); }
.logos__set a { opacity: 0.55; }
/* fade the marquee edges with an overlay so the card's border stays intact */
.logos { position: relative; -webkit-mask-image: none; mask-image: none; }
.logos::before,
.logos::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 44px;
  pointer-events: none;
}
.logos::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.logos::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.logos__set a:hover { opacity: 1; }

/* ---- experience: numbered frames, B&W until you look closer ---- */
.work { padding: 0; }
.work__list { gap: 0; border-radius: 0; }
.job {
  padding: 12px;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.job:hover { background: var(--sub-hover); }
.job__thumb { border-radius: 2px; filter: grayscale(1) contrast(1.05); transition: filter 0.5s var(--ease); }
.job:hover .job__thumb { filter: none; }

/* scrolling the experience list folds the logo strip away to give the jobs
   more room; the photo + bio card never moves */
.logos {
  transition:
    height 0.5s var(--ease),
    margin 0.5s var(--ease),
    opacity 0.3s var(--ease),
    border-color 0.5s var(--ease);
}
.view--info.is-compact .logos {
  height: 0;
  margin-top: calc(-1 * var(--gap) - 2px);   /* swallow its gap and border too */
  opacity: 0;
  border-color: transparent;
}

/* ---- contact: a tall print that develops each time you open it ---- */
.contact-photo {
  border: 10px solid var(--paper);
  border-bottom-width: 34px;
  border-radius: 2px;
  background: var(--paper);
}
.contact-photo img { filter: var(--raw); }
.view--contact.is-active .contact-photo img { animation: develop var(--develop) var(--ease) 0.1s both; }
.view--contact.is-active .contact-photo::after { animation: safelight var(--develop) ease-out 0.1s both; }
.contact-headline { z-index: 2; top: 30px; left: 32px; color: var(--paper-ink); transition-delay: 0.9s; }

/* ---- views fade rather than slide ---- */
.view--info:not(.is-active) > * { transform: translateY(8px); }
.reveal { transform: translateY(10px); }

/* ---- footer + toast ---- */
.email { border-width: 1px; }
.socials a { border-width: 1px; }
.socials a:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.toast { background: var(--paper); color: var(--paper-ink); }

@media (max-width: 900px) {
  .nav {
    background: rgba(11, 11, 10, 0.86);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
  }
}

/* =========================================================
   RIGHT COLUMN — bento gallery of work + photographs
   A header card that lines up with the nav card, and a scrolling card
   below it that lines up with the photo + bio card.
   3 columns, equal rows: each row pairs a tall narrow tile with a wide one.
   ========================================================= */
.right {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
  background: none;
}

.gallery__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;            /* same height as the nav card beside it */
  padding: 8px;
}

.gallery__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: var(--gap);
}
.gallery__scroll::-webkit-scrollbar { display: none; }

.gallery { container-type: inline-size; }

.gallery__grid {
  --col: calc((100cqw - 2 * var(--gap)) / 3);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: calc(var(--col) * 1.5);
  gap: var(--gap);
}
.gallery__grid[hidden] { display: none; }
.gallery__grid.is-entering { animation: grid-in 0.6s var(--ease) both; }
@keyframes grid-in { from { opacity: 0; transform: translateY(10px); } }

.t-n { grid-column: span 1; }
.t-w { grid-column: span 2; }

/* ---- tiles ---- */
.tile {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  border-radius: 3px;
  background: #141413;
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
  text-align: left;
}
.tile--empty { background: none; box-shadow: none; }

.tile__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
a.tile:hover .tile__media { transform: scale(1.03); }

/* ---- the details: client and date on one line, the brief below ---- */
.tile__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(236, 235, 230, 0.62);
}
.tile__title {
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.tile__stat {
  justify-self: start;
  margin-top: 2px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 91, 55, 0.5);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--accent);
}

/* videos: details rise on a solid panel on hover (always shown on touch) */
.tile__label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  gap: 8px;
  padding: 14px 16px 15px;
  border-radius: 2px;
  background: rgba(11, 11, 10, 0.86);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px var(--line);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}
.tile:hover .tile__label,
.tile:focus-visible .tile__label { opacity: 1; transform: none; }

/* article banners: shown whole, never cropped, details always visible */
.tile--banner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(12px, 1.3vw, 18px);
  background: #121211;
  transition: background-color 0.3s var(--ease);
}
.tile--banner:hover { background-color: #191817; }
.tile__frame {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
}
.tile__frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 2px;
  transition: transform 1.2s var(--ease);
}
.tile--banner:hover .tile__frame img { transform: scale(1.02); }
.tile__cap {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* typographic tiles for written pieces */
.tile--type {
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.8vw, 24px);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(255, 91, 55, 0.08), transparent 70%),
    #121211;
  transition: background-color 0.3s var(--ease);
}
.tile--type:hover { background-color: #191817; }
.tile__top { display: flex; align-items: center; min-height: 26px; }
.tile__logo { width: auto; height: 20px; filter: brightness(0) invert(1); opacity: 0.85; }
.tile__logo--cointelegraph { height: 26px; }
.tile__logo--ledger { height: 18px; }
.tile__logo--lifi { height: 22px; }
.tile__kicker { font-size: 14px; color: var(--muted); }
.tile__big {
  margin-top: auto;
  font-size: clamp(19px, 1.75vw, 26px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.tile__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: rgba(236, 235, 230, 0.62);
}
.tile__when { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.tile__arrow { color: var(--accent); font-size: 15px; transition: transform 0.4s var(--ease); }
.tile--type:hover .tile__arrow { transform: translate(3px, -3px); }
.tile--invite { cursor: pointer; font: inherit; border: 0; }
.tile--invite:hover .tile__arrow { transform: translateX(4px); }

/* photographs: prints on paper, developing as they scroll in */
.tile--print {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 0;
  background: var(--paper);
  box-shadow: none;
}
.tile__img { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--paper); }
.tile__img img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--raw); }
.tile--print.is-dev .tile__img img { animation: develop var(--develop) var(--ease) both; }
.tile__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  mix-blend-mode: multiply;
  opacity: 0;
  pointer-events: none;
}
.tile--print.is-dev .tile__img::after { animation: safelight var(--develop) ease-out both; }
.print__edge {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 2px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-ink);
  opacity: 0.72;
  white-space: nowrap;
}
.t-n .print__edge > :nth-child(5) { display: none; }   /* narrow prints: drop ISO so the edge fits */

/* work tiles fade in as they enter */
.tile:not(.tile--print):not(.tile--empty) { opacity: 0; transition: opacity 0.9s var(--ease); }
.tile.is-in { opacity: 1 !important; }
.no-io .tile { opacity: 1 !important; }
.no-io .tile__img img { filter: none; }

@media (hover: none) {
  .tile__label { opacity: 1; transform: none; }
}

/* ---- phones: two columns, gallery between the bio and the footer ---- */
@media (max-width: 900px) {
  .shell { display: flex; flex-direction: column; gap: var(--gap); }
  .left { display: contents; }
  .views { margin: 0; }
  .right { display: flex; order: 1; }
  .gallery__scroll { overflow: visible; }
  .gallery__head { scroll-margin-top: 76px; }   /* clear the sticky nav when switching modes */
  .left > .foot { order: 2; }

  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: calc((100cqw - var(--gap)) / 2 * 1.45);
    grid-auto-flow: dense;
  }
  .tile--empty { display: none; }
  .tile__big { font-size: 18px; }
  .tile__title { font-size: 15px; }
  .tile__meta, .tile__foot { font-size: 12px; }
  .tile__label { padding: 11px 12px 12px; gap: 6px; }
  .t-n .tile__label { left: 6px; right: 6px; bottom: 6px; }
  .t-n .print__edge > :nth-child(4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile { opacity: 1 !important; }
  .tile__img img { filter: none !important; }
  .gallery__grid.is-entering { animation: none; }
}
