/* ── Fonts ── */
@font-face {
  font-family: "Sirukota";
  src: url("fonts/Sirukota.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sreda";
  src: url("fonts/Sreda.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Custom properties ── */
:root {
  --cream: #FFFAF2;
  --accent: #F84B12;
  --accent-secondary: #F84B12;
  --dot-inactive: #d9d9d9;
  --project-orange: #f95d1e;
  --project-dark: #353535;
  --project-peach: #ffcaae;
  --project-green: #09863f;
  --project-sage: #72897c;
  --font-heading: "Sreda", "Space Mono", monospace;
  --font-mono: "Space Mono", monospace;
}

/* ── Loading screen ── */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FFD6E0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.loading-screen.done {
  opacity: 0;
  pointer-events: none;
}

.loading-gif {
  width: 160px;
  height: auto;
}

/* ── Reset / base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--cream);
  color: #000;
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
}

/* ── Stacked scroll system ── */
.scroll-container {
  position: relative;
}

.page-flip-viewport {
  position: fixed;
  inset: 0;
}

.page-flip-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  will-change: transform;
}

.scroll-section {
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  background-color: var(--cream);
}

/* ── Section split layout ── */
.section-left {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 64px;
  position: relative;
}

.section-right {
  width: 50%;
  position: relative;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.section-right.no-border {
  border-left: none;
}

.section-right.dark-bg {
  background-color: #1c1c1c;
  border-left: none;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
  margin: 0 0 16px 0;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  margin: 0;
}

.subtitle-link {
  color: var(--accent);
  text-decoration: none;
}

.subtitle-link:hover {
  text-decoration: underline;
}

/* ── Hero section ── */
.hero-subtitle {
  margin-bottom: 24px;
}

.switch-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.switch-link:hover {
  text-decoration: underline;
}

.switch-link--light {
  color: #fff;
  margin-top: 24px;
}

/* ── Hero gallery ── */
.hero-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.hero-gallery--single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: auto;
  object-fit: contain;
  filter: none;
  pointer-events: none;
  z-index: 1;
}

.gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.gallery-item--large {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.gallery-item--tall {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

.gallery-item--wide {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.gallery-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-tag {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 22px solid #282828;
}

.wobbly-line {
  width: 280px;
  height: auto;
  margin-top: 32px;
  align-self: flex-end;
  margin-right: 40px;
  overflow: visible;
}

/* ── Process section ── */
.process-right {
  background-color: var(--accent-secondary);
  display: flex;
  align-items: flex-start;
  padding: 64px;
  border-left: none;
}

.process-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  line-height: 1.625;
  white-space: pre-line;
  margin: 0;
}

.process-text strong {
  font-weight: 700;
  color: #fff;
}

/* ── Projects section ── */
.scroll-section--projects {
  background: #3a3a3a;
}

.scroll-section--projects .section-left {
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.scroll-section--projects .section-title {
  color: var(--accent);
}

.projects-subtitle {
  color: rgba(255, 255, 255, 0.55);
}

.projects-right {
  display: flex;
  padding: 0;
  border-left: none;
}

.projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.project-col-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  padding: 0 32px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.project-col-item:first-child {
  border-top: none;
}

.project-col-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.project-name {
  flex-shrink: 1;
  min-width: 0;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}

.project-wip {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: rgba(0, 0, 0, 1);
  vertical-align: middle;
}

.project-tag {
  font-family: var(--font-mono);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  height: 28px;
  padding: 0 14px;
  white-space: nowrap;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── About section ── */
.about-right {
  background-color: #1a1aff;
  display: flex;
  padding: 64px;
  gap: 40px;
  border-left: none;
  overflow-y: auto;
}

.about-col {
  flex: 1;
}

.about-skills {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  line-height: 1.8;
  margin: 0;
  padding: 0 0 0 20px;
}

.about-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  line-height: 1.625;
  margin: 0 0 20px 0;
}

.about-text em {
  font-style: italic;
}

/* ── Scroll-reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-photos {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: -64px -64px -64px 0;
}

.about-photo {
  overflow: hidden;
}

.about-photo:last-child {
  flex: 1;
  min-height: 0;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.5s ease;
}

.about-photo:hover img {
  filter: grayscale(0%);
}

.about-photo.reveal:nth-child(1) { transition-delay: 0s; }
.about-photo.reveal:nth-child(2) { transition-delay: 0.1s; }
.about-photo.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ── Side-project section ── */
.side-right {
  border-left: none;
}

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

/* ── Navigation dots ── */
.nav-dots {
  position: fixed;
  left: 20px;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
}

.nav-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
}

.nav-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.nav-icon--active {
  opacity: 0;
}

.nav-icon--inactive {
  opacity: 1;
}

.nav-dot.active .nav-icon--active {
  opacity: 1;
}

.nav-dot.active .nav-icon--inactive {
  opacity: 0;
}

.nav-label {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nav-dot:hover .nav-label {
  opacity: 1;
}

/* ── Mode transition ── */
.mode-container {
  transition: opacity 0.4s ease;
}

.mode-container.fading {
  opacity: 0;
}

/* ── Chat mode ── */
.chat-mode {
  height: 100vh;
  width: 100vw;
  background-color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.chat-switch-link {
  position: absolute;
  top: 48px;
  left: 64px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  z-index: 20;
}

.chat-switch-link:hover {
  text-decoration: underline;
}

/* ── Question pills ── */
.question-pill {
  position: absolute;
  z-index: 10;
  padding: 12px 20px;
  border: 1px solid;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.question-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-pill:active {
  transform: scale(0.95);
}

.question-pill.orange {
  border-color: var(--accent);
  color: var(--accent);
}

.question-pill.dark {
  border-color: #1f1f1f;
  color: #1f1f1f;
}

/* ── Chat history ── */
.chat-history {
  flex: 1;
  width: 100%;
  max-width: 860px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 100px 0 16px;
  gap: 12px;
}

.chat-history::before {
  content: "";
  flex: 1;
}

/* ── Chat messages ── */
.chat-msg {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  padding: 16px 24px;
  max-width: 85%;
  opacity: 0;
  transform: translateY(8px);
  animation: chatMsgIn 0.3s ease forwards;
}

@keyframes chatMsgIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-msg--user {
  background-color: transparent;
  color: #000;
  align-self: flex-end;
}

.chat-msg--answer {
  background-color: transparent;
  color: #000;
  align-self: flex-start;
}

.chat-project-link {
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}

.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 16px 24px;
}

.chat-typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ── Chat intro ── */
.chat-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 16px;
  margin-top: auto;
}

.chat-intro-heading {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.12);
  margin: 0 0 12px 0;
  line-height: 1.1;
}

.chat-intro-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  margin: 0 0 24px 0;
  line-height: 1.625;
}

.chat-question-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-question-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  line-height: 1.625;
}

.chat-question-btn:hover {
  text-decoration: underline;
}

.chat-followup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0 4px;
  align-self: flex-start;
}

/* ── Chat input wrap ── */
.chat-input-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  padding: 16px 0 32px;
  width: 100%;
  max-width: 860px;
}

