/* global theme/styling/animation */
:root {
  --bg: #101115;
  --bg-soft: #15171d;
  --text: #e8e7e3;
  --muted: #acaeaf;
  --line: rgba(255, 255, 255, 0.14);
  --float-x: 0px;
  --float-y: 0px;
  --motion-intensity: 1;
  --ghost-offset: 2px;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --gradient-jitter-a: 0%;
  --gradient-jitter-b: 0%;
  --leak-spin: 0deg;
  --leak-a-x: 52%;
  --leak-a-y: 33%;
  --leak-b-x: 18%;
  --leak-b-y: 68%;
  --leak-a-delay: -8s;
  --leak-b-delay: -16s;
  --mx: 50vw;
  --my: 50vh;
}



* {
  box-sizing: border-box;
}

html.cursor-hidden,
html.cursor-hidden * {
  cursor: none !important;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, sans-serif;
  letter-spacing: 0.012em;
  overflow-x: hidden;
}


.dream-stack,
.dream-stack > div {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.dream-stack { z-index: -10; }

.ambient-base { background: #0f1014; }

.dream-haze,
.dream-leak {
  will-change: transform;
  mix-blend-mode: screen;
}

.dream-haze {
  opacity: 0.22;
  filter: blur(42px);
}

.dream-haze.layer-a {
  background: radial-gradient(circle at 18% 24%, rgba(115, 126, 166, 0.24), transparent 42%),
    radial-gradient(circle at 82% 70%, rgba(175, 129, 215, 0.16), transparent 55%);
  transform: translate3d(calc(var(--parallax-x) * 0.22), calc(var(--parallax-y) * 0.22), 0);
  animation: hazeFloatA 8s ease-in-out infinite alternate;
}

.dream-haze.layer-b {
  opacity: 0.18;
  background: radial-gradient(circle at 70% 18%, rgba(255, 218, 180, 0.2), transparent 44%),
    radial-gradient(circle at 16% 84%, rgba(172, 199, 255, 0.12), transparent 52%);
  transform: translate3d(calc(var(--parallax-x) * 0.35), calc(var(--parallax-y) * 0.35), 0);
  animation: hazeFloatB 10s ease-in-out infinite alternate;
}

.dream-haze.layer-c {
  opacity: 0.12;
  background: radial-gradient(circle at 52% 44%, rgba(196, 167, 224, 0.16), transparent 62%);
  transform: translate3d(calc(var(--parallax-x) * 0.5), calc(var(--parallax-y) * 0.5), 0);
  animation: hazeFloatC 12s ease-in-out infinite alternate;
}

.fog-reveal {
  opacity: 0.08;
  background:
    radial-gradient(circle at 46% 34%, rgba(255, 231, 207, 0.32), transparent 52%),
    radial-gradient(circle at 58% 62%, rgba(168, 189, 255, 0.26), transparent 58%);
  filter: blur(34px) saturate(1.06);
  transition: opacity 0.35s ease;
  -webkit-mask-image: radial-gradient(700px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 68%);
  mask-image: radial-gradient(700px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 68%);
}

.dream-leak {
  opacity: 0.2;
  filter: blur(28px);
}

.dream-leak.leak-a {
  background: radial-gradient(40% 38% at var(--leak-a-x) var(--leak-a-y), rgba(255, 198, 141, 0.26), transparent 76%),
    linear-gradient(130deg, transparent 20%, rgba(255, 191, 157, 0.11) 48%, transparent 76%);
  transform: translate3d(calc(var(--parallax-x) * 0.8), calc(var(--parallax-y) * 0.8), 0) rotate(var(--leak-spin));
  animation: lightLeakA 9s ease-in-out infinite;
  animation-delay: var(--leak-a-delay);
}

.dream-leak.leak-b {
  opacity: 0.16;
  background: radial-gradient(34% 36% at var(--leak-b-x) var(--leak-b-y), rgba(174, 138, 232, 0.24), transparent 72%),
    linear-gradient(200deg, transparent 18%, rgba(163, 197, 255, 0.1) 46%, transparent 74%);
  transform: translate3d(calc(var(--parallax-x) * 0.95), calc(var(--parallax-y) * 0.95), 0);
  animation: lightLeakB 11s ease-in-out infinite;
  animation-delay: var(--leak-b-delay);
}

.dream-vignette {
  background: radial-gradient(circle at center, transparent 52%, rgba(7, 8, 12, 0.42) 100%);
}

.dream-bloom {
  opacity: 0.22;
  background: radial-gradient(circle at 50% 16%, rgba(247, 240, 225, 0.1), transparent 58%);
  filter: blur(20px);
}

.whisper-line {
  position: fixed;
  right: clamp(0.8rem, 2.2vw, 1.8rem);
  bottom: clamp(1.6rem, 5vh, 3.2rem);
  z-index: 2;
  max-width: 24ch;
  font-size: 0.67rem;
  letter-spacing: 0.09em;
  color: rgba(232, 230, 224, 0.3);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  pointer-events: none;
  text-transform: lowercase;
}

.whisper-line.is-visible {
  opacity: 0.42;
  transform: translateY(0);
}

#load-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: stretch;
  justify-content: flex-start;
  padding: clamp(0.9rem, 2vw, 1.4rem);
  background: #000000;
  color: #ffffff;
  z-index: 38;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  mix-blend-mode: normal;
  transition: opacity 380ms ease, visibility 380ms ease;
  overflow: hidden;
}

.js-ready #load-overlay {
  display: flex;
}

