/* ─────────────────────────────────────────
   DESIGN TOKENS
   消失作为设计行为 — the interface is weather
───────────────────────────────────────── */

:root {
  /* Colors — black field, light gray weather */
  --void:          #050505;
  --deep:          #080808;
  --fog:           #101010;
  --ash:           #171717;

  --breath:        #050505;
  --surface:       #0B0B0B;
  --veil:          #121212;

  --ground:        rgba(244, 244, 240, 0.48);

  --fg-dark:       rgba(246, 246, 242, 0.88);
  --fog-text:      rgba(246, 246, 242, 0.36);
  --muted-dark:    rgba(246, 246, 242, 0.22);

  --fg-light:      rgba(246, 246, 242, 0.84);
  --muted-light:   rgba(246, 246, 242, 0.46);
  --faint-light:   rgba(246, 246, 242, 0.22);

  --rule-dark:     rgba(246, 246, 242, 0.06);
  --rule-light:    rgba(246, 246, 242, 0.08);

  /* Typography */
  --font-display:  'Neue Haas Grotesk Display Pro', 'Neue Haas Grotesk Display', 'Neue Haas Display', 'NHaasGroteskDSPro', 'Neue Haas Grotesk Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-sans:     'Neue Haas Grotesk Text', 'Neue Haas Grotesk Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:     'SFMono-Regular', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Spacing */
  --container-max: 840px;

  /* Easing */
  --ease-emerge:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-dissolve: cubic-bezier(0.4, 0, 1, 1);
  --ease-breath:   cubic-bezier(0.45, 0.05, 0.55, 0.95);
}


/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  background: var(--void);
  color: var(--fg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cursor-air-wake {
  position: fixed;
  inset: 0;
  z-index: 85;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.75;
  filter: blur(10px);
}


/* ─────────────────────────────────────────
   REVEAL — scroll-triggered emergence
   Elements with .reveal begin invisible.
   JS adds .is-visible when they enter viewport.
───────────────────────────────────────── */

.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(18px);
  transition:
    opacity 1200ms var(--ease-emerge),
    filter 1200ms var(--ease-emerge),
    transform 1200ms var(--ease-emerge);
  will-change: opacity, filter, transform;
}

.reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.reveal.is-top-exiting {
  transition:
    opacity 160ms linear,
    filter 160ms linear,
    transform 160ms linear;
  will-change: opacity, filter, transform;
}


/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  isolation: isolate;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition:
    opacity 960ms var(--ease-emerge),
    transform 960ms var(--ease-emerge),
    filter 960ms var(--ease-emerge),
    backdrop-filter 700ms ease;
  will-change: opacity, transform, filter;
}

.site-nav.is-receding {
  opacity: 0.08;
  transform: translateY(-14px);
  filter: blur(2px);
  pointer-events: none;
  transition:
    opacity 520ms var(--ease-breath),
    transform 520ms var(--ease-breath),
    filter 520ms var(--ease-breath);
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--fog-text);
  text-decoration: none;
  transition: color 700ms ease;
}

.site-nav.is-light .nav-wordmark {
  color: var(--fg-dark);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--muted-dark);
  text-decoration: none;
  position: relative;
  transition: color 400ms ease;
}

/* Underline grows left→right on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 0.5px;
  background: currentColor;
  transition: width 400ms var(--ease-emerge);
}

.nav-links a:hover::after {
  width: 100%;
}

.site-nav.is-light .nav-links a {
  color: var(--muted-dark);
}

.site-nav.is-light .nav-links a:hover {
  color: var(--fg-dark);
}


/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: visible;
  background: var(--deep);
}

#constellation-viz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  filter: blur(0);
  transition:
    opacity 180ms linear,
    filter 180ms linear;
  will-change: opacity, filter;
}

.hero-text {
  position: absolute;
  bottom: 2.75vh;
  left: 2rem;
  z-index: 10;
  max-width: 520px;
  pointer-events: none;
  opacity: 0;
  filter: blur(0);
  transform: translateY(0);
  transition:
    opacity 1.8s var(--ease-emerge),
    filter 220ms linear,
    transform 220ms linear;
  will-change: opacity, filter, transform;
}

.hero-text.is-visible {
  opacity: 1;
}

.hero-text.is-scroll-exiting {
  transition:
    opacity 180ms linear,
    filter 180ms linear,
    transform 180ms linear;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.32rem, 2.7vw, 2.28rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--fg-dark);
  margin-bottom: 0;
  /* Subtle ambient breath — only the headline */
  animation: ambient-breath 5s var(--ease-breath) infinite;
}

.hero-sub {
  display: none;
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.3vw, 0.875rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--fog-text);
  letter-spacing: 0.02em;
}

/* Scroll hint — gravity fall */
.hero-scroll-hint {
  position: absolute;
  top: calc(100% - 1rem - 52px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 0.5px;
  height: var(--scroll-hint-height, 52px);
  overflow: hidden;
  z-index: 12;
  opacity: var(--scroll-hint-opacity, 1);
  transition:
    height 520ms var(--ease-emerge),
    opacity 520ms var(--ease-emerge);
  will-change: height, opacity;
}

.hero-scroll-hint::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--fog-text) 40%,
    var(--fog-text) 60%,
    transparent 100%
  );
  animation: gravity-fall 2.6s var(--ease-breath) infinite;
}

.hero-scroll-hint.is-extending::after {
  height: 100%;
  opacity: 1;
  transform: none;
  animation: none;
  background: linear-gradient(
    to bottom,
    rgba(246,246,242,0.08),
    rgba(246,246,242,0.42)
  );
}


/* ─────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────── */

/* Hero headline: barely perceptible rise and fall */
@keyframes ambient-breath {
  0%, 100% { opacity: 0.88; }
  50%       { opacity: 1; }
}