/* ── Chat input bar ── */
.chat-input-bar {
  display: flex;
  align-items: center;
  background: var(--accent);
  border-radius: 30px;
  padding: 8px 8px 8px 24px;
  gap: 8px;
}

.chat-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  padding: 8px 0;
}

.chat-text-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* ── Send button ── */
.bubble-send {
  width: 40px;
  height: 40px;
  background: #000;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.bubble-send:hover {
  transform: scale(1.1);
}

.bubble-send:active {
  transform: scale(0.95);
}

/* ── Project detail page ── */
.project-page {
  height: 100vh;
  width: 100vw;
  background-color: var(--cream);
  display: flex;
  position: relative;
}

.project-back {
  background: none;
  border: none;
  padding: 0;
  margin-top: auto;
  padding-top: 40px;
  padding-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.project-back:hover {
  text-decoration: underline;
}

.project-meta {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  display: flex;
  z-index: 2;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background-color: var(--cream);
}

.project-intro {
  padding-bottom: 24px;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.project-meta-col {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 16px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.project-meta-col:first-child {
  border-left: none;
}

.project-content {
  display: flex;
  width: 100%;
  height: 100%;
}

.project-left {
  width: 50%;
  height: 100%;
  overflow-y: auto;
}

.project-left-scroll {
  padding: 80px 64px 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.project-short {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  margin: 0 0 24px 0;
  line-height: 1.625;
}

.project-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding-bottom: 32px;
}

.project-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  margin: 0;
  line-height: 1.625;
}

.project-section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  color: var(--accent);
  margin: 32px 0 12px 0;
}

.project-section-title:first-child {
  margin-top: 0;
}

.project-section-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  margin: 0 0 8px 0;
  line-height: 1.625;
  white-space: pre-line;
}

.project-timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 20px;
  position: relative;
}

.project-timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 17px;
  bottom: 0;
  width: 1px;
  background: #000;
}

.project-timeline-step:last-child::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 24px;
  bottom: 0;
  width: 7px;
  background: var(--cream);
}

.project-timeline-step {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  line-height: 1.625;
  padding: 12px 0;
}