.intro-terminal::before {
  content: none;
}

.intro-terminal-shell {
  width: min(980px, 100%);
  height: 100%;
  min-height: 0;
  padding: clamp(0.45rem, 1vw, 0.72rem) clamp(0.75rem, 1.6vw, 1.18rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 460;
  opacity: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 80ms linear;
}

.intro-terminal-output,
.intro-terminal-prompt {
  font-size: clamp(0.74rem, 1.45vw, 0.92rem);
  line-height: 1.22;
  letter-spacing: 0.024em;
  margin: 0;
}

.intro-terminal-output {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 clamp(0.1rem, 0.2vw, 0.2rem) 0 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.55) transparent;
}

.intro-terminal-output::-webkit-scrollbar {
  width: 0.5rem;
}

.intro-terminal-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.55);
}

.intro-terminal-line {
  margin: 0;
  padding-left: 0.38rem;
  text-transform: lowercase;
  text-shadow: none;
  white-space: pre;
  color: #ffffff;
  opacity: 1;
}

.intro-terminal-prompt {
  margin-top: 0.14rem;
  display: flex;
  align-items: baseline;
  gap: 0.32rem;
}

.intro-terminal-prompt-symbol {
  opacity: 0.62;
}

.intro-terminal-prompt-command {
  font-weight: 560;
  letter-spacing: 0.028em;
}

.intro-caret {
  display: inline-block;
  width: 1px;
  height: 0.98em;
  margin-left: 0.12rem;
  background: currentColor;
  opacity: 0.88;
  transform: translateY(0.15em);
  animation: introCaretBlink 0.6s steps(1, end) infinite;
}

#load-overlay.is-finalizing .intro-caret {
  animation-duration: 0.18s;
}

#load-overlay.is-flashing {
  filter: none;
}

#load-overlay.is-flashing::after {
  content: none;
}

#load-overlay.is-dissolving {
  backdrop-filter: none;
}

#load-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

#load-overlay.is-hidden::after {
  content: none;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 6vw;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(13, 14, 18, 0.8), rgba(13, 14, 18, 0.45));
  z-index: 10;
}

.brand,
.site-nav a,
a,
button {
  color: var(--text);
  text-decoration: none;
  text-transform: lowercase;
}

.site-nav { display: flex; gap: 1.2rem; }
.site-nav a:nth-child(2) { letter-spacing: 0.03em; }
.site-nav a:nth-child(3) { letter-spacing: 0.014em; }
.site-nav a, .brand { opacity: 0.72; }
.site-nav a.is-active,
.site-nav a:hover,
.site-nav a:focus-visible,
.brand:hover,
.brand:focus-visible { opacity: 1; text-shadow: 1px 0 rgba(145, 188, 255, 0.28), -1px 0 rgba(255, 167, 166, 0.24); }

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

body.home-page main {
  padding-top: clamp(1.2rem, 4vw, 2.4rem);
}