/* Scroll hint: light travels downward and disappears */
@keyframes gravity-fall {
  0%   { transform: translateY(-100%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}


/* ─────────────────────────────────────────
   DARK → LIGHT TRANSITION
   Soft landing — gradient bridge between sections
───────────────────────────────────────── */

/* ─────────────────────────────────────────
   LIGHT SECTIONS — shared base
───────────────────────────────────────── */

.intro,
.work,
.writing,
.about,
.site-footer {
  background: var(--breath);
  color: var(--fg-light);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 7rem 2rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 3.5rem;
}


/* ─────────────────────────────────────────
   INTRO
───────────────────────────────────────── */

.intro .container {
  padding-top: 27.2rem;
  padding-bottom: 13.6rem;
  max-width: 640px;
}

.intro-text {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--fg-light);
  margin-bottom: 1.75rem;
}

.intro-text:last-child {
  margin-bottom: 0;
}

.intro-text em {
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.05em;
  color: inherit;
}


/* ─────────────────────────────────────────
   WORK
───────────────────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0;
  position: relative;
  min-height: 720px;
  --instrument-line: rgba(246, 246, 242, 0.10);
  --instrument-strong: rgba(246, 246, 242, 0.22);
  box-shadow:
    inset 0 0 0 0.5px var(--instrument-line),
    0 0 0 0.5px rgba(246, 246, 242, 0.035);
}

.project-grid::before,
.project-grid::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 3;
}

.project-grid::before {
  inset: 0;
  background:
    linear-gradient(to right, transparent calc(50% - 0.25px), var(--instrument-line) calc(50% - 0.25px), var(--instrument-line) calc(50% + 0.25px), transparent calc(50% + 0.25px)),
    linear-gradient(to bottom, transparent calc(50% - 0.25px), var(--instrument-line) calc(50% - 0.25px), var(--instrument-line) calc(50% + 0.25px), transparent calc(50% + 0.25px)),
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) left top / 34px 0.5px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) left top / 0.5px 34px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) right top / 34px 0.5px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) right top / 0.5px 34px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) left bottom / 34px 0.5px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) left bottom / 0.5px 34px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) right bottom / 34px 0.5px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) right bottom / 0.5px 34px no-repeat;
}

.project-grid::after {
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  background:
    radial-gradient(circle, rgba(246,246,242,0.26) 0 0.75px, transparent 1.25px) center / 8px 8px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) center top / 0.5px 16px no-repeat,
    linear-gradient(var(--instrument-strong), var(--instrument-strong)) center bottom / 0.5px 16px no-repeat,
    linear-gradient(90deg, var(--instrument-strong), var(--instrument-strong)) left center / 16px 0.5px no-repeat,
    linear-gradient(90deg, var(--instrument-strong), var(--instrument-strong)) right center / 16px 0.5px no-repeat;
}

.project-card {
  position: relative;
  background: var(--breath);
  border: 0;
  padding: 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  overflow: hidden;
  cursor: default;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0.5px;
  z-index: 0;
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0.5px solid var(--instrument-line);
  pointer-events: none;
}

.project-card > * {
  position: relative;
  z-index: 3;
}

.section-label.reveal {
  filter: none;
  transform: translateY(5px);
  transition:
    opacity 700ms var(--ease-emerge),
    transform 700ms var(--ease-emerge);
}

.section-label.reveal.is-visible {
  filter: none;
}

.project-card.reveal {
  filter: blur(12px);
  transform: translateY(28px) scale(0.995);
  transition:
    opacity 1400ms var(--ease-emerge),
    filter 1400ms var(--ease-emerge),
    transform 1500ms var(--ease-emerge),
    background 500ms ease;
}

.project-card.reveal.is-visible {
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--faint-light);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--fg-light);
}

.project-question {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(246, 246, 242, 0.46);
}

.project-desc {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--muted-light);
  flex: 1;
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--faint-light);
  margin-top: 0.25rem;
}


/* ─────────────────────────────────────────
   WRITING
───────────────────────────────────────── */

.writing-list {
  border-top: 0.5px solid var(--rule-light);
}

.writing-entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 0.5px solid var(--rule-light);
  color: inherit;
  text-decoration: none;
  transition:
    opacity 400ms ease,
    transform 600ms var(--ease-emerge);
}

/* Sibling dimming — hover one, others fade */
.writing-list:hover .writing-entry {
  opacity: 0.4;
}

.writing-list:hover .writing-entry:hover {
  opacity: 1;
  transform: translateX(6px);
}

@media (hover: none) {
  .writing-list:hover .writing-entry,
  .writing-list:hover .writing-entry:hover {
    opacity: 1;
    transform: none;
  }
}

.writing-entry-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.writing-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--fg-light);
  letter-spacing: 0;
}

.writing-desc {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--muted-light);
  max-width: 480px;
}

.writing-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--faint-light);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────
   ARTICLE VIEW
───────────────────────────────────────── */

body.is-article-open {
  overflow: hidden;
}

.article-view {
  --article-shell-max: 1180px;
  --article-gutter: clamp(2.5rem, 7vw, 7.5rem);
  position: fixed;
  inset: 0;
  z-index: 180;
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--void);
  color: var(--fg-light);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: blur(10px);
  transform: translateY(12px);
  transition:
    opacity 700ms var(--ease-emerge),
    visibility 0s linear 700ms,
    filter 900ms var(--ease-emerge),
    transform 900ms var(--ease-emerge);
}

.article-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  filter: blur(0);
  transform: translateY(0);
  transition-delay: 0s;
}

.article-back {
  position: fixed;
  top: 1.5rem;
  left: calc(max(0px, (100vw - var(--article-shell-max)) / 2) + var(--article-gutter));
  z-index: 2;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--fog-text);
  text-decoration: none;
  transition: color 400ms ease, opacity 400ms ease;
}

.article-back:hover {
  color: var(--fg-dark);
}

.article-shell {
  width: min(100%, var(--article-shell-max));
  min-height: 100vh;
  margin: 0 auto;
  padding: 7rem var(--article-gutter) 9rem;
}

.article-head {
  min-height: 62vh;
  display: grid;
  grid-template-rows: auto 1fr;
  border-bottom: 0.5px solid var(--rule-light);
}

.article-kicker {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--faint-light);
}