.project-timeline-step::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 17px;
  width: 7px;
  height: 7px;
  background: #000;
  border-radius: 50%;
}

/* ── Step image button (replaces dot on timeline) ── */
.project-timeline-step.has-image::before {
  display: none;
}

.project-timeline-step.has-image:last-child::after {
  left: -20px;
  top: 14px;
  width: 7px;
}

.step-image-btn {
  position: absolute;
  left: -26px;
  top: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #1a1a1a;
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  color: #fff;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s, transform 0.2s;
}

.step-image-btn:hover {
  background: #000;
  transform: scale(1.1);
}

.step-image-btn svg {
  width: 10px;
  height: 10px;
  stroke: white;
  fill: none;
}

/* ── Step image overlay ── */
.step-image-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.step-image-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.step-image-overlay img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.project-right-detail {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.project-hmw-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 64px;
  background: #000;
}

.project-hmw-label {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #e53935;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-hmw-quote {
  font-family: var(--font-mono);
  font-size: 20px;
  font-style: italic;
  line-height: 1.4;
  color: #fff;
  margin: 0 0 12px;
}

.project-hmw-text {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #aaa;
  margin: 0 0 48px;
}

.project-hmw {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: #e53935;
  margin: 0 0 40px;
}

.project-hmw:last-child {
  margin-bottom: 0;
}

/* ── Right-panel state layering ── */
.project-right-state {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.project-right-state.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Experiment image states ── */
.project-experiment-image-state {
  display: flex;
  flex-direction: column;
  background: #1c1c1c;
}

.experiment-image {
  flex: 1;
  width: 100%;
  object-fit: contain;
  padding: 32px;
  min-height: 0;
}

.experiment-image-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  padding: 16px 32px 24px;
}

/* ── Experiment cards on the left ── */
.project-experiments {
  display: flex;
  flex-direction: column;
}

.project-experiment-card {
  padding: 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.experiment-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 4px;
}

.experiment-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  margin: 0 0 16px;
}

.experiment-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin: 16px 0 4px;
}

.experiment-hypothesis,
.experiment-solution {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  margin: 0;
}

.experiment-result {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
}

.experiment-learning {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  margin: 0;
}

.experiment-iteration-result {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  margin: 8px 0 0;
}

/* ── Problem block on left panel ── */
.project-problem {
  padding-bottom: 8px;
}

.project-full-separator {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 24px 0 0;
  padding-bottom: 48px;
}

.project-key-metric {
  margin-top: 4px;
  font-size: 11px;
}

/* ── User quote bubbles ── */
.user-quotes {
  display: flex;
  gap: 24px;
  margin: 24px 0 8px;
}

.user-quote-card {
  flex: 1;
  min-width: 0;
}

.user-quote-bubble {
  position: relative;
  padding: 24px 28px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.user-quote-bubble::after {
  content: "";
  position: absolute;
  bottom: -12px;
  width: 0;
  height: 0;
  border-style: solid;
}

.user-quote-card--purple .user-quote-bubble {
  background: rgba(180, 170, 220, 0.25);
}

.user-quote-card--purple .user-quote-bubble::before {
  content: "\201D";
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 64px;
  line-height: 1;
  color: rgba(100, 120, 200, 0.45);
  font-family: Georgia, serif;
}

.user-quote-card--purple .user-quote-bubble::after {
  left: 24px;
  border-width: 12px 12px 0 0;
  border-color: rgba(180, 170, 220, 0.25) transparent transparent transparent;
}

.user-quote-card--green .user-quote-bubble {
  background: rgba(240, 240, 240, 0.7);
}

.user-quote-card--green .user-quote-bubble::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  right: 16px;
  font-size: 64px;
  line-height: 1;
  color: rgba(40, 210, 120, 0.55);
  font-family: Georgia, serif;
}

.user-quote-card--green .user-quote-bubble::after {
  right: 24px;
  border-width: 0 0 12px 12px;
  border-color: transparent transparent transparent rgba(240, 240, 240, 0.7);
}

.user-quote-text {
  margin: 0;
  position: relative;
  z-index: 1;
}

.user-quote-attribution {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 16px;
  color: var(--accent);
}

.user-quote-card--purple .user-quote-attribution {
  text-align: left;
}

.user-quote-card--green .user-quote-attribution {
  text-align: right;
}

/* ── Image carousel ── */
.image-carousel {
  position: relative;
  width: 100%;
  margin: 24px 0;
}

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
  animation: carouselFade 0.5s ease;
}

.carousel-slide img {
  width: 100%;
  border-radius: 8px;
}

@keyframes carouselFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 600px) {
  .user-quotes {
    flex-direction: column;
  }
}

