/* Projects index. Light paper, same type as the home page. */

:root {
  --bg-primary: #FBF8F3;
  --bg-surface: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #52526A;
  --text-tertiary: #8C8CA2;
  --text-muted: #B8B5C0;
  --accent-indigo: #6C63FF;
  --accent-purple: #6C63FF;
  --glass-border: rgba(26, 26, 46, 0.08);
  --glass-border-hover: rgba(26, 26, 46, 0.16);
  --line: rgba(26, 26, 46, 0.1);
  --gradient-brand: linear-gradient(135deg, #6C63FF, #FF6B6B);
  --nav-h: 72px;
  --ink: #1C1915;
  --paper: #FBF8F3;
  --ok: #2F6B45;
  --wait: #A15C32;
}

body {
  background: var(--paper);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

::selection {
  background: rgba(108, 99, 255, 0.16);
  color: var(--text-primary);
}

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

body::before {
  opacity: 0.045;
  z-index: 0;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.blob--1 { background: #E8D5FF; opacity: 0.45; width: 520px; height: 520px; }
.blob--2 { background: #FFD5D5; opacity: 0.35; width: 440px; height: 440px; }
.blob--3 { background: #D5F0FF; opacity: 0.32; width: 380px; height: 380px; }

.cursor__dot { background: #1A1A2E; mix-blend-mode: normal; }
.cursor__ring { border-color: rgba(26, 26, 46, 0.28); mix-blend-mode: normal; }
.cursor--active .cursor__ring { border-color: rgba(108, 99, 255, 0.55); }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 2000;
  background: var(--text-primary);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}
.progress__bar {
  display: block;
  height: 100%;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Nav — same geometry as the home page */

.home-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(251, 248, 243, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.home-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-nav__logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.home-nav__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.home-nav__link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-tertiary);
  position: relative;
  padding: 0.25rem 0;
}

.home-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent-indigo);
  transition: width 0.3s ease;
}

.home-nav__link:hover { color: var(--text-primary); }
.home-nav__link:hover::after,
.home-nav__link.is-current::after { width: 100%; }
.home-nav__link.is-current { color: var(--text-primary); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.85rem;
}

/* Hero */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding-top: calc(var(--nav-h) + clamp(2rem, 6vh, 4.5rem));
  padding-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.72fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 1.6rem + 4.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 11ch;
}

.lede {
  margin-top: 1.25rem;
  max-width: 34ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.hero__list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem 0.15rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-primary);
  cursor: pointer;
}

.hero__list a svg {
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero__list a:hover svg,
.hero__list a:focus-visible svg {
  opacity: 1;
  transform: none;
}

.hero__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.hero__name {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.hero__name strong {
  font-weight: 500;
  font-size: 0.98rem;
}

.hero__name em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero__cue {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.5rem;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-tertiary);
}

.hero__cue i {
  display: block;
  width: 1px;
  height: 42px;
  background: var(--text-muted);
  transform-origin: top center;
}

/* Ticker */

.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
  background: rgba(251, 248, 243, 0.6);
}

.ticker__track {
  display: flex;
  width: max-content;
}

.ticker__group {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding-right: 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.ticker__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: none;
}

.js:not(.reduce):not(.is-motion) .ticker__track {
  animation: ticker 32s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Reel */

.reel {
  position: relative;
  z-index: 1;
}

.reel__grid {
  display: grid;
  grid-template-columns: minmax(148px, 190px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
}

.will-reel .reel__sticky {
  height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.will-reel .reel__grid {
  align-items: center;
  height: 100%;
  padding-block: 1.25rem;
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 1rem;
}

.rail__line {
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: var(--line);
}

.rail__line-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--text-primary);
  transform: scaleY(0);
  transform-origin: top center;
}

.rail a {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.45rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  cursor: pointer;
}

.rail a span { color: var(--text-muted); }

.rail a[aria-current="true"] {
  color: var(--text-primary);
}

.rail a[aria-current="true"] span { color: var(--text-primary); }

.frames { position: relative; min-width: 0; }

.frame {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.9fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vh, 6rem);
  scroll-margin-top: calc(var(--nav-h) + 4.5rem);
}

.will-reel .frames { height: 100%; }

.will-reel .frame {
  position: absolute;
  inset: 0;
  padding-block: 0;
}

.will-reel .frame:nth-child(1) { z-index: 1; }
.will-reel .frame:nth-child(2) { z-index: 2; }
.will-reel .frame:nth-child(3) { z-index: 3; }

.will-reel .frame:not(:first-child) {
  opacity: 0;
  visibility: hidden;
}

.frame__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.frame__copy p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 42ch;
}

.frame__meta {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary) !important;
}