.article-quote {
  align-self: end;
  max-width: 560px;
  margin-left: clamp(0rem, 8vw, 7rem);
  padding-bottom: 8vh;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.55vw, 2.35rem);
  font-weight: 300;
  font-style: normal;
  line-height: 1.18;
  letter-spacing: 0;
  color: rgba(246, 246, 242, 0.72);
}

.article-body {
  width: min(100%, 680px);
  margin-top: 16vh;
  margin-left: clamp(0rem, 8vw, 7rem);
}

.article-body h1 {
  margin-bottom: 2.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.3vw, 3.1rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--fg-light);
}

.article-subtitle {
  margin-top: -1.5rem;
  margin-bottom: 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  font-weight: 300;
  line-height: 1.32;
  color: rgba(246, 246, 242, 0.58);
}

.article-date {
  margin-bottom: 4.2rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--faint-light);
}

.article-deck {
  margin-bottom: 5.5rem;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.78;
  color: rgba(246, 246, 242, 0.72);
}

.article-body p {
  max-width: 62ch;
  margin-bottom: 1.55rem;
  font-size: clamp(1rem, 1.25vw, 1.13rem);
  font-weight: 400;
  line-height: 1.86;
  color: rgba(246, 246, 242, 0.62);
}

.article-body--poetic p {
  margin-bottom: 2.15rem;
}

.article-credit {
  margin-top: 5.5rem;
  color: rgba(246, 246, 242, 0.76);
}

.article-language-link {
  margin-top: 3.25rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--faint-light);
}

.article-body p:last-child {
  margin-bottom: 0;
}


/* ─────────────────────────────────────────
   ABOUT
───────────────────────────────────────── */

.about-body {
  font-family: var(--font-sans);
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about-body p {
  font-size: 0.875rem;
  line-height: 1.85;
}

.about-quote {
  font-family: inherit;
  font-weight: 400;
  color: var(--fg-light);
  letter-spacing: 0;
}

.about-quote--muted {
  color: rgba(246, 246, 242, 0.42);
}

.about-plain {
  font-family: inherit;
  font-weight: 400;
  color: var(--muted-light);
}

.about-plain--cta {
  color: var(--fg-light);
  border-left: 0.5px solid var(--ground);
  padding-left: 1.25rem;
}


/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */

.site-footer {
  border-top: 0.5px solid var(--rule-light);
}

.site-footer .container {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--faint-light);
}

.footer-links {
  display: flex;
  flex: 1;
  gap: 2rem;
  justify-content: flex-end;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-light);
  text-decoration: none;
  position: relative;
  transition: color 400ms ease;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 0.5px;
  background: currentColor;
  transition: width 400ms var(--ease-emerge);
}

.footer-links a:hover {
  color: var(--fg-light);
}

.footer-links a:hover::after {
  width: 100%;
}


/* ─────────────────────────────────────────
   MOBILE
───────────────────────────────────────── */

@media (max-width: 680px) {

  /* Nav */
  .site-nav {
    padding: 1.1rem 1.25rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  /* Hero */
  .hero-text {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 5.75rem;
    max-width: none;
  }

  .hero-sub br {
    display: none;
  }

  /* Containers */
  .container {
    padding: 4.5rem 1.25rem;
  }

  .intro .container {
    padding-top: 20.4rem;
    padding-bottom: 8.5rem;
  }

  /* Work grid — single column */
  .project-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
    box-shadow: inset 0 0 0 0.5px var(--instrument-line);
  }

  .project-grid::before {
    background:
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) left top / 28px 0.5px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) left top / 0.5px 28px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) right top / 28px 0.5px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) right top / 0.5px 28px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) left bottom / 28px 0.5px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) left bottom / 0.5px 28px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) right bottom / 28px 0.5px no-repeat,
      linear-gradient(var(--instrument-strong), var(--instrument-strong)) right bottom / 0.5px 28px no-repeat;
  }

  .project-grid::after {
    display: none;
  }

  .project-card {
    padding: 2rem 1.5rem;
    border-bottom: 0.5px solid var(--instrument-line);
  }

  .project-card:last-child {
    border-bottom: 0;
  }

  .writing-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem 1.25rem;
    align-items: start;
    padding: 2rem 0;
  }

  .writing-entry-body {
    display: contents;
  }

  .writing-title {
    grid-column: 1;
    grid-row: 1;
  }

  .writing-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .writing-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    padding-top: 0;
  }

  .article-back {
    top: 1.1rem;
    left: 1.25rem;
  }

  .article-shell {
    padding: 6rem 1.25rem 6.5rem;
  }

  .article-head {
    min-height: 55vh;
  }

  .article-quote {
    max-width: none;
    margin-left: 0;
    padding-bottom: 6vh;
    font-size: 1.45rem;
  }

  .article-body {
    width: 100%;
    margin-top: 6rem;
    margin-left: 0;
  }

  /* Writing — disable sibling dimming on touch */
  .writing-list:hover .writing-entry,
  .writing-list:hover .writing-entry:hover {
    opacity: 1;
    transform: none;
  }

  /* About */
  .about-plain--cta {
    padding-left: 1rem;
  }

  /* Footer */
  .site-footer .container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-links {
    gap: 1.25rem;
  }

  .constellation-view-toggle {
    left: 1.25rem !important;
    right: auto !important;
    bottom: 2.25rem !important;
  }
}


/* ─────────────────────────────────────────
   REDUCED MOTION — respect the preference
───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-text,
  .hero-headline {
    animation: none;
  }

  .hero-text {
    opacity: 1;
  }

  .hero-scroll-hint::after {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* ── Constellation toggle override ── */
.constellation-view-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  pointer-events: auto !important;
  font-size: 10px !important;
  font-weight: 300 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.28) !important;
  top: auto !important;
  bottom: calc(2.75vh + 0.3rem) !important;
  right: 2rem !important;
  left: auto !important;
  transform: none !important;
  transform-origin: center center !important;
  inline-size: max-content;
  min-inline-size: 6.7rem;
  max-inline-size: calc(100vw - 4rem);
  min-height: 2rem;
  text-align: center;
  white-space: nowrap;
  padding: 5px 10px;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    color 0.55s var(--ease-breath),
    border-color 0.55s var(--ease-breath),
    opacity 0.55s var(--ease-breath),
    filter 0.55s var(--ease-breath),
    text-shadow 0.55s var(--ease-breath) !important;
}