body.intro-active #grain-layer {
  opacity: 0 !important;
  animation: none !important;
}
#grain-layer{
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 35;
  opacity: var(--grain-opacity, 0.14);
  mix-blend-mode: soft-light;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)' opacity='1'/></svg>");
  background-repeat: repeat;
  background-size: 220px 220px;
  background-position: 0 0;
  will-change: background-position;
  animation: grain-drift 3.4s steps(2, end) infinite;
  animation-iteration-count: infinite;
  animation-fill-mode: none;
}

main {
  position: relative;
  z-index: 3;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.985);
  filter: blur(6px);
}

.reveal-ready {
  animation-fill-mode: both;
  transition:
    opacity 720ms var(--reveal-ease, cubic-bezier(0.2, 0.8, 0.2, 1)) var(--reveal-delay, 0ms),
    transform 720ms var(--reveal-ease, cubic-bezier(0.2, 0.8, 0.2, 1)) var(--reveal-delay, 0ms),
    filter 720ms var(--reveal-ease, cubic-bezier(0.2, 0.8, 0.2, 1)) var(--reveal-delay, 0ms);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.reveal--heading { transform: translate3d(0, 10px, 0) scale(0.99); filter: blur(0); }
.reveal--card { transform: translate3d(0, 14px, 0) scale(0.98); }
.reveal--link { transform: translate3d(0, 8px, 0) scale(0.995); filter: blur(2px); }
.reveal--hero { transform: translate3d(0, 16px, 0) scale(0.985); }


.route-fade {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  filter: blur(4px);
  transition: opacity 620ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1), filter 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.route-fade.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.route-fade.is-exiting {
  opacity: 0.18;
  transform: translate3d(0, -8px, 0);
  filter: blur(6px);
}

.route-fade.is-entering {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  filter: blur(5px);
}

.route-fade.is-entering.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.slate-wrap {
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-block: clamp(1rem, 3vh, 2rem);
  transition: min-height 0.45s ease, padding 0.45s ease, gap 0.45s ease;
}

.slate-wordmark {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--text);
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.42s ease;
}

.slate-wrap.is-collapsed {
  min-height: 0;
  padding-block: 0;
  gap: clamp(0.6rem, 1.4vw, 1rem);
}

.slate-wrap.is-collapsed .slate {
  max-height: 0;
  padding-block: 0;
  border-width: 0;
  opacity: 0;
  transform: translate3d(0, -10px, 0);
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.42s ease, opacity 0.3s ease, transform 0.4s ease, border-width 0.2s ease, padding 0.2s ease;
}

.slate-wrap.is-collapsed .slate-wordmark {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.slate[data-slate] { cursor: pointer; }

.slate {
  position: relative;
  animation: breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 45%;
  overflow: hidden;
  width: min(760px, 100%);
  transform: scale(0.998);
  opacity: 0.985;
  margin-left: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.2rem, 3.3vw, 2.3rem);
  background: linear-gradient(180deg, rgba(23, 26, 32, 0.92), rgba(14, 15, 19, 0.95));
  --slate-drift-x: 0%;
  --slate-drift-y: 0%;
  --slate-delay-a: 0s;
  --slate-delay-b: -2s;
  --slate-delay-c: -4s;
}

.slate::before {
  content: '';
  position: absolute;
  inset: -20% -24%;
  background: radial-gradient(circle at calc(22% + var(--slate-drift-x)) calc(35% + var(--slate-drift-y)), rgba(255, 216, 165, 0.12), transparent 48%),
    radial-gradient(circle at calc(80% - var(--slate-drift-x)) calc(20% + var(--slate-drift-y)), rgba(164, 180, 255, 0.1), transparent 52%);
  mix-blend-mode: screen;
  animation: slateLeakA 3.6s cubic-bezier(0.33, 0.08, 0.21, 0.96) infinite;
  animation-delay: var(--slate-delay-a);
}

.slate::after {
  content: none;
  position: absolute;
  inset: -35% -40%;
  background: linear-gradient(120deg, transparent 42%, rgba(255, 206, 153, 0.12) 52%, transparent 60%);
  filter: blur(14px);
  opacity: 0.6;
  animation: slateLeakB 4.2s cubic-bezier(0.4, 0.03, 0.18, 0.99) infinite;
  animation-delay: var(--slate-delay-b);
}

