/* =========================================================
   PROJECTS PAGE — HORIZONTAL TIMELINE
   ========================================================= */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #050505;
}

body.projects-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: #050505;
  color: #f7f1e8;
  font-family: Arial, Helvetica, sans-serif;
}

/* ---------- HEADER ---------- */

















/* ---------- HORIZONTAL TIMELINE ---------- */

.horizontal-shell {
  position: relative;
  width: 100%;
  background: #050505;
}

.horizontal-scroll {
  width: 100%;
  height: calc(100svh - 76px);
  min-height: 620px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x pan-y;
  cursor: grab;
  background: #050505;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.horizontal-track {
  display: flex;
  height: 100%;
  width: max-content;
  background: #050505;
}

.timeline-panel {
  position: relative;
  flex: 0 0 clamp(360px, 31vw, 560px);
  height: 100%;
  min-width: 0;
  background: #050505;
  border-right: 1px solid rgba(247, 241, 232, 0.18);
  overflow: hidden;
}

.intro-panel {
  flex-basis: clamp(680px, 53vw, 980px);
  padding: clamp(34px, 5vw, 82px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.year-kicker {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(54px, 5.4vw, 96px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.04em;
  color: #f7f1e8;
}

.intro-bottom {
  max-width: 660px;
}

.intro-copy {
  margin: 0 0 28px;
  max-width: 600px;
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.5;
  color: rgba(247, 241, 232, .88);
}

.year-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.year-jump button {
  appearance: none;
  border: 1px solid rgba(247, 241, 232, .4);
  border-radius: 999px;
  background: transparent;
  color: #f7f1e8;
  font: inherit;
  font-size: 14px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.year-jump button:hover,
.year-jump button:focus-visible,
.year-jump button.active {
  background: #ff9138;
  border-color: #ff9138;
  color: #050505;
  transform: translateY(-1px);
}

/* ---------- PROJECT PANELS ---------- */

.project-panel {
  padding: clamp(30px, 3.8vw, 58px);
  display: flex;
  flex-direction: column;
}

.project-number {
  position: relative;
  z-index: 3;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(72px, 7.2vw, 128px);
  font-weight: 400;
  line-height: .85;
  letter-spacing: -.055em;
  color: #f7f1e8;
}

.project-preview {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  top: 22%;
  height: 47%;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}

.project-preview-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #252321;
  border: 1px solid rgba(247, 241, 232, .18);
  color: rgba(247, 241, 232, .5);
  font-family: "Caveat", cursive;
  font-size: 26px;
}

.project-panel:hover .project-preview,
.project-panel:focus-within .project-preview {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-copy {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding-top: 30px;
}

.project-copy h2 {
  margin: 0 0 12px;
  max-width: 100%;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(30px, 2.55vw, 48px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.035em;
  color: #f7f1e8;
  overflow-wrap: anywhere;
}

.project-copy p {
  margin: 0;
  max-width: 470px;
  font-size: clamp(14px, 1.05vw, 18px);
  line-height: 1.45;
  color: rgba(247, 241, 232, .84);
}

/* ---------- YEAR BREAK PANELS ---------- */

.year-marker {
  flex-basis: clamp(300px, 24vw, 430px);
  padding: clamp(30px, 3.8vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.year-marker .year-kicker {
  color: #ff9138;
}

.year-note {
  max-width: 300px;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.45;
  color: rgba(247, 241, 232, .72);
}

/* ---------- PROGRESS ---------- */

.horizontal-progress {
  position: absolute;
  z-index: 10;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(247, 241, 232, .12);
  pointer-events: none;
}

.horizontal-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #ff9138;
  transform-origin: left;
}

/* ---------- FOOTER ----------
   Keep your existing shared footer styling if it is already correct.
   These only prevent the page from inheriting a white background.
   ----------------------------------------------- */

.projects-page .site-footer {
  position: relative;
  z-index: 5;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  

  .horizontal-scroll {
    height: calc(100svh - 70px);
    min-height: 590px;
  }

  

  .timeline-panel {
    flex-basis: 72vw;
    min-width: 360px;
  }

  .intro-panel {
    flex-basis: 88vw;
    min-width: 520px;
  }

  .year-marker {
    flex-basis: 52vw;
    min-width: 300px;
  }
}

@media (max-width: 700px) {
  

  

  

  

  

  

  .horizontal-scroll {
    height: calc(100svh - 64px);
    min-height: 560px;
    scroll-snap-type: x proximity;
  }

  .timeline-panel {
    flex-basis: 88vw;
    min-width: 310px;
    scroll-snap-align: start;
    padding: 28px 22px;
  }

  .intro-panel {
    flex-basis: 94vw;
    min-width: 320px;
    padding: 34px 24px;
  }

  .year-marker {
    flex-basis: 72vw;
    min-width: 280px;
  }

  .project-preview {
    top: 23%;
    height: 42%;
  }

  .project-copy h2 {
    font-size: clamp(28px, 8vw, 40px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* =========================================================
   PROJECTS V3 — YEAR NAV, PROJECT HOVER, MOBILE STACK
   ========================================================= */

/* Years stay white and are intentionally larger. */
.year-kicker {
  color: #f7f1e8;
  font-size: clamp(72px, 7vw, 126px);
}

/* Every year break is now as wide as the opening 2022 panel. */
.year-marker {
  flex-basis: clamp(680px, 53vw, 980px);
  padding: clamp(34px, 5vw, 82px);
}

.year-marker .year-kicker {
  color: #f7f1e8;
}

.year-marker-bottom {
  margin-top: auto;
  max-width: 660px;
}

.year-marker .year-note {
  max-width: 600px;
  margin-bottom: 28px;
}

/* Repeated year navigation works in every year panel. */
.year-marker .year-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Smooth orange wipe from the bottom on desktop hover/focus. */
.project-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ff9138;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .52s cubic-bezier(.22,.75,.18,1);
}

.project-panel:hover::before,
.project-panel:focus-within::before,
.project-panel.is-selected::before {
  transform: scaleY(1);
}

.project-panel .project-number,
.project-panel .project-copy h2,
.project-panel .project-copy p {
  transition: color .32s ease;
}

.project-panel:hover .project-number,
.project-panel:hover .project-copy h2,
.project-panel:hover .project-copy p,
.project-panel:focus-within .project-number,
.project-panel:focus-within .project-copy h2,
.project-panel:focus-within .project-copy p,
.project-panel.is-selected .project-number,
.project-panel.is-selected .project-copy h2,
.project-panel.is-selected .project-copy p {
  color: #050505;
}

/* Keep the image reveal above the orange fill. */
.project-preview {
  z-index: 2;
}

.project-number,
.project-copy {
  z-index: 3;
}

/* =========================================================
   MOBILE: normal vertical portfolio, no horizontal trapping
   ========================================================= */
@media (max-width: 700px) {
  .horizontal-shell {
    overflow: visible;
  }

  .horizontal-scroll {
    height: auto;
    min-height: 0;
    overflow: visible;
    scroll-snap-type: none;
    cursor: default;
  }

  .horizontal-track {
    display: block;
    width: 100%;
    height: auto;
  }

  .timeline-panel,
  .intro-panel,
  .year-marker {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 72svh;
    border-right: 0;
    border-bottom: 1px solid rgba(247, 241, 232, 0.18);
    padding: 42px 24px;
  }

  .intro-panel,
  .year-marker {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .year-kicker {
    font-size: clamp(68px, 22vw, 110px);
  }

  .year-marker-bottom,
  .intro-bottom {
    width: 100%;
    max-width: none;
  }

  .intro-copy,
  .year-marker .year-note {
    max-width: 100%;
  }

  .project-panel {
    min-height: auto;
    padding: 34px 22px 38px;
  }

  /* Mobile has no hover, so previews remain visible. */
  .project-preview {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 30px 0 34px;
    opacity: 1;
    transform: none;
    pointer-events: none;
  }

  .project-copy {
    margin-top: 0;
    padding-top: 0;
  }

  .project-copy h2 {
    font-size: clamp(34px, 10vw, 52px);
    overflow-wrap: normal;
  }

  .project-copy p {
    max-width: 100%;
    font-size: 16px;
  }

  .project-number {
    font-size: clamp(68px, 20vw, 110px);
  }

  .horizontal-progress {
    display: none;
  }

  /* Orange selection is triggered by long press via JS. */
  .project-panel::before {
    transition-duration: .42s;
  }
}