.constellation-view-toggle:hover {
  color: rgba(255,255,255,0.44) !important;
  border-color: rgba(255,255,255,0.20) !important;
  text-shadow:
    0.012em 0 0 currentColor,
    -0.012em 0 0 currentColor;
  filter: brightness(1.08);
  transform: none !important;
}

@media (max-width: 680px), (hover: none) {
  .constellation-view-toggle {
    left: 1.25rem !important;
    right: auto !important;
    bottom: 2.25rem !important;
    max-inline-size: calc(100vw - 2.5rem);
  }
}

/* === Writing article view — antechamber refinement === */
.article-view {
  --article-inline-indent: 0rem;
  transition:
    opacity 1400ms cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0s linear 1400ms,
    filter 1400ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.article-shell {
  padding: 0 var(--article-gutter) 9rem;
}

.article-antechamber {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
}

.article-antechamber .article-quote {
  position: absolute;
  top: 75vh;
  align-self: auto;
  max-width: clamp(36ch, 48vw, 58ch);
  margin-top: 0;
  margin-left: var(--article-inline-indent);
  padding-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.1vw, 1.85rem);
  font-weight: 300;
  font-style: normal;
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: rgba(235, 235, 230, 0.78);
  opacity: 0;
  transform: translateY(calc(-50% + 10px));
  transition:
    opacity 2600ms var(--ease-emerge),
    transform 2600ms var(--ease-emerge);
}

.article-view.is-active .article-antechamber .article-quote {
  opacity: 1;
  transform: translateY(-50%);
  transition-delay: 800ms;
}

.article-scroll-hint {
  position: absolute;
  left: var(--article-inline-indent);
  bottom: 8vh;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(235, 235, 230, 0.32);
  opacity: 0;
  transition: opacity 1600ms ease-in-out;
}

.article-view.is-active .article-scroll-hint {
  opacity: 0.32;
  transition-delay: 2400ms;
  animation: article-scroll-hint-pulse 4.5s ease-in-out 4s infinite;
}

.article-scroll-hint.is-dismissed {
  opacity: 0 !important;
  animation: none;
  transition: opacity 1200ms ease-in-out;
  transition-delay: 0s;
}

.article-view.is-active .article-scroll-hint.is-dismissed {
  opacity: 0 !important;
  animation: none;
  transition-delay: 0s;
}

@keyframes article-scroll-hint-pulse {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.52; }
}

.article-head {
  display: block;
  min-height: auto;
  margin-left: var(--article-inline-indent);
  padding: clamp(18vh, 22vh, 26vh) 0 clamp(14vh, 18vh, 22vh);
  border-bottom: 0;
}

.article-kicker {
  margin-bottom: clamp(2rem, 4vh, 3rem);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(235, 235, 230, 0.42);
}

.article-title {
  max-width: clamp(14ch, 24vw, 22ch);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: rgba(235, 235, 230, 0.92);
}

.article-head .article-subtitle {
  max-width: 38ch;
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: rgba(235, 235, 230, 0.55);
}

.article-body {
  margin-top: 0;
  margin-left: var(--article-inline-indent);
}

.article-body p,
.article-body--poetic p {
  margin-block: 1.6em;
  color: rgba(235, 235, 230, 0.74);
}

.article-body .article-deck {
  margin-top: 0;
  margin-bottom: 5.5rem;
  color: rgba(235, 235, 230, 0.74);
}

.article-body .article-credit {
  margin-top: 5.5rem;
}

.article-body .article-language-link {
  margin-top: 3.25rem;
  color: var(--faint-light);
}

