:root {
  --reading-width: 42.5rem;
  --header-height: 3.4rem;
  --font-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --gradient-instagram: linear-gradient(135deg, #F5CF40, #E84037, #CE34CA);
  --home-micrographic-size: 7.2rem;
  --mobile-nav-button-size: calc(var(--home-micrographic-size) / 3);
  --mobile-nav-gap: 0.35rem;
  --mobile-nav-open-space: 2.75rem;
  --mobile-nav-motion-duration: 0.35s;
  --mobile-nav-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mobile-nav-entry-offset: 0.9rem;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

.home-page {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
a {
  transition: color 180ms ease, opacity 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.site-shell {
  min-height: 100vh;
  padding: 1.1rem 2rem 1.75rem;
}

.home-frame {
  position: fixed;
  inset: var(--home-frame-inset, 2%);
  --frame-edge-inset: var(--home-frame-inset, 2%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--home-frame-radius, 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  --frame-nav-gap: var(--home-nav-gap, 0.5rem);
  --frame-nav-indent: calc(1.15rem + var(--frame-nav-gap));
}

.frame-header {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: var(--home-nav-inset, 1rem);
  gap: 0.9rem;
  --frame-nav-gap: var(--home-nav-gap, 0.5rem);
  --frame-nav-indent: calc(1.15rem + var(--frame-nav-gap));
}

.frame-header--home {
  flex: 0 0 auto;
}

.frame-header--work,
.frame-header--project {
  flex: 0 0 auto;
  align-items: flex-start;
}

.frame-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: var(--frame-nav-gap);
}

.frame-nav__left {
  display: flex;
  align-items: center;
  gap: var(--frame-nav-gap);
  flex-wrap: wrap;
  min-width: 0;
}

.frame-nav__spinner {
  display: inline-flex;
  align-items: center;
  width: var(--header-nametag-size, 1.55rem);
  height: var(--header-nametag-size, 1.55rem);
  flex: 0 0 auto;
}

.frame-nav__spinner .header-nametag-wrap {
  width: 100%;
  height: 100%;
}

.frame-nav__spinner .header-nametag {
  filter:
    drop-shadow(-0.06rem -0.05rem 0.12rem rgba(160, 160, 160, 0.18)) drop-shadow(0.08rem -0.04rem 0.1rem rgba(160, 160, 160, 0.12)) drop-shadow(0 0.08rem 0.12rem rgba(160, 160, 160, 0.1));
}

.pill-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--frame-nav-gap);
}

.pill-row--scrollable {
  min-width: 0;
}

.frame-nav__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: var(--home-nav-button-padding, 0.45rem 0.9rem);
  border: 1px solid var(--line);
  border-radius: var(--home-nav-button-radius, 999px);
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  background: transparent;
  white-space: nowrap;
}

.frame-nav__pill.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.frame-nav__pill:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.frame-nav__pill--social {
  color: var(--social-btn-color, #FFFFFF);
  border-color: var(--social-btn-border, #FFFFFF);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}

.frame-nav__pill--social:hover {
  background: var(--pill-hover-bg, #FFFFFF);
  color: var(--bg);
}

.frame-nav__social-arrow {
  display: inline-block;
  font-size: 1.25em;
  line-height: 1;
  margin-left: 0.2em;
  transform: translateY(-0.02em);
  transition: transform 0.2s ease;
}

.frame-nav__pill--social:hover .frame-nav__social-arrow {
  transform: translate(0.05em, -0.05em);
}

.frame-mobile-nav {
  position: static;
}

.frame-mobile-nav__toggle,
.frame-mobile-nav__theme-toggle {
  position: absolute;
  bottom: var(--home-nav-inset, 1rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mobile-nav-button-size);
  min-width: var(--mobile-nav-button-size);
  height: var(--mobile-nav-button-size);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(var(--mobile-nav-entry-offset));
  transition:
    opacity 0.22s ease,
    transform var(--mobile-nav-motion-duration) var(--mobile-nav-motion-ease),
    visibility 0s linear var(--mobile-nav-motion-duration);
}

.frame-mobile-nav__toggle {
  right: var(--home-nav-inset, 1rem);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.frame-mobile-nav__theme-toggle {
  right: calc(var(--home-nav-inset, 1rem) + var(--mobile-nav-button-size) + var(--mobile-nav-gap, 0.35rem));
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.frame-mobile-nav__theme-toggle .theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin-right: 0;
  font-size: 1.55rem;
  line-height: 1;
}

/* Instagram Gradient Border-on-Hover Utility */
.btn-instagram-fill {
  position: relative;
  z-index: 1;
  background: transparent !important;
  color: var(--social-btn-color, #FFFFFF) !important;
  border: 1px solid var(--social-btn-border, #FFFFFF) !important;
  transition: border-color 0.15s ease, color 0.15s ease !important;
}

.btn-instagram-fill::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--home-nav-button-radius, 999px);
  border: 1px solid transparent;
  background: 
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(to right, #F5CF40 0%, #E84037 25%, #CE34CA 50%, #E84037 75%, #CE34CA 100%) border-box;
  background-size: 200% 100%;
  background-position: 100% 0;
  opacity: 0;
  transition: opacity 0.15s ease, background-position 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-instagram-fill:hover {
  border-color: transparent !important;
  color: var(--social-btn-hover-color, #FFFFFF) !important;
}

.btn-instagram-fill:hover::before {
  opacity: 1;
  background-position: 0% 0;
}

/* Theme Toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  font-family: 'Michroma', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  line-height: 1;
  transition: color 180ms ease, opacity 220ms ease, transform 220ms ease, bottom 220ms ease;
  align-self: center;
}

.theme-toggle:hover {
  color: var(--theme-toggle-hover-color, #FFFFFF);
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  font-size: 1.45em;
  line-height: 1;
  margin-right: 0.45rem;
  font-family: system-ui, -apple-system, sans-serif;
  transform: translate(0em, -0.1em);
}

.theme-toggle--center {
  margin-left: auto;
  margin-right: auto;
  opacity: 1;
}

@media (min-width: 961px) {
  .theme-toggle--center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
}

.theme-toggle--center.is-mobile-hidden {
  display: none;
}

@media (max-width: 640px) {
  .theme-toggle--center {
    display: none;
  }
}

/* Smooth Theme Transition */
body,
.home-frame,
.frame-divider,
.site-rule,
h1, h2, h3, h4, h5, h6,
p,
span,
strong,
li,
figcaption,
.nav-panel__label,
.nav-item-link,
.work-card,
.work-card__tag,
.project-view__tag,
.home-micrographic {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, border-top-color 0.4s ease;
}

.frame-divider {
  width: 100%;
  border-top: 1px dashed var(--line);
}

.pill-row--indented {
  width: calc(100% - var(--frame-nav-indent));
  margin-left: var(--frame-nav-indent);
}

@media (max-width: 640px) {
  .pill-row--scrollable {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pill-row--scrollable::-webkit-scrollbar {
    display: none;
  }
}

.frame-header--project .pill-row--indented {
  margin-top: 0.1rem;
}

.project-frame {
  display: flex;
  flex-direction: column;
}

.work-frame,
.writing-frame {
  display: flex;
  flex-direction: column;
}

.work-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1rem 1.25rem;
}

.work-list__inner {
  width: 100%;
}

@media (max-width: 960px) {
  .work-list__inner {
    width: 100%;
  }

  .work-list {
    width: 100%;
  }
}

@media (min-width: 961px) {
  .work-list__inner {
    width: min(50%, 56rem);
    margin-inline: auto;
  }
}

.project-splash {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  padding-top: 1rem;
  width: 100%;
}

.project-splash__headline {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
}

.project-view__year--small {
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-splash__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.project-splash__hero picture,
.project-splash__hero img,
.project-splash__hero video,
.project-splash__hero iframe {
  width: 100%;
  height: 100%;
}

.project-splash__hero picture,
.project-splash__hero video,
.project-splash__hero iframe {
  display: block;
}

.project-splash__hero img,
.project-splash__hero video {
  object-fit: contain;
  display: block;
}

.project-splash__hero iframe {
  border: 0;
}

.project-detail,
.writing-detail {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1rem clamp(2.25rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-grid--writing {
  min-height: auto;
  padding-top: 0;
  gap: 1.5rem;
}

/* Back link: hidden by default, revealed at mobile breakpoint */
.writing-back-link {
  display: none;
}

.writing-frame .site-nav {
  padding-left: var(--frame-nav-indent);
}

.writing-frame .nav-panel__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 0.25rem;
}

.writing-frame .nav-item-link {
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
}

@media (max-width: 960px) {
  .writing-frame .site-nav {
    padding-left: 0;
  }
}

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

.work-card+.work-card {
  margin-top: 1.2rem;
}

.work-card__hero {
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.work-card__hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.8rem;
  padding: 0.55rem 0.2rem 0;
}

.work-card__title {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--text);
}

.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.work-card__tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
  color: var(--text);
}

.home-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.home-strip {
  width: 100%;
  height: var(--home-strip-height, 30%);
  overflow: hidden;
  padding: var(--home-strip-padding, 0);
}

.home-strip__track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: home-strip-scroll var(--home-strip-speed, 44s) linear infinite;
}

.home-strip__item {
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
}

.home-strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-micrographic {
  position: absolute;
  left: var(--home-nav-inset, 1rem);
  bottom: var(--home-nav-inset, 1rem);
  z-index: 5;
  width: var(--home-micrographic-size);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: 'Michroma', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  pointer-events: none;
  animation: micrographic-reveal 15s ease-out 5s forwards;
  opacity: 0;
  /* Smooth theme transitions for borders and backgrounds */
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

@keyframes micrographic-reveal {
  from { opacity: 0; }
  to   { opacity: 0.7; }
}

.micro-row {
  flex: 1;
  display: flex;
  box-sizing: border-box;
}

/* Horizontal border lines dividing the rows */
.micro-row--1,
.micro-row--2 {
  border-bottom: 1px solid var(--line);
  /* Smooth theme transitions for dividing borders */
  transition: border-color 0.4s ease;
}

.micro-row--1 .micro-box--recycle,
.micro-row--2 .micro-box--punchout {
  width: 33.33%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.recycle-symbol {
  font-size: 2.0rem;
  line-height: 1;
  font-family: system-ui, -apple-system, sans-serif;
  transform: translateY(-0.02em);
}

.micro-row--1 .micro-box--learn-apply,
.micro-row--2 .micro-box--online-since {
  width: 66.66%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 0.5rem;
  box-sizing: border-box;
}

.micro-box--punchout {
  background: var(--text);
  color: var(--bg);
  height: 100%;
  font-weight: bold;
  font-size: 0.88rem;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Smooth theme transition for backgrounds */
  transition: background-color 0.4s ease, color 0.4s ease;
}

.micro-row--3 {
  flex-direction: column;
}

.micro-row--3 .micro-box--assembled,
.micro-row--3 .micro-box--seoul {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  box-sizing: border-box;
}

.micro-row--3 .micro-box--assembled {
  border-bottom: 1px solid var(--line);
  /* Smooth theme transitions for dividing borders */
  transition: border-color 0.4s ease;
}

.micro-text-row {
  line-height: 1.45;
  font-weight: 500;
  text-transform: uppercase;
}

.home-micro-text {
  position: absolute;
  right: var(--home-nav-inset, 1rem);
  bottom: var(--home-nav-inset, 1rem);
  z-index: 5;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: right;
  letter-spacing: -0.01em;
  pointer-events: none;
  animation: micrographic-reveal 15s ease-out 5s forwards;
  opacity: 0;
  transform: translateY(var(--home-micro-text-shift, 0));
  transition:
    transform var(--mobile-nav-motion-duration) var(--mobile-nav-motion-ease),
    color 0.4s ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

.site-header__bar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 0.65rem;
}

.site-header__name,
.site-header__clock,
.project-view__title,
.article-view__title {
  font-family: var(--font-sans);
}

.site-header__name {
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.site-header__name-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}

.header-nametag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: var(--header-nametag-size, 1.55rem);
  height: var(--header-nametag-size, 1.55rem);
  flex: 0 0 auto;
  perspective: 420px;
  transform-style: preserve-3d;
  isolation: isolate;
  animation: header-nametag-drift 7.5s ease-in-out infinite alternate;
}

.header-nametag-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.header-nametag-wrap::before {
  content: "";
  position: absolute;
  inset: -0.45rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 22%, rgba(160, 160, 160, 0.28), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(160, 160, 160, 0.24), transparent 32%),
    radial-gradient(circle at 55% 82%, rgba(160, 160, 160, 0.2), transparent 38%);
  filter: blur(10px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

.header-nametag {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  background: transparent;
  filter:
    drop-shadow(-0.1rem -0.08rem 0.18rem rgba(160, 160, 160, 0.18)) drop-shadow(0.12rem -0.05rem 0.16rem rgba(160, 160, 160, 0.14)) drop-shadow(0 0.12rem 0.18rem rgba(160, 160, 160, 0.12));
}

.site-header__clock {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.site-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.site-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 22%) minmax(0, 1fr);
  gap: 2.25rem;
  min-height: calc(100vh - var(--header-height) - 2.5rem);
  padding-top: 1.7rem;
}

.site-nav,
.site-main {
  min-height: 0;
}

.site-nav {
  position: sticky;
  top: calc(var(--header-height) + 1.6rem);
  align-self: start;
}

.nav-panel,
.main-panel {
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.nav-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: calc(100vh - var(--header-height) - 3.5rem);
  padding: 0;
}

.nav-panel__section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nav-panel__section--bottom {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 0;
}

.nav-panel__label,
.nav-item-link__meta {
  display: none;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.nav-list--compact {
  gap: 0.9rem;
}

.nav-list--nested {
  gap: 0.9rem;
  margin-top: 1rem;
  padding-left: 0.95rem;
}

.nav-list--writing {
  gap: 1.35rem;
}

.nav-series-item {
  display: flex;
  flex-direction: column;
}

.nav-series-inline {
  display: flex;
  flex-direction: column;
}

.nav-series-inline__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.05;
  list-style: none;
  width: 100%;
}

.nav-series-inline__summary::-webkit-details-marker {
  display: none;
}

.nav-series-inline__title {
  min-width: 0;
  flex: 1 1 auto;
  font-size: inherit;
}

.nav-series-inline__arrow {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.8em;
  line-height: 1;
  transform: translateY(-0.02em);
  transition: transform 180ms ease;
}

.nav-series-inline[open] .nav-series-inline__arrow {
  transform: rotate(180deg) translateY(0.02em);
}

.nav-item-link,
.nav-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(1.15rem, 1.8vw, 1.65rem);
  line-height: 1.05;
}

.writing-frame .nav-item-link,
.writing-frame .nav-series-inline__summary {
  font-size: 0.95rem;
  line-height: 1.25;
}

.writing-frame .nav-list--nested .nav-item-link {
  font-size: 0.86rem;
  line-height: 1.25;
}

.nav-item-link--series {
  align-items: baseline;
  gap: 0.6rem;
}

.nav-item-link__unit {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.45;
  min-width: 1rem;
  text-align: right;
}

.nav-item-link:hover,
.nav-back-link:hover,
.nav-item-link.is-active,
.nav-back-link.is-active {
  color: var(--text);
}

.nav-item-link.is-active {
  font-weight: 400;
}

.main-panel {
  min-height: calc(100vh - var(--header-height) - 3.5rem);
  padding: 0;
  overflow: visible;
}

.main-panel__inner {
  min-height: 100%;
}

.project-view {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.project-view__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.project-view__title,
.article-view__title {
  margin: 0;
  font-size: clamp(2.05rem, 3vw, 3.15rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.project-view__year,
.article-view__meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.project-view__description,
.project-view__body,
.article-view__lede,
.article-view__body {
  font-size: 1rem;
  line-height: 1.75;
}

.project-view__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-view__tag {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-view__tag::before {
  content: "#";
}

.project-view__link {
  width: fit-content;
}

.project-body-img {
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1rem auto;
}

.project-body-img picture {
  display: block;
  width: 100%;
}

.project-body-img img {
  display: block;
  width: 100%;
  height: auto;
}

.project-body-img--sm {
  max-width: 28rem;
}

.project-body-img--md {
  max-width: 44rem;
}

.project-body-img--crop {
  aspect-ratio: 16 / 9;
}

.project-body-img--crop img {
  height: 100%;
  object-fit: cover;
}

.project-body-video {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  margin: 1rem 0;
}

.project-view--grid-lanes {
  gap: 1rem;
}

.project-view--stickers {
  gap: 1rem;
}

.sticker-stage {
  position: relative;
  min-height: 36rem;
  margin: 0.2rem 0 0.6rem;
  overflow: hidden;
}

.sticker-stage__canvas {
  width: 100%;
  height: 100%;
  min-height: 36rem;
}

.sticker-stage__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sticker-stage__overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 0.2rem;
  pointer-events: none;
}

.sticker-stage__eyebrow,
.sticker-stage__note {
  margin: 0;
}

.sticker-stage__eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sticker-stage__note {
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.lane-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  grid-auto-flow: row;
}

@supports (display: grid-lanes) {
  .lane-gallery {
    display: grid-lanes;
    grid-auto-flow: unset;
    flow-tolerance: 1em;
  }
}

.lane-card {
  margin: 0;
  break-inside: avoid;
}

.lane-card img,
.lane-card video,
.lane-card iframe {
  width: 100%;
  height: auto;
  display: block;
  background: #d6d3ce;
}

.lane-card iframe {
  min-height: 24rem;
  border: 0;
}

.lane-card figcaption {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
}

.lane-card--span-2 {
  grid-column: span 2;
}

.lane-card--span-3 {
  grid-column: span 3;
}

.carousel {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.carousel__track {
  position: relative;
  min-height: 28rem;
}

.carousel__slide {
  display: none;
}

.carousel__slide.is-active {
  display: block;
}

.carousel__slide-inner {
  padding: 0;
}

.carousel__slide img,
.carousel__slide video,
.carousel__slide iframe {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--text);
}

.carousel__slide iframe {
  height: 520px;
}

.carousel__controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.carousel__buttons,
.carousel__dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  pointer-events: auto;
}

.carousel__button,
.carousel__dot {
  border: 1px solid rgba(242, 238, 231, 0.44);
  background: rgba(28, 28, 28, 0.78);
  color: var(--text);
  border-radius: 999px;
}

.carousel__button {
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

.carousel__dot {
  width: 0.72rem;
  height: 0.72rem;
  padding: 0;
  cursor: pointer;
}

.carousel__dot.is-active {
  background: var(--text);
}

.article-view {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.article-view__meta {
  margin-bottom: 1rem;
}

.article-view__series-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-view__lead-image {
  margin: 1.25rem 0 0;
}

.article-view__lead-media {
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.article-view__lead-media picture,
.article-view__lead-media img {
  width: 100%;
  display: block;
}

.article-view__lead-media img {
  height: auto;
}

.article-view__lead-caption {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.article-view__lead-caption a {
  color: inherit;
}

.article-view__body h1,
.article-view__body h2,
.article-view__body h3 {
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-family: var(--font-serif);
}

.article-view__body h2 {
  margin-top: 2.5rem;
}

.article-view__body blockquote {
  margin: 2rem 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.15rem;
}

.article-view__body pre {
  overflow-x: auto;
  padding: 1rem;
  background: #151515;
  color: var(--text);
}

.article-view__body code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.article-toc {
  margin: 0 0 2rem;
}

.article-toc .accordion__summary {
  font-size: 0.9rem;
  font-weight: 600;
}

.article-toc__nav {
  font-size: 0.92rem;
}

.article-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.article-toc__item--level-3 {
  padding-left: 1rem;
}

.article-toc__link {
  color: var(--muted);
  text-decoration: none;
}

.article-toc__link:hover {
  color: var(--text);
}

.article-view__footer {
  margin-top: 2.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.article-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.article-pagination__link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
}

.article-pagination__link:hover {
  border-color: var(--text);
}

.article-pagination__link--next {
  text-align: right;
  align-items: flex-end;
  grid-column: 2;
}

.article-pagination__label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-pagination__title {
  font-size: 1rem;
  line-height: 1.25;
}

.accordion {
  margin: 1.75rem 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.accordion__summary::-webkit-details-marker {
  display: none;
}

.accordion__summary::after {
  content: "▾";
  font-size: 0.8em;
  line-height: 1;
  transition: transform 180ms ease;
}

.accordion[open] .accordion__summary::after {
  transform: rotate(180deg);
}

.accordion__content {
  padding: 0 1.1rem 1rem;
}

.accordion__content > :first-child {
  margin-top: 0;
}

.accordion__content > :last-child {
  margin-bottom: 0;
}

.empty-state {
  color: var(--muted);
}

.redirect-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--bg);
  color: var(--text);
}

.redirect-card {
  max-width: 30rem;
  text-align: center;
}

[data-animate="main"] {
  opacity: 0;
}

.about-frame {
  display: flex;
  flex-direction: column;
}

.home-test-frame {
  display: block;
  position: fixed;
  --bg: #080808;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.62);
  --accent: #ffffff;
  --pill-hover-bg: rgba(255, 255, 255, 0.94);
  --pill-hover-border: rgba(255, 255, 255, 0.94);
  --social-btn-color: #ffffff;
  --social-btn-border: rgba(255, 255, 255, 0.85);
  --social-btn-hover-color: #ffffff;
  --theme-toggle-hover-color: #ffffff;
}

/* Mobile nav drawer panel: reset to theme tokens, not the home-frame's video-bg palette.
   The toggle buttons are excluded — they sit against the video and need to stay bright. */
[data-theme="dark"] .home-test-frame .frame-mobile-nav__panel,
:root .home-test-frame .frame-mobile-nav__panel {
  --bg: #0c0c0c;
  --text: #A0A0A0;
  --muted: #A0A0A0;
  --line: #A0A0A0;
}

[data-theme="light"] .home-test-frame .frame-mobile-nav__panel {
  --bg: #F2F2F2;
  --text: #0C0C0C;
  --muted: #4A4A4A;
  --line: #7A7A7A;
}

.home-test-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  isolation: isolate;
}

.home-test-stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.home-test-stage__overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.home-test-stage__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.16);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.18) 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.18) 82%, transparent 100%);
}

.home-test-stage__overlay--top {
  top: 0;
  height: 9%;
  min-height: 4.2rem;
}

.home-test-stage__overlay--bottom {
  bottom: 0;
  height: 9%;
  min-height: 4.2rem;
}

.home-test-stage__overlay--bottom::before {
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.18) 82%, transparent 100%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.18) 82%, transparent 100%);
}

.home-test-frame .frame-nav__spinner .header-nametag-wrap::before {
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.4), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.32), transparent 32%),
    radial-gradient(circle at 55% 82%, rgba(255, 255, 255, 0.28), transparent 38%);
}

.home-test-frame .frame-nav__spinner .header-nametag {
  filter:
    drop-shadow(-0.1rem -0.08rem 0.18rem rgba(255, 255, 255, 0.22)) drop-shadow(0.12rem -0.05rem 0.16rem rgba(255, 255, 255, 0.18)) drop-shadow(0 0.12rem 0.18rem rgba(255, 255, 255, 0.16));
}

.home-test-frame__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: auto;
}