.slate-glow {
  position: absolute;
  inset: -32% -10%;
  background: radial-gradient(circle at calc(68% + var(--slate-drift-x)) calc(72% - var(--slate-drift-y)), rgba(255, 232, 207, 0.16), transparent 46%),
    linear-gradient(155deg, rgba(255, 230, 199, 0.08), transparent 52%);
  filter: blur(22px);
  opacity: 0.45;
  pointer-events: none;
  animation: slateLeakC 4.8s cubic-bezier(0.26, 0.11, 0.22, 0.98) infinite;
  animation-delay: var(--slate-delay-c);
}

.slate p:first-child { letter-spacing: 0.09em; }
.memory-subtitle {
  margin: 0.2rem 0 0.4rem;
  min-height: 1.2em;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(226, 224, 216, 0.46);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  text-transform: lowercase;
}
.memory-subtitle.is-visible {
  opacity: 0.65;
  transform: translateY(0);
}
.slate h1,
.page-section h1 {
  position: relative;
}
.slate h1::after {
  content: attr(data-glitch);
  position: absolute;
  left: 1px;
  top: 1px;
  opacity: 0.22;
  color: rgba(171, 196, 255, 0.8);
  filter: blur(1px);
  pointer-events: none;
}
.slate h1,
.page-section h1,
.page-section h2,
.work-title {
  transform: translate3d(0, 0, 0) scale(1);
  will-change: transform, opacity, filter;
}

.slate h1,
.page-section h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  margin: 0.3rem 0 0.6rem;
  animation: none;
}

.slate p { color: var(--muted); max-width: 62ch; line-height: 1.6; }

.slate-meta {
  margin: 1.15rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  position: relative;
  z-index: 1;
}

.slate-meta-item {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
}

.slate-meta-item::after {
  content: '·';
  color: rgba(224, 223, 230, 0.38);
  margin-left: 0.32rem;
}

.slate-meta-item:last-child::after {
  display: none;
}

.slate-meta-item dt {
  display: inline;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: lowercase;
  color: rgba(226, 226, 230, 0.6);
  margin: 0;
}

.slate-meta-item dd {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(244, 241, 235, 0.95);
  letter-spacing: 0.03em;
}

.slate-meta-value.is-updating {
  animation: slateMetaTick 0.38s ease;
}


.quiet-btn { margin-top: 1rem; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.01); padding: 0.65rem 1rem; }
.quiet-btn:hover, .quiet-btn:focus-visible { background: rgba(255, 255, 255, 0.08); }

.section-cta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.section-cta-row {
  margin-top: 1.4rem;
  display: flex;
  justify-content: flex-start;
}

.section-cta:hover {
  color: var(--text);
  background: transparent;
  text-decoration: underline;
}

.section-cta:focus-visible {
  color: var(--text);
  background: transparent;
  text-decoration: underline;
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}

.home-films, .home-writings, .about, .page-section {
  position: relative;
  margin-top: 4rem;
  padding-top: 1.1rem;
}

.home-films {
  margin-top: clamp(3.5rem, 8vh, 6rem);
}

.slate-wrap.is-collapsed + .home-films {
  margin-top: clamp(1.4rem, 3vh, 2.4rem);
}

.home-films::before,
.home-writings::before,
.about::before,
.page-section::before {
  content: '';
  position: absolute;
  inset: -1rem 0 auto;
  height: 90px;
  background: linear-gradient(180deg, rgba(11, 12, 16, 0), rgba(11, 12, 16, 0.55), rgba(11, 12, 16, 0));
  filter: blur(18px);
  opacity: calc(0.6 + (var(--section-dissolve, 0) * 0.35));
  pointer-events: none;
}

.home-films::after,
.home-writings::after,
.about::after,
.page-section::after {
  content: '';
  position: absolute;
  inset: auto 0 -1.2rem;
  height: 88px;
  background: linear-gradient(0deg, rgba(11, 12, 16, 0), rgba(11, 12, 16, 0.5), rgba(11, 12, 16, 0));
  filter: blur(16px);
  opacity: calc(0.45 + (var(--section-dissolve, 0) * 0.28));
  pointer-events: none;
}

.film-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }

.writing-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.writing-grid .writing-card {
  --slice-count: 4;
  --slice-index: var(--slice-index-4, 0);
  transition: opacity 0.25s ease;
}



.work-card { width: 100%; margin: 0; }

.work-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.work-card-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
}

