/* ————————————————————————————————————————
   Shaswot Lamichhane — field notes from a crowd
   Dark cinematic base · zine layer on top · one crimson.
   ———————————————————————————————————————— */

:root {
  --night: #0e0c10;
  --night-soft: #17141b;
  --paper: #f2ead8;
  --paper-dim: #cfc6b2;
  --ink: #16131a;
  --crimson: #dc1436;
  --crimson-deep: #a80e28;
  --rule: rgba(242, 234, 216, 0.16);
  --rule-dark: rgba(22, 19, 26, 0.2);
  --display: "Avenir Next Condensed", "HelveticaNeue-CondensedBold", "Arial Narrow", Impact, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", Palatino, Georgia, serif;
  --measure: 40rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--crimson); color: var(--paper); }

a { color: inherit; text-decoration-color: var(--crimson); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--crimson); }
.accent { color: var(--crimson); }

/* ————— zine bits ————— */

.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  border: 1.5px solid var(--crimson);
  padding: 0.35em 0.9em;
  transform: rotate(-1.2deg);
  background: rgba(220, 20, 54, 0.08);
}
.stamp--dark { color: var(--ink); background: rgba(220, 20, 54, 0.07); }

.aside {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--paper-dim);
  margin-top: 1.4rem;
}
.chapter--paper .aside { color: rgba(22, 19, 26, 0.55); }

/* ————— type scale ————— */

.xl {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 1.4rem 0 2rem;
}
.xl--dark { color: var(--ink); }

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.1rem; }
.prose--dark { color: var(--ink); }
.prose-intro { max-width: var(--measure); color: var(--paper-dim); margin-bottom: 3rem; }

.pull {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.1;
  color: var(--crimson);
  border-left: 5px solid var(--crimson);
  padding-left: 1.2rem;
  margin: 2rem 0;
}
.pull--dark { color: var(--crimson-deep); border-color: var(--crimson-deep); }

/* ————— buttons ————— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.8rem 1.7rem;
  text-decoration: none;
  color: var(--paper);
  background: var(--crimson);
  border: none;
  cursor: pointer;
  transform: rotate(-0.6deg);
  box-shadow: 4px 4px 0 rgba(242, 234, 216, 0.9);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.chapter--paper .btn--ghost { box-shadow: 4px 4px 0 var(--ink); }
.btn:hover {
  background: var(--crimson-deep);
  color: var(--paper);
  transform: rotate(-0.6deg) translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(242, 234, 216, 0.9);
}
.btn:active { transform: rotate(-0.6deg) translate(1px, 1px); box-shadow: 2px 2px 0 rgba(242, 234, 216, 0.9); }
.btn__arrow { transition: transform 0.15s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--big  { font-size: 1.2rem; padding: 1rem 2.1rem; }
.btn--small { font-size: 0.85rem; padding: 0.45rem 1.05rem; box-shadow: 3px 3px 0 rgba(242, 234, 216, 0.9); }
.btn--huge { font-size: clamp(1.4rem, 4vw, 2.2rem); padding: 1.3rem 3rem; }

.btn--ghost {
  background: transparent;
  color: var(--crimson-deep);
  border: 2px solid var(--crimson-deep);
}
.btn--ghost:hover { background: var(--crimson-deep); color: var(--paper); }

/* ————— contact touchpoints ————— */

.touchpoint {
  margin-top: 3.2rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--rule);
  font-style: italic;
  color: var(--paper-dim);
  max-width: var(--measure);
}
.touchpoint a { color: var(--paper); font-style: normal; font-weight: 600; }
.chapter--paper .touchpoint { border-color: var(--rule-dark); color: rgba(22, 19, 26, 0.6); }
.chapter--paper .touchpoint a { color: var(--ink); }

/* ————— floating contact chip ————— */

.floatmail {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 50;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--crimson);
  color: var(--paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.floatmail.visible { opacity: 1; transform: none; pointer-events: auto; }
.floatmail:hover { background: var(--crimson-deep); color: var(--paper); }

/* ————— hero: pinned 3D scene ————— */

.hero { height: 320svh; position: relative; }

.hero__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

#crowd-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(220, 20, 54, 0.22), transparent 55%),
    linear-gradient(#0a090d, #16121a);
}

.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(10, 9, 13, 0.75) 100%);
}

.hero__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.hero__beat {
  grid-area: 1 / 1;
  max-width: 56rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.hero__beat.active { opacity: 1; transform: none; pointer-events: auto; }

/* photo: proof it's a real person */
.hero__me {
  display: inline-block;
  width: clamp(92px, 12vw, 124px);
  height: clamp(92px, 12vw, 124px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--paper);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(220, 20, 54, 0.35);
  margin-bottom: 1.2rem;
}
.hero__me img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__name {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  margin: 1.2rem 0 1rem;
  text-shadow: 0 4px 40px rgba(10, 9, 13, 0.9);
}
.hero__line {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--paper-dim);
  margin-bottom: 2rem;
}
.hero__big {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  line-height: 1.05;
  text-shadow: 0 4px 40px rgba(10, 9, 13, 0.95);
}
.hero__beat .aside { text-shadow: 0 2px 20px rgba(10, 9, 13, 0.9); }

