:root {
  --bg: #0a0a0a;
  --sheet: #0f0f0f;
  --line: #1d1d1d;
  --line-2: #2a2a2a;
  --hi: #ededed;
  --text: #a3a3a3;
  --dim: #808080;
  --dimmer: #6e6e6e;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --col: 140px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.6 "Open Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: #e5e5e5; color: #0a0a0a; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #a3a3a3; outline-offset: 3px; border-radius: 4px; }

/* Film grain over everything */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 30;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page {
  width: 100%;
  max-width: 704px;
  margin: 0 auto;
  padding: 88px 16px 120px;
}

/* Entrance on first load */
.intro .rise {
  animation: rise 0.9s var(--ease) both;
  animation-delay: calc(var(--d) * 90ms + 120ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
}

/* Header */
.mark {
  display: block;
  margin: 0 0 18px -2px;
  cursor: pointer;
  touch-action: pan-y;
}
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.name { margin: 0; color: var(--hi); font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.handle { margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.socials { display: flex; gap: 10px; padding-top: 6px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--dim);
  border-radius: 6px;
  transition: color 0.2s, transform 0.25s var(--spring);
}
.icon-btn:hover { color: var(--hi); transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 17px; height: 17px; }
.sound-btn { margin-left: 4px; }
.sound-btn .wave { transition: opacity 0.25s, transform 0.3s var(--spring); transform-origin: 9px 12px; }
.sound-btn.off .wave { opacity: 0; transform: scale(0.6); }
.sound-btn .x { opacity: 0; transition: opacity 0.2s; }
.sound-btn.off .x { opacity: 1; }

.bio-wrap { margin-top: 18px; overflow: hidden; }
.bio, .note, .proj-tag, .quest-date, .blocks p, .blocks li, .blocks figcaption, .more p { text-wrap: pretty; }
.bio { margin: 0; color: var(--text); max-width: 36em; }
.bio em { color: #c9c9c9; }
.w {
  display: inline-block;
  transition: opacity 0.38s var(--ease), filter 0.38s var(--ease), transform 0.38s var(--ease);
  transition-delay: calc(var(--i) * 9ms);
}
.w.enter, .bio.out .w { opacity: 0; filter: blur(5px); transform: translateY(4px); }
.bio.out .w { transition-duration: 0.18s; transition-delay: calc(var(--i) * 3ms); transform: translateY(-3px); }

/* Tabs */
.tabs {
  position: relative;
  display: flex;
  gap: 2px;
  margin: 52px 0 18px -8px;
}
.tab {
  position: relative;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 7px;
  color: var(--dim);
  transition: color 0.25s;
}
.tab:hover { color: #b5b5b5; }
.tab.active { color: var(--hi); }
.tab-hover {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 7px;
  background: #171717;
  opacity: 0;
  transition: left 0.32s var(--ease), width 0.32s var(--ease), opacity 0.2s;
  pointer-events: none;
}
.tabs:hover .tab-hover { opacity: 1; }

/* Stage and panel transitions */
.stage { position: relative; }
.panel { transition: opacity 0.18s var(--ease), filter 0.18s var(--ease), transform 0.18s var(--ease); }
.panel.leaving { opacity: 0; filter: blur(4px); transform: translateY(-4px); }
.panel .item {
  transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.panel.enter .item { opacity: 0; filter: blur(6px); transform: translateY(10px); }

/* Shared link look */
.u {
  color: var(--hi);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  background-color: transparent;
  display: inline-block;
  line-height: 1.3;
  transition: background-size 0.35s var(--ease), color 0.2s;
}
.u:hover { background-size: 0% 1px; background-position: 100% 100%; }
.arrow { display: inline-grid; width: 13px; height: 13px; color: var(--dimmer); vertical-align: -1px; margin-left: 3px; transition: transform 0.3s var(--spring), color 0.2s; }
.arrow svg { width: 13px; height: 13px; }
a:hover > .arrow, .arrow:hover { color: var(--hi); transform: translate(2px, -2px); }

/* Work */
.group { border-top: 1px solid var(--line); padding: 22px 0 4px; }
.group:first-child { border-top: 0; padding-top: 4px; }
.row { display: grid; grid-template-columns: var(--col) 1fr; gap: 0 16px; padding: 0 0 18px; }
.years { display: flex; align-items: center; gap: 7px; color: var(--dim); height: 23px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.years span:first-child { min-width: 33px; }
.dash {
  width: 14px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--dim) 0 14px, transparent 14px 16px);
  transition: width 0.4s var(--ease);
}
.row:hover .dash {
  width: 20px;
  background: repeating-linear-gradient(90deg, var(--dim) 0 3px, transparent 3px 6px);
  animation: march 0.6s linear infinite;
}
@keyframes march { to { background-position: 6px 0; } }
.row-title { color: #e2e2e2; }
.at { color: var(--dim); margin: 0 3px; }
.nowrap { white-space: nowrap; }
.org { display: inline-flex; align-items: baseline; gap: 6px; vertical-align: baseline; }
.org img { align-self: center; }
.org img { width: 15px; height: 15px; border-radius: 4px; object-fit: cover; transition: transform 0.35s var(--spring); }
.org:hover img { transform: rotate(-8deg) scale(1.15); }
.note { color: var(--dim); font-size: 12.5px; margin-top: 1px; }

/* Projects list */
.list { display: flex; flex-direction: column; gap: 22px; }
.proj { display: flex; justify-content: space-between; gap: 24px; cursor: pointer; transition: opacity 0.35s var(--ease); }
.list:hover .proj:not(:hover) { opacity: 0.45; }
.proj-text { padding-top: 2px; min-width: 0; }
.proj-title { color: var(--hi); }
.proj-date { color: var(--dim); font-size: 12.5px; }
.proj-tag { color: var(--dim); font-size: 12.5px; margin-top: 8px; max-width: 280px; opacity: 0; transform: translateY(-3px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.proj:hover .proj-tag, .proj:focus-visible .proj-tag { opacity: 1; transform: none; }
.thumb {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative;
  flex: none;
  width: 268px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #121212;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 30px -12px rgba(0, 0, 0, 0.8);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease), box-shadow 0.4s;
}
.proj:hover .thumb { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.025); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 18px 40px -14px rgba(0, 0, 0, 0.9); }
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.proj:hover .thumb::after { opacity: 1; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s, filter 0.6s, transform 0.8s var(--ease); }
.thumb img.on { opacity: 1; }
/* Framed: the screenshot floats on a blurred, color-rich copy of itself. */
.thumb.framed img.backdrop { inset: -14%; width: 128%; height: 128%; opacity: 1; filter: blur(26px) saturate(1.6) brightness(0.6); }
.thumb.framed img:not(.backdrop) { inset: auto; top: 50%; left: 50%; width: auto; height: auto; max-width: 84%; max-height: 80%; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 30px -10px rgba(0, 0, 0, 0.7); }
.thumb.framed img.bl:not(.backdrop), .thumb.framed img.bl.loaded:not(.backdrop) { transform: translate(-50%, -50%); }
.thumb.framed img.bl:not(.loaded):not(.backdrop) { filter: blur(10px); }
.thumb .count { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 3px; opacity: 0; transition: opacity 0.3s; }
.proj:hover .count { opacity: 1; }
.count i { width: 4px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.4); transition: width 0.3s var(--ease), background 0.3s; }
.count i.on { width: 10px; background: #fff; }

/* Blur-up image loading */
img.bl { filter: blur(12px); transform: scale(1.03); }
img.bl.loaded { filter: none; transform: none; }

/* Hacks carousel */
.flow-wrap { margin: 0 calc(50% - min(var(--vw, 1vw) * 50, 520px)); }
.flow {
  position: relative;
  height: 310px;
  perspective: 1100px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  outline: none;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.flow.dragging { cursor: grabbing; }
.flow:focus-visible { outline: 2px solid #a3a3a3; outline-offset: -2px; border-radius: 14px; }
.card {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 340px;
  aspect-ratio: 4 / 3;
  margin-left: -170px;
  border-radius: 14px;
  overflow: hidden;
  background: #131313;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  transform-style: preserve-3d;
  will-change: transform, filter;
}
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.card .shade { position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0, 0, 0, 0.92)); }
.card .label { position: absolute; left: 16px; right: 16px; bottom: 14px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.card .label small { display: block; color: rgba(255, 255, 255, 0.78); font-size: 12px; }
.card .label b { color: #fff; font-weight: 500; font-size: 15px; }
.card .label span { color: rgba(255, 255, 255, 0.78); font-size: 12.5px; margin-left: 6px; }
.dots { display: flex; justify-content: center; gap: 0; margin-top: -4px; }
.dots button { width: 20px; height: 24px; display: grid; place-items: center; }
.dots button::before { content: ""; width: 5px; height: 5px; border-radius: 5px; background: #666; transition: width 0.4s var(--ease), background 0.3s; }
.dots button.on::before { width: 16px; background: #bdbdbd; }
.flow-hint { text-align: center; color: var(--dim); font-size: 12px; margin-top: 6px; }

/* More */
.more p { margin: 0 0 22px; }
.more b, .more .em-btn { color: var(--hi); font-weight: 600; }
.em-link { color: var(--hi); font-weight: 600; text-decoration: underline; text-decoration-color: #6e6e6e; text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.em-link:hover { text-decoration-color: var(--hi); }
.counter { font-variant-numeric: tabular-nums; }
.copy-btn { position: relative; }
.copy-btn::after { content: "copy"; position: absolute; left: 50%; top: -26px; transform: translate(-50%, 4px); font-size: 12px; font-weight: 400; color: var(--hi); background: #1c1c1c; border: 1px solid var(--line-2); padding: 1px 7px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.3s var(--spring); }
.copy-btn:hover::after { opacity: 1; transform: translate(-50%, 0); }
.kv { display: grid; grid-template-columns: var(--col) 1fr; gap: 0 16px; padding: 0 0 22px; }
.kv .k { color: var(--dim); }
.kv-line { display: flex; justify-content: flex-start; gap: 8px; color: #cfcfcf; }
.kv-line i { color: var(--dim); }
.quests { border-top: 1px solid var(--line); padding-top: 24px; }
.list + .quests { margin-top: 40px; }
.quest { display: block; text-align: left; margin-bottom: 14px; cursor: pointer; }
.quest:last-child { margin-bottom: 0; }
.quest-title { color: var(--hi); transition: transform 0.3s var(--ease); display: inline-block; }
.quest:hover .quest-title { transform: translateX(3px); }
.quest-date { display: block; color: var(--dim); font-size: 12.5px; }
.quest.static { cursor: default; }
.quest.static:hover .quest-title { transform: none; }
.quest .arrow { margin-left: 4px; }
.org.plain { color: #e2e2e2; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.35s var(--ease); }
.modal.open .modal-backdrop { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease);
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}
.modal.open .sheet { opacity: 1; transform: none; }
.sheet-inner { transition: opacity 0.2s, filter 0.2s; }
.sheet-inner.swap { opacity: 0; filter: blur(4px); }
.hero { position: relative; aspect-ratio: 16 / 10; background: #141414; overflow: hidden; border-radius: 17px 17px 0 0; }
.hero .backdrop { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(38px) saturate(1.6) brightness(0.62); transform: scale(1.05); }
.hero .shot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 86%;
  max-height: 82%;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 28px 60px -16px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 8px)) scale(0.985);
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
  cursor: zoom-in;
}
.hero .shot.on { opacity: 1; transform: translate(-50%, -50%); }
.film { display: flex; gap: 8px; padding: 12px 28px 0; overflow-x: auto; scrollbar-width: none; }
.film::-webkit-scrollbar { display: none; }
.film button { flex: none; width: 66px; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; opacity: 0.45; box-shadow: 0 0 0 1px var(--line-2); transition: opacity 0.25s, box-shadow 0.25s, transform 0.3s var(--spring); }
.film button:hover { opacity: 0.8; transform: translateY(-1px); }
.film button.on { opacity: 1; box-shadow: 0 0 0 1.5px #d4d4d4; }
.film img { width: 100%; height: 100%; object-fit: cover; }
.hero-nav { position: absolute; inset: auto 12px 12px auto; display: flex; gap: 6px; }
.hero-nav button { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.65); color: #fff; backdrop-filter: blur(6px); transition: transform 0.25s var(--spring), background 0.2s; }
.hero-nav button:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.08); }
.hero-nav svg { width: 14px; height: 14px; }
.close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px -40px 0;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, 0.75);
  border: 1px solid var(--line-2);
  color: #d4d4d4;
  backdrop-filter: blur(6px);
  transition: transform 0.25s var(--spring), color 0.2s;
}
.close:hover { color: #fff; transform: rotate(90deg); }
.close svg { width: 13px; height: 13px; }
.sheet-body { padding: 22px 28px 30px; }
.sheet-body.flat { padding-top: 28px; }
.flat-sheet .close { margin-top: 26px; margin-bottom: -54px; }
.sheet-head { display: flex; gap: 12px; align-items: flex-start; }
.sheet-head img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sheet h2 { margin: 0; color: var(--hi); font-size: 19px; font-weight: 500; }
.sheet .tagline { margin: 0; color: var(--dim); font-size: 13px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 16px 0 4px; font-size: 12.5px; color: var(--dim); }
.meta span b { color: #c9c9c9; font-weight: 400; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.blocks { margin-top: 22px; font-size: 15px; }
.blocks > * { margin: 0 0 16px; }
.blocks > :last-child { margin-bottom: 0; }
.blocks p { color: #b4b4b4; }
.blocks a { color: var(--hi); text-decoration: underline; text-decoration-color: #6e6e6e; text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.blocks a:hover { text-decoration-color: var(--hi); }
.blocks h3 { color: var(--hi); font-size: 15.5px; font-weight: 600; margin-top: 26px; }
.stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stats div { flex: 1 1 130px; background: var(--sheet); padding: 12px 14px; }
.stats b { display: block; color: var(--hi); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.stats span { color: var(--dim); font-size: 12px; line-height: 1.4; display: block; }
.blocks figure { margin: 0 0 16px; }
.zoom { display: block; width: 100%; padding: 0; cursor: zoom-in; border-radius: 10px; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bento.n1 { grid-template-columns: 1fr; }
.bento .zoom { aspect-ratio: 4 / 3; overflow: hidden; background: #141414; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.bento.n3 > :first-child { grid-row: span 2; aspect-ratio: auto; }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.6s; }
.bento .zoom:hover img.loaded { transform: scale(1.03); }
.blocks figure img, .strip img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); background: #141414; }
.blocks figcaption { color: var(--dim); font-size: 12.5px; margin-top: 8px; }
.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.strip img { height: 180px; width: auto; flex: none; scroll-snap-align: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12px; color: #bdbdbd; border: 1px solid var(--line-2); border-radius: 99px; padding: 2px 10px; }
.blocks .small { color: var(--dim); font-size: 12.5px; }
.blocks .video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 16px; border-radius: 10px; overflow: hidden; background: #141414; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.blocks .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blocks .embed { margin: 0 0 16px; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.blocks .embed iframe { display: block; width: 100%; border: 0; }
@media (max-width: 600px) { .blocks .embed iframe { height: 1620px; } }
.blocks li b { color: var(--hi); font-weight: 600; }
.blocks ul { padding-left: 18px; color: #b4b4b4; }
.blocks li { margin-bottom: 6px; }
.blocks li::marker { color: var(--dimmer); }
.blocks blockquote { margin-left: 0; padding-left: 14px; border-left: 2px solid var(--line-2); color: var(--hi); }
.blocks blockquote small { display: block; color: var(--dim); margin-top: 4px; }
.blocks pre { background: #141414; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d4d4d4; }

.flyer { position: fixed; z-index: 45; object-fit: cover; pointer-events: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s; cursor: zoom-out; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); transform: scale(0.97); transition: transform 0.45s var(--ease); }
.lightbox.open img { transform: none; }
.lightbox button { position: absolute; width: 40px; height: 40px; border-radius: 99px; display: grid; place-items: center; background: rgba(30, 30, 30, 0.8); border: 1px solid var(--line-2); color: #e5e5e5; cursor: pointer; transition: transform 0.25s var(--spring), background 0.2s; }
.lightbox button:hover { background: rgba(50, 50, 50, 0.9); transform: scale(1.06); }
.lightbox svg { width: 16px; height: 16px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 20px; top: 50%; margin-top: -20px; }
.lb-next { right: 20px; top: 50%; margin-top: -20px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 7px 14px;
  border-radius: 99px;
  background: #e8e8e8;
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 500;
  transform: translate(-50%, 20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.4s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

body.locked { overflow: hidden; }

@media (max-width: 640px) {
  .page { padding-top: 56px; }
  .row { grid-template-columns: 1fr; }
  .years { height: auto; font-size: 12.5px; margin-bottom: 2px; }
  .proj { flex-direction: column-reverse; gap: 10px; }
  .thumb { width: 100%; }
  .proj-tag { opacity: 1; transform: none; margin-top: 4px; max-width: none; }
  body { font-size: 15.5px; }
  .note, .proj-date, .proj-tag, .quest-date, .years, .meta, .blocks .small, .blocks figcaption { font-size: 13px; letter-spacing: 0.01em; }
  .socials { gap: 0; }
  .icon-btn { width: 36px; height: 36px; margin: -7px -2px; }
  .sound-btn { margin-left: 0; }
  .tab { padding: 8px 10px; }
  .tabs { margin-left: -10px; }
  .close, .hero-nav button { width: 36px; height: 36px; }
  /* The float must take no height, or the hero (a BFC) shrinks beside it. */
  .close { margin-bottom: -48px; }
  .flat-sheet .close { margin-bottom: -62px; }
  .list:hover .proj:not(:hover) { opacity: 1; }
  .card { width: 68vw; margin-left: -34vw; }
  .flow { height: calc(68vw * 0.75 + 48px); }
  .kv { grid-template-columns: 1fr; gap: 6px; }
  .sheet-body { padding: 18px 18px 24px; }
  .film { padding: 10px 18px 0; }
  .hero-nav { display: none; }
  .lightbox img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin-top: 0; }
  .lb-prev { left: calc(50% - 52px); }
  .lb-next { right: calc(50% - 52px); }
  .sheet-body.flat { padding-top: 22px; }
}

@media (max-width: 360px) {
  .name { font-size: 22px; }
  .icon-btn { width: 30px; margin: -7px -1px; }
  .head-row { gap: 8px; }
  .name { white-space: nowrap; }
}

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