.work-tile {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(14, 15, 19, 0.72), rgba(10, 10, 13, 0.92));
  transition: transform 150ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 150ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.film-image,
.writing-cover-image,
.writing-text-cover,
.writing-composite-cover,
.thumb-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.95) blur(0px);
  transition: filter 0.16s ease-out, transform 0.16s ease-out;
}

.writing-card .work-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0.05) 30%, rgba(8, 9, 12, 0.72) 100%);
}

.writing-composite-cover {
  background-image:
    linear-gradient(180deg, rgba(7, 8, 12, 0.06), rgba(8, 10, 13, 0.42) 56%, rgba(8, 10, 13, 0.82)),
    var(--writings-hero-image);
  background-size: 100% 100%, calc(var(--slice-count) * 100%) auto;
  background-position: 50% 50%, calc((var(--slice-index) / max(var(--slice-count) - 1, 1)) * 100%) 52%;
  background-repeat: no-repeat;
  filter: brightness(0.9) saturate(0.92) blur(1.6px);
}

.writing-text-cover {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 211, 168, 0.22), transparent 50%),
    radial-gradient(circle at 84% 76%, rgba(170, 181, 255, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(18, 19, 23, 0.75), rgba(10, 10, 13, 0.95));
}

.writing-haze {
  position: absolute;
  inset: -16%;
  background: radial-gradient(circle at 52% 48%, rgba(255, 255, 255, 0.08), transparent 56%);
  filter: blur(18px);
}

.thumb-placeholder {
  background: linear-gradient(160deg, rgba(45, 47, 56, 0.88), rgba(20, 21, 28, 0.96));
}

.work-title {
  margin: 0.7rem 0 0;
  font-weight: 400;
  letter-spacing: 0.015em;
  transition: text-shadow 0.14s ease-out;
}


.work-title--in-tile {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.7rem;
  z-index: 2;
  margin: 0;
  font-size: clamp(0.95rem, 1.2vw + 0.6rem, 1.55rem);
  line-height: 1.2;
  color: rgba(248, 245, 239, 0.95);
  text-shadow: 0 2px 12px rgba(5, 6, 10, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-title--in-tile.title--lg { font-size: clamp(1rem, 1.3vw + 0.65rem, 1.62rem); }
.work-title--in-tile.title--sm { font-size: clamp(0.92rem, 1.12vw + 0.55rem, 1.42rem); }
.work-title--in-tile.title--xs { font-size: clamp(0.86rem, 0.98vw + 0.5rem, 1.2rem); }

.work-subtitle {
  margin: 0.3rem 0 0;
  color: rgba(224, 223, 219, 0.68);
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.writing-excerpt {
  margin: 0.45rem 0 0;
  opacity: 0.65;
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.writing-excerpt--detail {
  margin: 0.7rem 0 1rem;
  font-size: 0.95rem;
  max-width: 68ch;
}


.writing-year {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  line-height: 1.2;
  color: rgba(228, 224, 216, 0.6);
  letter-spacing: 0.02em;
}

.focus-breath {
  animation: headingBreath 2.4s ease both;
}

.work-card-link:hover .work-title,
.work-card-link:focus-visible .work-title,
.work-card-link:focus-within .work-title {
  text-shadow: 1px 0 rgba(255, 204, 170, 0.16);
}

.dust-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.dust-mote {
  position: absolute;
  left: var(--dust-x);
  bottom: -8%;
  width: var(--dust-size, 3px);
  height: var(--dust-size, 3px);
  border-radius: 50%;
  background: rgba(238, 232, 218, 0.38);
  filter: blur(var(--dust-blur, 1px));
  opacity: 0;
  animation: dustFloat var(--dust-duration) ease-out var(--dust-delay) forwards;
}

.work-card-link:hover .work-tile,
.work-card-link:focus-visible .work-tile,
.work-card-link:focus-within .work-tile {
  transform: translate3d(1px, -4px, 0);
}

.work-card-link:hover .film-image,
.work-card-link:hover .writing-cover-image,
.work-card-link:hover .writing-text-cover,
.work-card-link:hover .writing-composite-cover,
.work-card-link:hover .thumb-placeholder,
.work-card-link:focus-visible .film-image,
.work-card-link:focus-visible .writing-cover-image,
.work-card-link:focus-visible .writing-text-cover,
.work-card-link:focus-visible .writing-composite-cover,
.work-card-link:focus-visible .thumb-placeholder,
.work-card-link:focus-within .film-image,
.work-card-link:focus-within .writing-cover-image,
.work-card-link:focus-within .writing-text-cover,
.work-card-link:focus-within .writing-composite-cover,
.work-card-link:focus-within .thumb-placeholder {
  filter: brightness(1.04) contrast(1.03) saturate(1.02) blur(0.7px);
  transform: translate3d(1px, -2px, 0) scale(1.012);
}

.work-card-link:hover .work-tile,
.work-card-link:focus-visible .work-tile,
.work-card-link:focus-within .work-tile {
  box-shadow: 0 0 0 1px rgba(255, 226, 196, 0.16), 0 8px 24px rgba(6, 6, 8, 0.32);
}

.writing-grid:has(.writing-card .work-card-link:hover) .writing-card:not(:has(.work-card-link:hover)) {
  opacity: 0.92;
}



.echo-ring {
  position: absolute;
  width: 8px;
  height: 8px;
  left: var(--echo-x);
  top: var(--echo-y);
  transform: translate(-50%, -50%) scale(0.3);
  border-radius: 50%;
  border: 1px solid rgba(252, 240, 229, 0.45);
  box-shadow: 0 0 26px rgba(252, 234, 206, 0.2);
  pointer-events: none;
  animation: echoOut 0.5s ease forwards;
}

.about p,
.page-section p,
.writing-detail article p { max-width: 68ch; line-height: 1.8; color: var(--muted); }

.detail .player-wrap {
  width: min(860px, 100%);
  margin: 1rem 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 14, 16, 0.84), rgba(17, 18, 24, 0.92));
  box-shadow: 0 0 0 1px rgba(255, 208, 157, 0.08), 0 25px 65px rgba(0, 0, 0, 0.38);
}

.player-ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: inherit;
  overflow: hidden;
}
.player-ratio::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 18%, rgba(255, 210, 163, 0.16), transparent 42%),
    radial-gradient(circle at 85% 85%, rgba(166, 185, 255, 0.16), transparent 46%),
    radial-gradient(circle at center, transparent 36%, rgba(9, 9, 11, 0.52) 100%);
  pointer-events: none;
}