.about-container {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  max-width: 46rem;
  width: 100%;
}

.about-layout__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-card__title {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 400;
  color: var(--text);
}

.about-card__subtitle {
  margin: -0.8rem 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.about-card__body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.about-card__body p {
  margin: 0;
}

.about-layout__image {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
}

.about-layout__image picture,
.about-layout__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .about-container {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 1.25rem;
    padding-left: var(--frame-nav-indent, 1rem);
    padding-right: var(--frame-nav-indent, 1rem);
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-layout__image {
    order: -1;
    height: 16rem;
  }

  .about-layout__image img {
    object-position: center 45%;
  }
}

/* ─── Story Viewer ──────────────────────────────────────────────────────── */

.about-container:has(.story-viewer) {
  padding: 0;
  align-items: stretch;
  justify-content: center;
}

.story-viewer {
  position: relative;
  height: calc(100vh - var(--header-height, 3.4rem) - 6rem);
  max-height: 85svh;
  width: auto;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  margin: 1.5rem auto 3rem;
}

/* Progress bars */
.story-viewer__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 0;
  pointer-events: none;
}

.story-viewer__progress-track {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.story-viewer__progress-fill {
  height: 100%;
  width: 100%;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(var(--story-progress, 0));
  will-change: transform;
}

.story-viewer__progress-fill.is-complete {
  transform: scaleX(1);
}

/* Header (avatar + name) */
.story-viewer__header {
  position: absolute;
  top: 2rem;
  left: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  pointer-events: none;
}

.story-viewer__avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  display: block;
  flex-shrink: 0;
}