.project-problem-quote {
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: italic;
  line-height: 1.625;
  color: #000;
  margin: 0 0 12px;
}

.project-single-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.project-gallery-item {
  position: relative;
  overflow: hidden;
}

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.project-gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.project-gallery-item--wide {
  grid-column: 1 / -1;
}

.project-gallery-item--tall {
  grid-row: span 2;
}

.project-img-placeholder {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
}

/* ── Full-page layout modifier ── */
.project-page--full .project-meta {
  width: 100%;
}

.project-page--full .project-left {
  width: 100%;
  overflow-x: hidden;
}

.project-page--full .project-left-scroll {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 64px 0;
}

.project-page--full .project-right-detail {
  display: none;
}

/* ── Compliance table ── */
.compliance-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 32px 0;
  padding: 48px calc((100vw - 800px) / 2 + 64px);
  background: #fff;
  box-sizing: border-box;
}

.compliance-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  color: #555;
  margin: 0 0 24px;
}

.compliance-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.compliance-table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  padding: 0 12px 12px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.compliance-table thead th:first-child {
  width: 80px;
}

.compliance-table tbody td {
  padding: 12px;
  vertical-align: top;
  border-bottom: 1px solid #f0f0f0;
}

.compliance-day {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #888;
  white-space: pre-line;
  text-align: right;
  padding-right: 16px !important;
}

.compliance-bubble {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  padding: 12px 16px;
  border-radius: 12px;
  color: #333;
}

.compliance-bubble--low {
  background: #f3e8ff;
}

.compliance-bubble--mid {
  background: #e8f4fb;
}

.compliance-bubble--high {
  background: #e8f5e9;
}

/* ── Full-width banner ── */
.project-banner {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 32px 0;
  padding: 48px calc((100vw - 800px) / 2 + 64px);
  background: #1c1c1c;
  box-sizing: border-box;
}

.project-banner-text {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  margin: 0;
  max-width: 600px;
}

/* ── Journey stage grid ── */
.project-journey-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 24px;
}

.journey-stage {
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.journey-stage-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0 0 8px;
}

.journey-stage-question {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.625;
  color: #000;
  margin: 0 0 4px;
}

.journey-stage-question::before {
  content: "\2192 ";
  color: rgba(0, 0, 0, 0.3);
}

/* ── Survey chart (full-page layout) ── */
.project-survey {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 32px 0;
  padding: 48px calc((100vw - 800px) / 2 + 64px);
  background: #1c1c1c;
  display: flex;
  gap: 48px;
  align-items: center;
  box-sizing: border-box;
}

.survey-quote {
  flex: 0 0 260px;
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.4;
  color: #fff;
  position: relative;
}

.survey-quotemark {
  font-size: 64px;
  line-height: 0;
  color: #d4c4f0;
  position: absolute;
  left: -20px;
  top: 16px;
}

.survey-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.survey-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.survey-row--highlight .survey-label {
  font-weight: 700;
}

.survey-label {
  flex: 0 0 200px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

.survey-row--highlight .survey-label {
  color: #fff;
}

.survey-track {
  flex: 1;
  height: 28px;
  background: #2a2a2a;
  border-left: 1px solid #444;
  position: relative;
}

.survey-fill {
  height: 100%;
  transition: width 0.6s ease;
}

.survey-pct {
  flex: 0 0 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-align: left;
}

.survey-row--highlight .survey-pct {
  color: #fff;
  font-weight: 700;
}

/* ── Inline images (full-page layout) ── */
.project-inline-image {
  margin: 32px -64px;
}

.project-inline-image img {
  width: 100%;
  display: block;
}

.project-inline-image--small {
  margin: 32px auto;
  max-width: 500px;
}

/* ── Showcase section (two-col: text left, images right) ── */
.project-showcase {
  padding: 32px 0;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  border-top: none;
  position: relative;
  margin-top: 32px;
}

.project-showcase::before {
  content: "";
  position: absolute;
  top: 0;
  left: -64px;
  right: -64px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.project-showcase:first-child {
  margin-top: 0;
}

.project-showcase:first-child::before {
  display: none;
}

.project-showcase-text {
  flex: 0 0 28%;
}

.project-showcase-text h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  color: var(--accent);
  margin: 0 0 12px 0;
}

.project-showcase-text p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  line-height: 1.625;
  margin: 0;
  white-space: pre-line;
}

.project-showcase-images {
  flex: 1;
  display: flex;
  gap: 8px;
  min-width: 0;
  align-items: center;
}