.detail iframe,
.film-fallback { width: 100%; height: 100%; border: 0; }
.film-fallback { display: grid; grid-template-rows: 1fr auto; }
.film-fallback img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.78); }
.film-fallback-copy { padding: 0.9rem; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.film-fallback-copy p { margin: 0; }
.film-fallback-copy .quiet-btn { display: inline-block; margin-top: 0.7rem; }

.detail-meta-static,
.detail-meta-static .meta,
.detail-meta-static .meta-item {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

.writing-detail article {
  max-width: 68ch;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1rem, 2.3vw, 1.6rem);
  background: linear-gradient(180deg, rgba(20, 22, 27, 0.94), rgba(14, 15, 18, 0.95));
}

.writing-detail article .writing-detail-body {
  margin: 0;
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.page--writing-detail *,
.page--writing-detail *::before,
.page--writing-detail *::after {
  animation: none !important;
  transition: none !important;
}

.page--writing-detail .reveal,
.page--writing-detail [data-reveal],
.page--writing-detail .pre-reveal,
.page--writing-detail .is-revealed {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transform: translate(-100px, -100px);
  pointer-events: none;
  z-index: 40;
  transition: width 0.14s ease-out, height 0.14s ease-out, border-color 0.14s ease-out;
}
.cursor.active { width: 18px; height: 18px; border-color: rgba(255, 255, 255, 0.85); }

.cursor-trail-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(237, 234, 225, 0.35);
  pointer-events: none;
  z-index: 39;
  opacity: 0;
  transform: translate(-120px, -120px);
  transition: opacity 0.14s ease-out;
}

.film-gate {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  --flicker-opacity: 0.11;
  --flicker-jitter: 0px;
}

.film-gate::before,
.film-gate::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(8px, 1.1vh, 14px);
  opacity: 0;
  background: linear-gradient(180deg, rgba(241, 236, 225, 0.14), rgba(10, 11, 15, 0));
}

.film-gate::after {
  bottom: 0;
  transform: rotate(180deg) translateY(calc(var(--flicker-jitter) * -1));
}