.story-viewer__name {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  white-space: nowrap;
  padding-top: 0.15rem;
}

/* Slides */
.story-viewer__slides {
  position: absolute;
  inset: 0;
}

.story-viewer__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.story-viewer__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.story-viewer__slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.story-viewer__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Caption */
.story-viewer__caption-scrim {
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  pointer-events: none;
}

.story-viewer__caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1rem;
  right: 1rem;
  margin: 0;
  color: #fff;
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  z-index: 5;
}

/* Tap zones */
.story-viewer__tap {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 20;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.story-viewer__tap--prev  { left: 0; width: 30%; }
.story-viewer__tap--pause { left: 30%; width: 40%; }
.story-viewer__tap--next  { right: 0; width: 30%; }

/* Pause indicator */
.story-viewer__pause-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  display: flex;
  gap: 5px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.story-viewer__pause-indicator.is-visible {
  opacity: 1;
}

.story-viewer__pause-indicator span {
  display: block;
  width: 5px;
  height: 26px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
}

/* Responsive — short viewports / mobile */
@media (max-width: 600px) {
  .about-container:has(.story-viewer) {
    align-items: center;
  }

  .story-viewer {
    height: auto;
    width: 100%;
    max-height: calc(100svh - var(--header-height, 3.4rem) - 4rem);
  }
}

/* ─────────────────────────────────────────────────────────────────────────── */

@keyframes header-nametag-drift {
  0% {
    transform: rotateX(-10deg) rotateY(-14deg) rotateZ(-4deg);
  }

  50% {
    transform: rotateX(8deg) rotateY(10deg) rotateZ(3deg) translateY(-0.02rem);
  }

  100% {
    transform: rotateX(-6deg) rotateY(16deg) rotateZ(-2deg) translateY(0.03rem);
  }
}

@keyframes home-strip-scroll {
  from {
    transform: translateX(0);
  }

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

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

@media (max-width: 969px) {
  .theme-toggle--center {
    position: fixed;
    left: 50%;
    bottom: calc(var(--frame-edge-inset, var(--home-frame-inset, 2%)) + var(--home-nav-inset, 1rem) + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    margin: 0;
    z-index: 40;
  }

  .home-frame {
    inset: 1.25rem;
    --frame-edge-inset: 1.25rem;
  }

  .frame-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem 0.5rem;
  }

  .frame-nav__left {
    justify-self: start;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .pill-row--primary {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pill-row--primary::-webkit-scrollbar {
    display: none;
  }

  .frame-nav__right {
    justify-self: end;
    min-width: 0;
  }

  .home-strip {
    height: clamp(10rem, 26vw, 18rem);
  }

  .site-shell {
    padding: 1rem 1.25rem 1.5rem;
  }

  .site-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .site-nav {
    position: static;
  }

  .nav-panel,
  .main-panel {
    min-height: auto;
  }

  .nav-panel {
    gap: 1.25rem;
  }

  .nav-list {
    gap: 0.85rem;
  }

  .nav-series-inline__summary,
  .accordion__summary {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .nav-series-inline__summary {
    justify-content: space-between;
  }

  .nav-series-inline__title {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-series-inline[open] {
    margin-bottom: 1.1rem;
  }

  .nav-series-inline__arrow,
  .accordion__summary::after {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .article-pagination {
    grid-template-columns: 1fr;
  }

  .article-pagination__link--next {
    text-align: left;
    align-items: flex-start;
  }

  .carousel__track {
    min-height: 16rem;
  }

  .sticker-stage,
  .sticker-stage__canvas {
    min-height: 26rem;
  }

  .project-view__header {
    flex-direction: column;
  }

  .project-splash {
    padding-top: 0.75rem;
  }

  .writing-detail {
    padding-bottom: 2rem;
  }
}

@media (max-width: 640px) {
  .home-frame {
    inset: 0.85rem;
    --frame-edge-inset: 0.85rem;
    transition: inset var(--mobile-nav-motion-duration) var(--mobile-nav-motion-ease), background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  }

  .home-frame[data-mobile-nav-open="true"],
  .home-frame.is-mobile-nav-open {
    inset: 0.85rem 0.85rem calc(0.85rem + var(--mobile-nav-open-space)) 0.85rem;
    overflow: visible;
  }

  .home-frame[data-mobile-nav-open="true"] .home-stage,
  .home-frame.is-mobile-nav-open .home-stage {
    transform: translateY(calc(var(--mobile-nav-open-space) / 2));
  }

  .is-mobile-nav-open .work-list,
  .is-mobile-nav-open .project-detail,
  .is-mobile-nav-open .about-container,
  .is-mobile-nav-open .writing-detail,
  [data-mobile-nav-open="true"] .work-list,
  [data-mobile-nav-open="true"] .project-detail,
  [data-mobile-nav-open="true"] .about-container,
  [data-mobile-nav-open="true"] .writing-detail {
    border-bottom-left-radius: var(--home-frame-radius);
    border-bottom-right-radius: var(--home-frame-radius);
  }

  .frame-nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 0.35rem;
  }

  .pill-row--primary {
    display: none;
  }

  .frame-nav__pill {
    padding: 0.35rem 0.7rem;
    min-height: 1.75rem;
    font-size: 0.85rem;
  }

  .frame-nav__spinner {
    width: calc(var(--header-nametag-size, 1.55rem) * 0.88);
    height: calc(var(--header-nametag-size, 1.55rem) * 0.88);
  }

  .frame-header {
    padding: 0.75rem;
    gap: 0.75rem;
    --frame-nav-gap: 0.35rem;
  }

  .frame-mobile-nav__toggle,
  .frame-mobile-nav__theme-toggle {
    opacity: 0.82;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
      opacity 0.22s ease,
      transform var(--mobile-nav-motion-duration) var(--mobile-nav-motion-ease),
      visibility 0s linear 0s;
  }

  .home-micro-text {
    --home-micro-text-shift: calc(100% - var(--home-micrographic-size));
  }

  .frame-mobile-nav__icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.22rem;
    width: 1rem;
  }

  .frame-mobile-nav__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .frame-mobile-nav__panel {
    position: fixed;
    left: var(--home-nav-inset, 1rem);
    right: var(--home-nav-inset, 1rem);
    bottom: var(--home-nav-inset, 1rem);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    max-height: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1.2rem);
    pointer-events: none;
    transition:
      opacity 0.22s ease,
      transform var(--mobile-nav-motion-duration) var(--mobile-nav-motion-ease),
      visibility 0s linear var(--mobile-nav-motion-duration);
  }

  .frame-mobile-nav.is-open .frame-mobile-nav__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition:
      opacity 0.22s ease,
      transform var(--mobile-nav-motion-duration) var(--mobile-nav-motion-ease),
      visibility 0s linear 0s;
  }

  .frame-mobile-nav__link {
    flex: 0 0 auto;
    justify-content: center;
  }

  .frame-mobile-nav__panel::-webkit-scrollbar {
    display: none;
  }

  /* Scroll container bottom padding — clears the floating mobile nav buttons */
  .work-list,
  .project-detail,
  .writing-detail,
  .about-container {
    padding-bottom: calc(var(--mobile-nav-button-size) + var(--frame-edge-inset, 0.85rem) + 2rem);
  }

  .work-list {
    padding-top: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .pill-row--indented {
    width: 100%;
    margin-left: 0;
  }

  .project-detail {
    padding: 0.75rem;
  }

  .project-splash {
    padding-top: 0.75rem;
  }

  .project-splash__headline {
    max-width: none;
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }

  .home-test-stage__overlay--top,
  .home-test-stage__overlay--bottom {
    height: 18%;
    min-height: 4.8rem;
  }

  .home-strip {
    height: clamp(8rem, 28vw, 14rem);
  }

  .site-header__bar {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-bottom: 0.75rem;
  }

  .site-header__clock {
    max-width: 100%;
    font-size: 0.82rem;
    text-align: left;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header__clock::-webkit-scrollbar {
    display: none;
  }

  .header-nametag-wrap {
    width: calc(var(--header-nametag-size, 1.55rem) * 0.88);
    height: calc(var(--header-nametag-size, 1.55rem) * 0.88);
  }

  .nav-item-link,
  .nav-back-link {
    font-size: 1rem;
  }

  .sticker-stage,
  .sticker-stage__canvas {
    min-height: 21rem;
  }

  .carousel__controls {
    position: static;
    padding-top: 0.8rem;
  }

  .carousel__slide iframe {
    height: 320px;
  }

  /* Writing: mobile two-state layout */

  /* Hide filter pills on post pages */
  .writing-frame:not(.writing-frame--index) .frame-header--writing .pill-row--indented {
    display: none;
  }

  /* On a post page: show ← Writing in the header where the pills were */
  .writing-frame:not(.writing-frame--index) .writing-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0;
    padding-left: var(--frame-nav-indent, 1rem);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
  }

  .writing-frame:not(.writing-frame--index) .writing-back-link:hover {
    color: var(--text);
  }

  .writing-frame:not(.writing-frame--index) .site-nav {
    display: none;
  }

  .writing-frame:not(.writing-frame--index) .site-main {
    min-width: 0;
  }

  /* On the index page: hide the placeholder, show only the nav list full-width */
  .writing-frame--index .site-main {
    display: none;
  }

  .writing-frame--index .site-nav {
    width: 100%;
  }

  /* Tighten the gap between ← Writing and content below it */
  .writing-frame .writing-detail {
    padding-top: 0.15rem;
  }

  .writing-frame .site-grid--writing {
    padding-top: 0;
  }
}


/* Index placeholder — shown on desktop, hidden on mobile */
.writing-index-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 10rem;
}

.writing-index-hint {
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .header-nametag-wrap {
    animation: none;
  }

  .home-strip__track {
    animation: none;
    transform: none;
  }

  .home-micrographic,
  .home-micro-text {
    animation: none;
    opacity: 0.7;
  }
}