/* scroll cue: pinned to the bottom of the hero viewport */
.scrollcue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 1.2rem;
  background: rgba(14, 12, 16, 0.55);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.scrollcue:hover { border-color: var(--crimson); background: rgba(220, 20, 54, 0.18); }
.scrollcue svg { animation: cue-bounce 2s ease-in-out infinite; }
@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ————— chapters ————— */

.chapter { position: relative; padding: clamp(5rem, 12vw, 9rem) 0; }
.chapter__inner {
  position: relative;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* paper chapters: torn top & bottom edges */
.chapter--paper {
  background: var(--paper);
  color: var(--ink);
  clip-path: polygon(
    0 14px, 4% 4px, 9% 16px, 15% 6px, 22% 18px, 30% 4px, 38% 14px, 46% 6px,
    54% 16px, 62% 5px, 70% 15px, 78% 7px, 86% 17px, 93% 5px, 100% 13px,
    100% calc(100% - 14px), 95% calc(100% - 4px), 88% calc(100% - 16px),
    80% calc(100% - 6px), 71% calc(100% - 18px), 62% calc(100% - 5px),
    53% calc(100% - 15px), 44% calc(100% - 7px), 35% calc(100% - 17px),
    26% calc(100% - 5px), 17% calc(100% - 15px), 9% calc(100% - 6px), 0 calc(100% - 12px)
  );
}

/* ————— parallax scenery ————— */

.parallax { position: relative; }
.px {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: min(1400px, 130vw);
  pointer-events: none;
  will-change: transform;
}
.px--far { top: -10rem; opacity: 0.5; }
.px--mid { top: -3rem; opacity: 0.8; }
.mtn { fill: #1d1824; }
.skyline rect { fill: #241d2e; }

/* ————— compact timeline ————— */

.minitimeline {
  list-style: none;
  max-width: 44rem;
  margin: 2.6rem 0;
  border-left: 3px solid var(--crimson-deep);
}
.minitimeline li {
  padding: 0.85rem 0 0.85rem 1.4rem;
  color: rgba(22, 19, 26, 0.85);
  font-size: 1.02rem;
  border-bottom: 1px dashed var(--rule-dark);
}
.minitimeline li:last-child { border-bottom: none; }
.mt-date {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--crimson-deep);
  padding: 0.15em 0.6em;
  margin-right: 0.7rem;
  transform: rotate(-1deg);
}
.minitimeline .somber { background: rgba(22, 19, 26, 0.05); font-style: italic; }
.minitimeline .somber .mt-date { background: var(--ink); }

/* ————— crowd toy ————— */

.toy {
  margin-top: 3rem;
  border: 1.5px solid var(--rule);
  background: var(--night-soft);
  padding: 1.6rem;
  max-width: 46rem;
  transform: rotate(-0.3deg);
}
.toy__head h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.5rem;
}
.toy__head p { color: var(--paper-dim); font-size: 0.98rem; margin: 0.4rem 0 1.2rem; max-width: 34rem; }
.chapter--photo .clippings { position: relative; }
#boids {
  display: block;
  width: 100%;
  height: 340px;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(220, 20, 54, 0.14), transparent 60%),
    #0a090d;
  border: 1px solid var(--rule);
  cursor: crosshair;
  touch-action: none;
}

/* ————— subliminal photo layer —————
   Drop more photos in assets/ and add extra .chapter--photo sections;
   the image whispers from the background, never poses in front. */

.chapter--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/oxford-union.jpg") center 22% / cover no-repeat;
  opacity: 0.09;
  filter: grayscale(85%) contrast(1.15);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  pointer-events: none;
}

/* ————— video slot ————— */

.video-slot { margin-top: 2rem; max-width: 620px; }
.video-slot__poster {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.4rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
  color: var(--paper);
  background: var(--night-soft);
  border: 1.5px solid var(--paper);
  cursor: pointer;
  transform: rotate(0.4deg);
  transition: background 0.15s ease;
}
.video-slot__poster:hover { background: #221c29; }
.play-bg { fill: var(--crimson); }
.play-tri { fill: var(--paper); }
.video-slot iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--paper);
}

/* ————— press clippings ————— */

.clippings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 1rem;
}
.clip {
  display: block;
  background: var(--paper);
  color: var(--ink);
  padding: 1.3rem 1.4rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.clip:hover { transform: translateY(-5px) !important; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6); color: var(--ink); }