@media (max-width: 680px) {
  .article-view {
    --article-gutter: 1.25rem;
    --article-inline-indent: 0rem;
  }

  .article-shell {
    padding: 0 var(--article-gutter) 6.5rem;
  }

  .article-antechamber .article-quote {
    max-width: min(100%, 34ch);
    font-size: clamp(1.25rem, 7vw, 1.65rem);
  }

  .article-quote-break {
    display: none;
  }

  .article-head {
    padding: 18vh 0 14vh;
  }

  .article-title {
    max-width: 12ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-antechamber .article-quote,
  .article-view.is-active .article-antechamber .article-quote,
  .article-scroll-hint,
  .article-view.is-active .article-scroll-hint {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* === Project detail view — universal template === */
body.is-project-open {
  overflow: hidden;
}

.project-view {
  position: fixed;
  inset: 0;
  z-index: 180;
  overflow-y: auto;
  background: var(--void);
  color: rgba(235, 235, 230, 0.82);
  opacity: 0;
  visibility: hidden;
  filter: blur(10px);
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 1400ms cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0s linear 1400ms,
    filter 1400ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.project-view.is-active {
  opacity: 1;
  visibility: visible;
  filter: blur(0);
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.project-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(2.5rem, 7vw, 7.5rem);
}

.project-back {
  position: fixed;
  top: clamp(1.5rem, 3vh, 2.25rem);
  left: calc(max(0px, (100vw - 1180px) / 2) + clamp(2.5rem, 7vw, 7.5rem));
  z-index: 190;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(235, 235, 230, 0.55);
  text-decoration: none;
  transition: color 280ms cubic-bezier(0.25, 0.1, 0.1, 1);
}

.project-back:hover {
  color: rgba(235, 235, 230, 0.9);
}

.project-opening {
  min-height: 100vh;
  padding-top: clamp(8vh, 12vh, 14vh);
  padding-bottom: clamp(4vh, 6vh, 8vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.5rem, 4vh, 3.5rem);
}

.project-hero-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 62vh;
  border: 1px dashed rgba(235, 235, 230, 0.12);
  background:
    radial-gradient(circle at 30% 35%, rgba(235, 235, 230, 0.04), transparent 32%),
    linear-gradient(135deg, rgba(235, 235, 230, 0.018), rgba(235, 235, 230, 0.006));
  animation: project-hero-breathe 25s ease-in-out infinite;
}

@keyframes project-hero-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.project-opening-text {
  max-width: 56ch;
  padding-left: clamp(0rem, 4vw, 4rem);
}

.project-view .project-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: rgba(235, 235, 230, 0.94);
}

.project-view .project-tagline {
  max-width: 38ch;
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: rgba(235, 235, 230, 0.6);
}

.project-thesis {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-thesis-text {
  max-width: 40ch;
  margin: 0;
  padding-left: clamp(0rem, 8vw, 7rem);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.002em;
  color: rgba(235, 235, 230, 0.82);
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(4vh, 6vh, 8vh) 0;
  border-top: 1px solid rgba(235, 235, 230, 0.08);
  border-bottom: 1px solid rgba(235, 235, 230, 0.08);
  margin-bottom: clamp(8vh, 14vh, 18vh);
}

.project-fact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-fact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(235, 235, 230, 0.4);
}

.project-fact-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: rgba(235, 235, 230, 0.78);
}

.project-process {
  padding: clamp(6vh, 10vh, 14vh) 0;
}

.project-section-label {
  margin: 0 0 clamp(2.5rem, 5vh, 4rem);
  padding-left: clamp(0rem, 8vw, 7rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(235, 235, 230, 0.38);
}

.project-process-viz {
  width: 100%;
  height: clamp(280px, 38vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(3rem, 6vh, 4.5rem);
  border: 1px dashed rgba(235, 235, 230, 0.1);
  background: rgba(235, 235, 230, 0.01);
}

.project-process-viz svg {
  width: min(86%, 900px);
  height: auto;
  overflow: visible;
}

.project-process-notes {
  max-width: 56ch;
  padding-left: clamp(0rem, 8vw, 7rem);
}

.project-process-notes p,
.project-reflection-text p {
  margin: 0 0 1.6em;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.25vw, 1.13rem);
  font-weight: 300;
  line-height: 1.86;
  color: rgba(235, 235, 230, 0.74);
}

.project-process-notes p:last-child,
.project-reflection-text p:last-child {
  margin-bottom: 0;
}

.project-stills {
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-stills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-left: clamp(0rem, 4vw, 3.5rem);
  padding-right: clamp(0rem, 4vw, 3.5rem);
}

.project-still {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-still-media {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px dashed rgba(235, 235, 230, 0.1);
  background:
    radial-gradient(circle at 50% 38%, rgba(235, 235, 230, 0.035), transparent 34%),
    rgba(235, 235, 230, 0.01);
}

.project-still figcaption {
  max-width: 32ch;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: rgba(235, 235, 230, 0.5);
}

.project-reflection {
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-reflection-text {
  max-width: 62ch;
  padding-left: clamp(0rem, 8vw, 7rem);
}

.project-reflection-text p {
  margin-bottom: 1.8em;
  color: rgba(235, 235, 230, 0.78);
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(10vh, 16vh, 22vh) 0 clamp(6vh, 10vh, 12vh);
  border-top: 1px solid rgba(235, 235, 230, 0.06);
  margin-top: clamp(6vh, 10vh, 14vh);
}

.project-footer-back {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(235, 235, 230, 0.55);
  text-decoration: none;
  transition: color 280ms cubic-bezier(0.25, 0.1, 0.1, 1);
}

.project-footer-back:hover {
  color: rgba(235, 235, 230, 0.9);
}

.project-footer-next {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-decoration: none;
  transition: opacity 280ms cubic-bezier(0.25, 0.1, 0.1, 1);
}

.project-footer-next-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(235, 235, 230, 0.38);
}

.project-footer-next-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: rgba(235, 235, 230, 0.82);
  transition: color 280ms cubic-bezier(0.25, 0.1, 0.1, 1);
}

.project-footer-next:hover .project-footer-next-name {
  color: rgba(235, 235, 230, 1);
}

.project-shell > section {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(8px);
  transition:
    opacity 1400ms var(--ease-emerge),
    filter 1400ms var(--ease-emerge),
    transform 1400ms var(--ease-emerge);
}

.project-shell > section.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.project-shell > section.project-opening {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.project-facts .project-fact,
.project-stills .project-still {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 800ms var(--ease-emerge),
    transform 800ms var(--ease-emerge);
}

.project-facts.is-visible .project-fact,
.project-stills.is-visible .project-still {
  opacity: 1;
  transform: translateY(0);
}

.project-facts.is-visible .project-fact:nth-child(1),
.project-stills.is-visible .project-still:nth-child(1) {
  transition-delay: 0ms;
}

.project-facts.is-visible .project-fact:nth-child(2),
.project-stills.is-visible .project-still:nth-child(2) {
  transition-delay: 120ms;
}

.project-facts.is-visible .project-fact:nth-child(3),
.project-stills.is-visible .project-still:nth-child(3) {
  transition-delay: 240ms;
}

.project-facts.is-visible .project-fact:nth-child(4) {
  transition-delay: 360ms;
}

@media (max-width: 920px) {
  .project-stills-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .project-still-media {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 720px) {
  .project-shell {
    padding: 0 1.25rem;
  }

  .project-back {
    left: 1.25rem;
  }

  .project-opening {
    padding-top: 7rem;
  }

  .project-opening-text,
  .project-thesis-text,
  .project-section-label,
  .project-process-notes,
  .project-reflection-text {
    padding-left: 0;
  }

  .project-facts {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 2rem;
  }

  .project-stills-grid {
    padding-left: 0;
    padding-right: 0;
  }

  .project-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .project-footer-next {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .project-facts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-view,
  .project-shell > section,
  .project-facts .project-fact,
  .project-stills .project-still {
    transition: none;
  }

  .project-view.is-active,
  .project-shell > section,
  .project-facts.is-visible .project-fact,
  .project-stills.is-visible .project-still {
    opacity: 1;
    visibility: visible;
    filter: none;
    transform: none;
  }

  .project-hero-media {
    animation: none;
  }
}

/* === Project detail view — Template A (Product/App) === */
.project-opening--product {
  min-height: 100vh;
  padding-top: clamp(8vh, 12vh, 14vh);
  padding-bottom: clamp(4vh, 6vh, 8vh);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.project-hero-device {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  margin-left: auto;
  margin-right: 0;
  border: 1px dashed rgba(235, 235, 230, 0.12);
  background:
    linear-gradient(180deg, rgba(235, 235, 230, 0.035), transparent 32%),
    radial-gradient(circle at 48% 18%, rgba(235, 235, 230, 0.052), transparent 24%),
    rgba(235, 235, 230, 0.015);
  animation: project-hero-breathe 25s ease-in-out infinite;
}

.project-opening--product .project-opening-text {
  max-width: 32ch;
}

.project-metaphor {
  padding: clamp(8vh, 12vh, 16vh) 0 clamp(4vh, 6vh, 8vh);
}

.project-metaphor-text {
  max-width: 56ch;
  margin: 0;
  padding-left: clamp(0rem, 8vw, 7rem);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.55vw, 1.4rem);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.002em;
  color: rgba(235, 235, 230, 0.78);
}

.project-missing {
  padding: clamp(6vh, 10vh, 14vh) 0;
}

.project-missing-text {
  max-width: 58ch;
  padding-left: clamp(0rem, 8vw, 7rem);
}

.project-missing-text p,
.project-moment-text p {
  margin: 0 0 1.6em;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.25vw, 1.13rem);
  font-weight: 300;
  line-height: 1.86;
  color: rgba(235, 235, 230, 0.74);
}

.project-missing-text p:last-child,
.project-moment-text p:last-child {
  margin-bottom: 0;
}

.project-moments {
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-moments-list {
  display: flex;
  flex-direction: column;
  gap: clamp(8vh, 12vh, 16vh);
  padding-left: clamp(0rem, 4vw, 3.5rem);
  padding-right: clamp(0rem, 4vw, 3.5rem);
}

.project-moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.project-moment:nth-child(even) {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.project-moment:nth-child(even) .project-moment-media {
  order: 2;
}

.project-moment:nth-child(even) .project-moment-text {
  order: 1;
}

.project-moment-media {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border: 1px dashed rgba(235, 235, 230, 0.1);
  background:
    radial-gradient(circle at 50% 20%, rgba(235, 235, 230, 0.045), transparent 28%),
    rgba(235, 235, 230, 0.01);
}

.project-moment-text {
  max-width: 42ch;
}

.project-moment-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: rgba(235, 235, 230, 0.92);
}

.project-moment-text p {
  line-height: 1.78;
  color: rgba(235, 235, 230, 0.72);
}

.project-motion {
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-motion-intro,
.project-architecture-intro {
  max-width: 52ch;
  margin: 0 0 clamp(3.5rem, 6vh, 5rem);
  padding-left: clamp(0rem, 8vw, 7rem);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(235, 235, 230, 0.7);
}

.project-motion-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-left: clamp(0rem, 4vw, 3.5rem);
  padding-right: clamp(0rem, 4vw, 3.5rem);
}

.project-motion-cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.project-motion-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px dashed rgba(235, 235, 230, 0.1);
  background:
    radial-gradient(circle at 50% 50%, rgba(235, 235, 230, 0.04), transparent 30%),
    rgba(235, 235, 230, 0.01);
}

.project-motion-cell figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.project-motion-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.005em;
  color: rgba(235, 235, 230, 0.85);
}

.project-motion-desc {
  max-width: 28ch;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: rgba(235, 235, 230, 0.5);
}

.project-architecture {
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-architecture-intro {
  max-width: 56ch;
}

.project-architecture-diagram {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto clamp(3rem, 5vh, 4rem);
  border: 1px dashed rgba(235, 235, 230, 0.1);
  background: rgba(235, 235, 230, 0.01);
}

.project-architecture-diagram svg {
  width: min(88%, 920px);
  height: auto;
  overflow: visible;
}

.project-architecture-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-left: clamp(0rem, 4vw, 3.5rem);
  padding-right: clamp(0rem, 4vw, 3.5rem);
}

.project-arch-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-arch-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(235, 235, 230, 0.38);
}

.project-arch-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.005em;
  color: rgba(235, 235, 230, 0.88);
}

.project-arch-desc {
  max-width: 22ch;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.65;
  color: rgba(235, 235, 230, 0.5);
}

.project-moments .project-moment,
.project-motion .project-motion-cell,
.project-architecture .project-arch-item {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 1000ms var(--ease-emerge),
    transform 1000ms var(--ease-emerge);
}

.project-moments .project-moment {
  transform: translateY(10px);
  transition-duration: 1200ms;
}

.project-architecture .project-arch-item {
  transform: translateY(6px);
  transition-duration: 900ms;
}

.project-moments.is-visible .project-moment,
.project-motion.is-visible .project-motion-cell,
.project-architecture.is-visible .project-arch-item {
  opacity: 1;
  transform: translateY(0);
}

.project-moments.is-visible .project-moment:nth-child(1),
.project-motion.is-visible .project-motion-cell:nth-child(1),
.project-architecture.is-visible .project-arch-item:nth-child(1) {
  transition-delay: 0ms;
}

.project-architecture.is-visible .project-arch-item:nth-child(2) {
  transition-delay: 100ms;
}

.project-motion.is-visible .project-motion-cell:nth-child(2) {
  transition-delay: 120ms;
}

.project-architecture.is-visible .project-arch-item:nth-child(3) {
  transition-delay: 200ms;
}

.project-moments.is-visible .project-moment:nth-child(2) {
  transition-delay: 220ms;
}

.project-motion.is-visible .project-motion-cell:nth-child(3) {
  transition-delay: 240ms;
}

.project-architecture.is-visible .project-arch-item:nth-child(4) {
  transition-delay: 300ms;
}

.project-motion.is-visible .project-motion-cell:nth-child(4) {
  transition-delay: 360ms;
}

.project-architecture.is-visible .project-arch-item:nth-child(5) {
  transition-delay: 400ms;
}

.project-moments.is-visible .project-moment:nth-child(3) {
  transition-delay: 440ms;
}

@media (max-width: 920px) {
  .project-motion-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .project-architecture-legend {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 820px) {
  .project-opening--product {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .project-hero-device {
    max-width: 280px;
    margin: 0 auto;
  }

  .project-opening--product .project-opening-text {
    max-width: 100%;
    padding-left: 0;
    text-align: left;
  }

  .project-moment,
  .project-moment:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .project-moment:nth-child(even) .project-moment-media,
  .project-moment:nth-child(even) .project-moment-text {
    order: initial;
  }

  .project-moment-media {
    max-width: 220px;
  }
}

@media (max-width: 720px) {
  .project-metaphor-text,
  .project-missing-text,
  .project-motion-intro,
  .project-architecture-intro {
    padding-left: 0;
  }

  .project-moments-list,
  .project-motion-grid,
  .project-architecture-legend {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  .project-motion-grid,
  .project-architecture-legend {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .project-motion-media {
    max-width: 280px;
  }

  .project-architecture-legend {
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-moments .project-moment,
  .project-motion .project-motion-cell,
  .project-architecture .project-arch-item {
    transition: none;
  }

  .project-moments.is-visible .project-moment,
  .project-motion.is-visible .project-motion-cell,
  .project-architecture.is-visible .project-arch-item {
    opacity: 1;
    transform: none;
  }
}

/* === Project detail view — Template B (Interactive Tool) === */
.project-card[href] {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.project-shell--tool {
  max-width: 1240px;
}

.project-opening--tool {
  min-height: 100vh;
  padding-top: clamp(6vh, 9vh, 11vh);
  padding-bottom: clamp(4vh, 6vh, 8vh);
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 4vh, 3.5rem);
}

.project-demo-frame {
  width: 100%;
  height: clamp(420px, 68vh, 720px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(235, 235, 230, 0.1);
  background:
    radial-gradient(circle at 50% 48%, rgba(235, 235, 230, 0.035), transparent 40%),
    rgba(235, 235, 230, 0.015);
}

.project-demo-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
}

.project-demo-frame--placeholder {
  border-style: dashed;
  border-color: rgba(235, 235, 230, 0.12);
}

.project-opening-text--tool {
  max-width: 56ch;
  padding-left: clamp(0rem, 4vw, 4rem);
}

.project-fact-link {
  width: fit-content;
  padding-bottom: 1px;
  text-decoration: none;
  border-bottom: 1px solid rgba(235, 235, 230, 0.18);
  transition:
    border-color 280ms cubic-bezier(0.25, 0.1, 0.1, 1),
    color 280ms cubic-bezier(0.25, 0.1, 0.1, 1);
}

.project-fact-link:hover {
  color: rgba(235, 235, 230, 1);
  border-color: rgba(235, 235, 230, 0.6);
}

.project-try {
  padding: clamp(6vh, 10vh, 14vh) 0;
}

.project-try-intro {
  max-width: 56ch;
  margin: 0 0 clamp(3rem, 5vh, 4rem);
  padding-left: clamp(0rem, 8vw, 7rem);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(235, 235, 230, 0.72);
}

.project-try-list {
  list-style: none;
  margin: 0;
  padding: 0 clamp(0rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vh, 3rem);
}

.project-try-item {
  display: grid;
  grid-template-columns: 60px minmax(0, 0.7fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: baseline;
  padding-bottom: clamp(2rem, 3vh, 2.5rem);
  border-bottom: 1px solid rgba(235, 235, 230, 0.07);
}

.project-try-item:last-child {
  border-bottom: 0;
}

.project-try-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: rgba(235, 235, 230, 0.4);
}

.project-try-action {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.003em;
  color: rgba(235, 235, 230, 0.92);
}

.project-try-detail {
  max-width: 48ch;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  font-weight: 300;
  line-height: 1.78;
  color: rgba(235, 235, 230, 0.7);
}

.project-notes {
  padding: clamp(8vh, 12vh, 16vh) 0;
}

.project-notes-list {
  max-width: 62ch;
  padding-left: clamp(0rem, 8vw, 7rem);
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 5vh, 4rem);
}

.project-note {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.project-note-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.003em;
  color: rgba(235, 235, 230, 0.9);
}

.project-note p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.25vw, 1.13rem);
  font-weight: 300;
  line-height: 1.82;
  color: rgba(235, 235, 230, 0.72);
}

.project-snapshots {
  padding: clamp(6vh, 10vh, 14vh) 0;
}

.project-snapshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-left: clamp(0rem, 4vw, 3.5rem);
  padding-right: clamp(0rem, 4vw, 3.5rem);
}

.project-snapshot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.project-snapshot-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(235, 235, 230, 0.1);
  background:
    radial-gradient(circle at 50% 45%, rgba(235, 235, 230, 0.035), transparent 34%),
    rgba(235, 235, 230, 0.01);
}

.project-snapshot figcaption {
  max-width: 34ch;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: rgba(235, 235, 230, 0.5);
}

.project-try .project-try-item,
.project-notes .project-note,
.project-snapshots .project-snapshot {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 1100ms var(--ease-emerge),
    transform 1100ms var(--ease-emerge);
}

.project-notes .project-note {
  transition-duration: 1200ms;
}

.project-snapshots .project-snapshot {
  transition-duration: 1000ms;
}

.project-try.is-visible .project-try-item,
.project-notes.is-visible .project-note,
.project-snapshots.is-visible .project-snapshot {
  opacity: 1;
  transform: translateY(0);
}

.project-try.is-visible .project-try-item:nth-child(1),
.project-notes.is-visible .project-note:nth-child(1),
.project-snapshots.is-visible .project-snapshot:nth-child(1) {
  transition-delay: 0ms;
}

.project-snapshots.is-visible .project-snapshot:nth-child(2) {
  transition-delay: 140ms;
}

.project-try.is-visible .project-try-item:nth-child(2) {
  transition-delay: 160ms;
}

.project-notes.is-visible .project-note:nth-child(2) {
  transition-delay: 180ms;
}

.project-snapshots.is-visible .project-snapshot:nth-child(3) {
  transition-delay: 280ms;
}

.project-try.is-visible .project-try-item:nth-child(3) {
  transition-delay: 320ms;
}

.project-notes.is-visible .project-note:nth-child(3) {
  transition-delay: 360ms;
}

.project-notes.is-visible .project-note:nth-child(4) {
  transition-delay: 540ms;
}

@media (max-width: 920px) {
  .project-snapshots-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 720px) {
  .project-demo-frame {
    height: clamp(360px, 58vh, 560px);
  }

  .project-opening-text--tool,
  .project-try-intro,
  .project-notes-list {
    padding-left: 0;
  }

  .project-try-list,
  .project-snapshots-grid {
    padding-left: 0;
    padding-right: 0;
  }

  .project-try-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .project-try-num {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-try .project-try-item,
  .project-notes .project-note,
  .project-snapshots .project-snapshot {
    transition: none;
  }

  .project-try.is-visible .project-try-item,
  .project-notes.is-visible .project-note,
  .project-snapshots.is-visible .project-snapshot {
    opacity: 1;
    transform: none;
  }
}

/* === Writing article view — homepage gutter alignment === */
.article-view {
  --article-page-gutter: calc(max(0px, (100vw - var(--container-max)) / 2) + 2rem);
  --article-gutter: var(--article-page-gutter);
}

.article-shell {
  width: 100%;
}

.article-back {
  left: var(--article-page-gutter);
}

@media (max-width: 680px) {
  .article-view {
    --article-page-gutter: 1.25rem;
    --article-gutter: var(--article-page-gutter);
  }

  .article-back {
    left: var(--article-page-gutter);
  }
}

/* === Writing article body — paragraph breathing === */
.article-body p:not(.article-deck),
.article-body--poetic p:not(.article-deck) {
  margin-block: 3.2em;
}

.article-body .article-deck {
  margin-bottom: 3.2em;
}

/* === Writing article body — closing footnote === */
.article-body .article-credit {
  margin-top: clamp(4rem, 8vh, 6rem);
  margin-bottom: 0;
  padding-top: clamp(1.4rem, 3vh, 2rem);
  border-top: 0.5px solid rgba(235, 235, 230, 0.14);
  font-size: clamp(0.78rem, 0.95vw, 0.9rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: rgba(235, 235, 230, 0.42);
}

/* === Writing article nav — ambient recede === */
.article-back {
  transform: translateY(0);
  filter: blur(0);
  will-change: opacity, transform, filter;
  transition:
    color 400ms ease,
    opacity 960ms var(--ease-emerge),
    transform 960ms var(--ease-emerge),
    filter 960ms var(--ease-emerge);
}

.article-back.is-receding {
  opacity: 0.08;
  transform: translateY(-14px);
  filter: blur(2px);
  pointer-events: none;
  transition:
    opacity 520ms var(--ease-breath),
    transform 520ms var(--ease-breath),
    filter 520ms var(--ease-breath);
}

/* === About founder link === */
.about-founder {
  margin-top: clamp(0.6rem, 2vh, 1.25rem);
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  color: rgba(246, 246, 242, 0.42);
}

.about-founder a {
  color: rgba(246, 246, 242, 0.72);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(246, 246, 242, 0.24);
  transition:
    color 360ms var(--ease-emerge),
    border-color 360ms var(--ease-emerge);
}

.about-founder a:hover {
  color: rgba(246, 246, 242, 0.92);
  border-bottom-color: rgba(246, 246, 242, 0.48);
}

/* === Article overlay — isolate homepage underneath === */
body.is-article-open .site-nav,
body.is-article-open > .hero,
body.is-article-open > .intro,
body.is-article-open > .work,
body.is-article-open > .writing,
body.is-article-open > .about,
body.is-article-open > .site-footer {
  opacity: 0;
  pointer-events: none;
}

/* === Writing overview hover refinement === */
.writing-entry {
  filter: blur(0);
  transform: translate3d(0, 0, 0);
  will-change: opacity, transform, filter;
  transition:
    opacity 840ms var(--ease-emerge),
    transform 920ms var(--ease-emerge),
    filter 760ms var(--ease-emerge),
    border-color 900ms var(--ease-emerge);
}

.writing-title,
.writing-desc,
.writing-status {
  transition: color 820ms var(--ease-emerge);
}

@media (hover: hover) and (pointer: fine) {
  .writing-list:hover .writing-entry,
  .writing-list:focus-within .writing-entry {
    opacity: 0.32;
    filter: blur(0.45px);
    transform: translate3d(-2px, 0, 0);
  }

  .writing-list:hover .writing-entry:hover,
  .writing-list:focus-within .writing-entry:focus-visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(8px, -1px, 0);
    border-bottom-color: rgba(246, 246, 242, 0.14);
  }

  .writing-list:hover .writing-entry:hover .writing-title,
  .writing-list:focus-within .writing-entry:focus-visible .writing-title {
    color: rgba(246, 246, 242, 0.92);
  }

  .writing-list:hover .writing-entry:hover .writing-desc,
  .writing-list:focus-within .writing-entry:focus-visible .writing-desc {
    color: rgba(246, 246, 242, 0.58);
  }

  .writing-list:hover .writing-entry:hover .writing-status,
  .writing-list:focus-within .writing-entry:focus-visible .writing-status {
    color: rgba(246, 246, 242, 0.34);
  }

  .writing-entry:focus-visible {
    outline: 0.5px solid rgba(246, 246, 242, 0.16);
    outline-offset: 0.75rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .writing-list:hover .writing-entry,
  .writing-list:hover .writing-entry:hover,
  .writing-list:focus-within .writing-entry,
  .writing-list:focus-within .writing-entry:focus-visible {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .writing-entry,
  .writing-title,
  .writing-desc,
  .writing-status {
    transition-duration: 0.01ms !important;
  }

  .writing-list:hover .writing-entry,
  .writing-list:hover .writing-entry:hover,
  .writing-list:focus-within .writing-entry,
  .writing-list:focus-within .writing-entry:focus-visible {
    filter: none;
    transform: none;
  }
}