.film-gate::before { top: 0; transform: translateY(var(--flicker-jitter)); }
.film-gate.is-flicker::before,
.film-gate.is-flicker::after { opacity: var(--flicker-opacity); }

.floating-text-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -9;
  overflow: hidden;
}

.floating-text-snippet {
  position: absolute;
  max-width: 22ch;
  font-size: clamp(0.64rem, 0.76vw, 0.86rem);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(235, 232, 225, 0.9);
  opacity: var(--text-opacity, 0.06);
  filter: blur(var(--text-blur, 0.8px));
  transform: translate3d(var(--text-shift-x, 0px), var(--text-shift-y, 0px), 0) rotate(var(--text-rotation, 0deg));
  animation: textDrift var(--text-duration, 6s) ease-in-out infinite alternate;
  transition: transform 1.1s ease, opacity 0.7s ease, filter 0.7s ease;
}

.floating-text-snippet.is-near {
  opacity: 0.12;
  filter: blur(0px);
}

.floating-text-snippet.is-static {
  animation: none;
}

body.slate-flash::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(255, 235, 208, 0.24), transparent 60%);
  animation: fadeFlash 0.4s ease;
  z-index: 9;
}

:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }

.slate.clap { animation: slateClap 0.9s cubic-bezier(0.18, 0.64, 0.18, 1); }

@keyframes introCaretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes slateClap {
  0% { transform: translateX(0) rotate(0); filter: brightness(1); opacity: 1; }
  20% { transform: translateX(2px) rotate(-0.8deg); filter: brightness(1.3); }
  45% { transform: translateX(-2px) rotate(0.5deg); filter: brightness(1.16); }
  100% { transform: translateX(0) rotate(0); filter: brightness(1); opacity: 0.95; }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.998); opacity: 0.985; }
  50% { transform: scale(1); opacity: 1; }
}

@keyframes hazeFloatA {
  from { transform: translate3d(calc(var(--parallax-x) * 0.22 - 1.5%), calc(var(--parallax-y) * 0.22 - 1%), 0) scale(1.02); }
  to { transform: translate3d(calc(var(--parallax-x) * 0.22 + 1%), calc(var(--parallax-y) * 0.22 + 1.2%), 0) scale(1.08); }
}

@keyframes hazeFloatB {
  from { transform: translate3d(calc(var(--parallax-x) * 0.35 - 1.1%), calc(var(--parallax-y) * 0.35 + 1.1%), 0) scale(1.01); }
  to { transform: translate3d(calc(var(--parallax-x) * 0.35 + 1.3%), calc(var(--parallax-y) * 0.35 - 1%), 0) scale(1.06); }
}

@keyframes hazeFloatC {
  from { transform: translate3d(calc(var(--parallax-x) * 0.5 - 0.8%), calc(var(--parallax-y) * 0.5 - 0.8%), 0) scale(1.01); }
  to { transform: translate3d(calc(var(--parallax-x) * 0.5 + 1%), calc(var(--parallax-y) * 0.5 + 0.8%), 0) scale(1.05); }
}

@keyframes lightLeakA {
  0%, 100% { transform: translate3d(calc(var(--parallax-x) * 0.8 - 1%), calc(var(--parallax-y) * 0.8 - 1%), 0) rotate(-1.2deg); }
  50% { transform: translate3d(calc(var(--parallax-x) * 0.8 + 1.4%), calc(var(--parallax-y) * 0.8 + 0.8%), 0) rotate(1.4deg); }
}

@keyframes lightLeakB {
  0%, 100% { transform: translate3d(calc(var(--parallax-x) * 0.95 - 1.2%), calc(var(--parallax-y) * 0.95 + 0.8%), 0); }
  50% { transform: translate3d(calc(var(--parallax-x) * 0.95 + 1.3%), calc(var(--parallax-y) * 0.95 - 1%), 0); }
}

@keyframes grain-drift{
  0% { background-position: 0 0; }
  100% { background-position: -120px -90px; }
}


@supports not (mix-blend-mode: overlay){
  #grain-layer{ mix-blend-mode: soft-light; opacity: 0.3; }
}