.open {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.35rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(26, 26, 46, 0.28);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.open:hover { border-bottom-color: var(--text-primary); }

/* Specimens */

.specimen { min-width: 0; }

.terminal,
.quote,
.inbox {
  border-radius: 18px;
  overflow: hidden;
}

.terminal {
  background: var(--ink);
  color: #F3E6C8;
  padding: 1.15rem 1.25rem 0.85rem;
  box-shadow: 0 22px 50px rgba(28, 25, 21, 0.16);
  font-family: var(--font-mono);
}

.terminal__bar,
.quote__bar,
.inbox__bar {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.terminal__bar { color: rgba(243, 230, 200, 0.45); margin-bottom: 1.1rem; }

.terminal__route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
}

.terminal__route strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}

.terminal__route span { color: rgba(243, 230, 200, 0.55); font-size: 0.72rem; }

.terminal__dash {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 230, 200, 0.45), transparent);
}

.terminal__name {
  margin: 1rem 0 0.85rem;
  font-size: 0.78rem;
  color: rgba(243, 230, 200, 0.72);
}

.terminal__name span { color: #F3E6C8; margin-right: 0.45rem; }

.terminal__rows { list-style: none; }

.terminal__row {
  display: grid;
  grid-template-columns: 2.2rem 2.2rem 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(243, 230, 200, 0.12);
  font-size: 0.75rem;
  color: rgba(243, 230, 200, 0.7);
}

.terminal__row b { font-weight: 500; justify-self: end; }
.terminal__row .is-ok { color: #B7D7A8; }
.terminal__row .is-mid { color: #E4C27A; }
.terminal__row .is-wait { color: #E7A890; }

.quote,
.inbox {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(26, 26, 46, 0.05);
  padding: 1.15rem 1.2rem 0.9rem;
}

.quote__bar,
.inbox__bar { color: var(--text-tertiary); margin-bottom: 1rem; }

.quote__name {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.quote__price {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1.1;
  margin: 0.2rem 0 0.35rem;
  letter-spacing: -0.03em;
}

.quote__target {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.spark { width: 100%; height: auto; margin-top: 0.4rem; display: block; }

.spark__target {
  stroke: rgba(26, 26, 46, 0.18);
  stroke-dasharray: 3 4;
}

.spark__line {
  fill: none;
  stroke: var(--ok);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.inbox__rows { list-style: none; }

.inbox__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0 0.7rem 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.inbox__row b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
}

.inbox__row em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.inbox__row.is-hot {
  box-shadow: inset 2px 0 0 var(--text-primary);
}

.inbox__row.is-cold { color: var(--text-secondary); }
.inbox__row.is-cold em { color: var(--text-tertiary); }

.terminal__row,
.inbox__row,
.spark__line {
  transition: opacity 0.5s ease, transform 0.5s ease, stroke-dashoffset 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.terminal__row,
.inbox__row {
  opacity: 0;
  transform: translateY(8px);
}

.frame.is-active .terminal__row,
.frame.is-active .inbox__row {
  opacity: 1;
  transform: none;
}

.frame.is-active .terminal__row:nth-child(2),
.frame.is-active .inbox__row:nth-child(2) { transition-delay: 0.08s; }

.frame.is-active .terminal__row:nth-child(3),
.frame.is-active .inbox__row:nth-child(3) { transition-delay: 0.16s; }

.frame.is-active .spark__line { stroke-dashoffset: 0; }

/* Closer */

.closer {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 8vh, 5rem);
}

.closer__line {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  line-height: 1.15;
  max-width: 16ch;
}

.colophon {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 1.6rem;
}

.colophon p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.js:not(.reduce) .hero__reveal,
.js:not(.reduce) .reveal {
  opacity: 0;
}

@media (max-width: 899px) {
  .hero {
    min-height: 0;
    justify-content: flex-start;
    padding-bottom: 2.5rem;
  }

  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__title { max-width: none; }
  .hero__cue { display: none; }

  .reel__grid { grid-template-columns: 1fr; gap: 0; }

  .rail {
    position: sticky;
    top: var(--nav-h);
    z-index: 30;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.7rem 0 0.7rem;
    margin-bottom: 0.5rem;
    background: rgba(251, 248, 243, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }

  .rail__line { display: none; }
  .rail a { white-space: nowrap; padding: 0.2rem 0; }

  .frame {
    grid-template-columns: 1fr;
    padding-block: 2.2rem 2.8rem;
  }

  .will-reel .reel__sticky {
    height: auto;
    overflow: visible;
    display: block;
  }

  .will-reel .frame {
    position: relative;
    opacity: 1;
    visibility: visible;
    inset: auto;
  }
}

@media (max-height: 760px) and (min-width: 900px) {
  .will-reel .frame__title { font-size: 2.3rem; }
  .will-reel .frame__copy p { font-size: 0.95rem; }
  .will-reel .quote__price { font-size: 2.1rem; }
  .will-reel .terminal__route strong { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .terminal__row,
  .inbox__row,
  .spark__line {
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
    transition: none;
  }
}

.reduce .ticker__group:last-child { display: none; }
.reduce .ticker__track { animation: none; width: auto; }
.reduce .terminal__row,
.reduce .inbox__row {
  opacity: 1;
  transform: none;
}
.reduce .spark__line { stroke-dashoffset: 0; }