.clip__outlet {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson-deep);
  margin-bottom: 0.6rem;
}
.clip__title { font-size: 0.98rem; line-height: 1.5; }
.clip--static { cursor: default; }

/* ————— postcard / essay ————— */

.postcard {
  background: var(--night);
  color: var(--paper);
  border: 2px solid var(--ink);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 44rem;
  transform: rotate(-0.5deg);
  box-shadow: 10px 10px 0 var(--crimson);
}
.postcard__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.7rem;
}
.postcard__title {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.05;
}
.postcard__teaser { margin: 0.9rem 0 1.6rem; font-style: italic; color: var(--paper-dim); font-size: 1.1rem; }
.postcard .btn--ghost { color: var(--paper); border-color: var(--crimson); box-shadow: 4px 4px 0 var(--crimson); }
.postcard .btn--ghost:hover { background: var(--crimson); color: var(--paper); }

/* ————— open-tabs chips ————— */

.chips-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(22, 19, 26, 0.55);
  margin-top: 2.6rem;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
  max-width: 44rem;
}
.chips li {
  font-size: 0.95rem;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 0.35em 0.95em;
  border-radius: 999px;
  background: rgba(220, 20, 54, 0.05);
  transform: rotate(-0.6deg);
}
.chips li:nth-child(even) { transform: rotate(0.7deg); }

/* ————— closing ————— */

.closing {
  text-align: center;
  padding: clamp(6rem, 14vw, 11rem) clamp(1.25rem, 5vw, 3rem);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(220, 20, 54, 0.25), transparent 60%),
    var(--night);
}
.closing__title {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.98;
  margin: 1.6rem 0 2.8rem;
}
.closing__addr {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--paper-dim);
  letter-spacing: 0.06em;
}

/* ————— footer ————— */

.footer {
  border-top: 1px solid var(--rule);
  padding: 2.2rem clamp(1.25rem, 5vw, 3rem) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  max-width: 68rem;
  margin: 0 auto;
}
.footer__social { display: flex; gap: 1.6rem; font-family: var(--mono); font-size: 0.85rem; }
.footer__meta { font-family: var(--mono); font-size: 0.72rem; color: var(--paper-dim); }

/* ————— post modal ————— */

.post-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(46rem, 94vw);
  width: 100%;
  margin: auto;
}
.post-modal::backdrop {
  background: rgba(8, 7, 10, 0.72);
  backdrop-filter: blur(3px);
}
.post-modal__inner {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  max-height: 86svh;
  overflow-y: auto;
  box-shadow: 12px 12px 0 var(--crimson);
}
.post-modal[open] .post-modal__inner { animation: modal-in 0.32s ease both; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) rotate(-0.5deg); }
  to   { opacity: 1; transform: rotate(-0.5deg); }
}
.post-modal__close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.post-modal__close:hover { background: var(--ink); color: var(--paper); }

.post { max-width: var(--measure); }
.post__meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22, 19, 26, 0.6);
  margin-bottom: 1rem;
}
.post h2 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.02;
}
.post__dek { margin: 0.8rem 0 2rem; font-style: italic; font-size: 1.2rem; color: var(--crimson-deep); }
.post h3 {
  margin: 2.2rem 0 0.7rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.3rem;
}
.post p + p { margin-top: 1rem; }
.post__outro {
  margin-top: 2.8rem;
  padding: 1.4rem 1.6rem;
  border-left: 4px solid var(--crimson);
  background: rgba(220, 20, 54, 0.06);
  font-style: italic;
}

@media (max-width: 640px) {
  .post-modal { max-width: 100vw; margin: auto 0 0; }
  .post-modal__inner { max-height: 92svh; box-shadow: none; }
}

/* ————— scroll reveals ————— */

.chapter__inner > *, .closing > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.chapter__inner > .in-view, .closing > .in-view { opacity: 1; transform: none; }
/* keep zine rotations while revealed */
.stamp.in-view { transform: rotate(-1.2deg); }
.postcard.in-view { transform: rotate(-0.5deg); }
.toy.in-view { transform: rotate(-0.3deg); }
.btn--huge.in-view { transform: rotate(-0.6deg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapter__inner > *, .closing > *, .hero__beat { opacity: 1 !important; transform: none !important; transition: none !important; }
  .stamp { transform: rotate(-1.2deg) !important; }
  .post-modal[open] .post-modal__inner { animation: none; }
  .btn, .btn__arrow, .floatmail, .clip { transition: none; }
  .scrollcue svg { animation: none; }
  .hero { height: auto; }
  .hero__pin { position: relative; height: auto; min-height: 100svh; }
  .hero__beat { position: relative; grid-area: auto; padding: 3rem 0; }
}

/* ————— small screens ————— */

@media (max-width: 700px) {
  .minitimeline li { font-size: 0.95rem; }
  .mt-date { display: block; width: max-content; margin-bottom: 0.3rem; }
  #boids { height: 260px; }
}