@keyframes headingBreath {
  0% { opacity: 0.75; transform: translate3d(0, 0, 0) scale(0.96); }
  55% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes chromaticSettle {
  0% { text-shadow: 2px 0 rgba(255, 118, 118, 0.22), -2px 0 rgba(123, 173, 255, 0.22); }
  100% { text-shadow: 1px 0 rgba(255, 118, 118, 0.15), -1px 0 rgba(123, 173, 255, 0.14); }
}

@keyframes dustFloat {
  0% { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0; }
  22% { opacity: var(--dust-opacity, 0.16); }
  100% { transform: translate3d(var(--dust-drift-x, -6px), var(--dust-drift-y, -54px), 0) scale(1.2); opacity: 0; }
}

@keyframes textDrift {
  0% {
    transform: translate3d(calc(var(--text-shift-x, 0px) - (var(--text-drift-x, 0px) * 0.25)), calc(var(--text-shift-y, 0px) - (var(--text-drift-y, 0px) * 0.25)), 0) rotate(var(--text-rotation, 0deg));
  }
  100% {
    transform: translate3d(calc(var(--text-shift-x, 0px) + var(--text-drift-x, 0px)), calc(var(--text-shift-y, 0px) + var(--text-drift-y, 0px)), 0) rotate(calc(var(--text-rotation, 0deg) * -1));
  }
}

@keyframes echoOut {
  to { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

@keyframes slateLeakA {
  0%, 100% { transform: translate3d(-2%, -1%, 0) scale(1.04); opacity: 0.45; }
  45% { transform: translate3d(3%, 1%, 0) scale(1.1); opacity: 0.65; }
}

@keyframes slateLeakB {
  0%, 100% { transform: translate3d(-8%, -2%, 0) rotate(-2.4deg); opacity: 0.25; }
  55% { transform: translate3d(5%, 1%, 0) rotate(1deg); opacity: 0.55; }
}

@keyframes slateLeakC {
  0%, 100% { transform: translate3d(2%, -2%, 0) scale(1.02); opacity: 0.2; }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.08); opacity: 0.46; }
}

@keyframes fadeFlash {
  from { opacity: 0.9; }
  to { opacity: 0; }
}

@keyframes slateMetaTick {
  0% { opacity: 0.55; transform: translateY(-1px); filter: blur(0.6px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-intensity: 0; }
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; }
  .dream-haze, .dream-leak, #grain-layer { transform: none !important; animation: none !important; }
  .whisper-line { display: none; }
  #load-overlay { transition: opacity 180ms ease, visibility 180ms ease; }
  .slate { animation: none !important; }
  .slate::before,
  .slate::after,
  .slate-glow { opacity: 0.25; }
  .cursor-trail-dot, .film-gate, .dust-layer { display: none !important; }
  .memory-subtitle { transition: none; }
  .floating-text-snippet { transition: opacity 0.5s ease !important; }
  .slate-wrap,
  .slate-wrap.is-collapsed .slate,
  .slate-wordmark { transition: none !important; }
}

@media (max-width: 900px) {
  body.home-page main { padding-top: 2.8rem; }
  .film-grid,
  .writing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .writing-grid .writing-card {
    --slice-count: 2;
    --slice-index: var(--slice-index-2, 0);
  }
}

@media (max-width: 640px) {
  .whisper-line { display: none; }
  .floating-text-snippet {
    max-width: 18ch;
    font-size: 0.68rem;
  }
  .film-grid,
  .writing-grid { grid-template-columns: 1fr; }
  .slate-meta {
    display: grid;
    gap: 0.25rem;
  }
  .slate-meta-item::after { display: none; }
  .writing-grid .writing-card {
    --slice-count: 1;
    --slice-index: 0;
  }
  .writing-grid .writing-composite-cover {
    background-size: 100% 100%, cover;
    background-position: 50% 50%, 50% 50%;
  }
}

@media (pointer: coarse) {
  .work-card-link:hover .work-tile,
  .work-card-link:focus-visible .work-tile,
  .work-card-link:focus-within .work-tile {
    transform: none;
    box-shadow: none;
  }

  .work-card-link:hover .film-image,
  .work-card-link:hover .writing-cover-image,
  .work-card-link:hover .writing-text-cover,
  .work-card-link:hover .writing-composite-cover,
  .work-card-link:hover .thumb-placeholder {
    transform: none;
    filter: brightness(0.95) blur(0);
  }
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .reveal, .reveal-ready, .reveal.is-revealed {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .fog-reveal {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 0.04;
  }
}