.project-showcase-images img {
  max-height: 300px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.project-showcase-images img:only-child {
  max-height: none;
  width: 100%;
}

.project-showcase-images--stack .showcase-slide {
  position: relative;
  opacity: 1;
  display: block;
  margin-bottom: 12px;
}

.project-showcase-images--stack .showcase-slide img {
  width: 100%;
}

.project-showcase-images--rotate {
  position: relative;
}

.showcase-slide {
  opacity: 0;
  transition: opacity 0.6s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.showcase-slide.active {
  opacity: 1;
  position: relative;
}

.showcase-slide img {
  width: 100%;
  max-height: none;
  height: auto;
}

.showcase-slide-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #666;
  margin-top: 6px;
}

/* ── Contact section ── */
.contact-section {
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-content {
  text-align: center;
}

.contact-title {
  color: #fff;
  font-size: 24px;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.contact-link:hover {
  opacity: 0.7;
}

/* Nav dot fallback circle (for contact) */
.nav-dot-circle {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--dot-inactive);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nav-dot.active .nav-dot-circle {
  border-color: var(--accent);
  background-color: var(--accent);
}

/* ── Hidden utility ── */
[hidden] {
  display: none !important;
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .section-title {
    font-size: 22px;
  }

  .section-left {
    padding: 0 40px;
  }

  .process-right {
    padding: 40px;
  }

  .process-text {
    font-size: 14px;
  }

  .chat-switch-link {
    top: 32px;
    left: 40px;
  }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  .compliance-wrap {
    padding: 32px 24px;
    left: 0;
    transform: none;
    width: auto;
    margin: 24px -24px;
    overflow-x: auto;
  }

  .project-banner {
    padding: 32px 24px;
    left: 0;
    transform: none;
    width: auto;
    margin: 24px -24px;
  }

  .project-banner-text {
    font-size: 14px;
  }

  .project-journey-grid {
    grid-template-columns: 1fr;
  }

  .project-survey {
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
    left: 0;
    transform: none;
    width: auto;
    margin: 24px -24px;
  }

  .survey-quote {
    flex: none;
    font-size: 18px;
    padding-left: 20px;
  }

  .survey-quotemark {
    font-size: 48px;
    left: -4px;
    top: 12px;
  }

  .survey-label {
    flex: 0 0 120px;
    font-size: 10px;
  }

  .scroll-section {
    flex-direction: column;
  }

  .section-left {
    width: 100%;
    padding: 80px 24px 24px;
    justify-content: flex-start;
    flex: none;
  }

  .section-right {
    width: 100%;
    flex: 1;
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .section-right.no-border {
    border-top: none;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .section-subtitle {
    font-size: 11px;
  }

  .hero-subtitle {
    margin-bottom: 32px;
  }

  .switch-link {
    font-size: 14px;
  }

  /* Nav dots — smaller on mobile */
  .nav-dots {
    left: 12px;
    top: 16px;
    gap: 2px;
  }

  .nav-dot {
    width: 20px;
    height: 20px;
  }

  /* Gallery — show tags by default on touch */
  .gallery-tag {
    opacity: 1;
    transform: translateY(0);
  }

  /* Process */
  .process-right {
    padding: 24px;
  }

  .process-text {
    font-size: 13px;
    line-height: 1.5;
  }

  /* About */
  .about-right {
    flex-direction: column;
    padding: 24px;
    gap: 24px;
  }

  .about-photos {
    margin: 0 -24px -24px;
  }

  /* Projects on mobile */
  .projects-right {
    min-height: 300px;
  }
  .project-col-item {
    padding: 0 20px;
    font-size: 10px;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* Project detail */
  .project-meta {
    width: 100%;
  }

  .project-meta-col {
    padding: 10px 12px;
    font-size: 11px;
  }

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

  .project-left {
    width: 100%;
    height: auto;
    flex: none;
  }

  .project-left-scroll {
    padding: 24px;
  }

  .project-right-detail {
    width: 100%;
    min-height: 50vh;
  }

  /* Scroll indicator */
  .scroll-indicator {
    bottom: 16px;
    border-left-width: 14px;
    border-right-width: 14px;
    border-top-width: 18px;
  }

  /* Chat mode */
  .chat-mode {
    padding: 0;
  }

  .chat-switch-link {
    top: 24px;
    left: 24px;
  }

  .chat-history {
    padding: 80px 16px 12px;
  }

  .chat-input-wrap {
    padding: 12px 16px 24px;
    width: 100%;
  }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
  .section-title {
    font-size: 18px;
  }

  .section-left {
    padding: 72px 20px 20px;
  }

  .process-right {
    padding: 20px;
  }

  .process-text {
    font-size: 12px;
  }

  .chat-intro-heading {
    font-size: 20px;
  }
}
