@import url('../fonts/fonts.css');

/* ============ TOKENS ============ */
:root {
  --ink: #0b0b0c;
  --ink-2: #15151a;
  --bone: #f3efe6;
  --bone-2: #e8e2d3;
  --accent: #d8d8d8;
  --font-display: 'Instrument Serif';
  --font-ui: 'Geist';
  --font-mono: 'JetBrains Mono';
}

html { scroll-behavior: smooth; }
body { background: var(--ink); color: var(--bone); }

/* hide native cursor when our custom one is on */
body.has-cursor, body.has-cursor * { cursor: none !important; }

/* ============ CUSTOM CURSOR ============ */
#cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
  left: 0; top: 0;
  will-change: transform;
}
#cursor-ring {
  width: 36px; height: 36px;
  border-color: var(--bone);
  border-width: 1px;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease, opacity 0.2s ease;
  left: 0; top: 0;
  will-change: transform;
  mix-blend-mode: difference;
}
.cursor-hover #cursor-ring {
  width: 72px; height: 72px;
  border-color: var(--accent);
  background: rgba(216,216,216,0.05);
}
.cursor-hover #cursor-dot {
  width: 0; height: 0;
}
body:not(.has-cursor) #cursor-dot,
body:not(.has-cursor) #cursor-ring { opacity: 0; }

/* ============ GRAIN ============ */
#grain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 0.6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); }
  10% { transform: translate(-3%,-2%); }
  20% { transform: translate(2%,3%); }
  30% { transform: translate(-1%,4%); }
  40% { transform: translate(3%,-1%); }
  50% { transform: translate(-2%,2%); }
  60% { transform: translate(4%,-3%); }
  70% { transform: translate(-3%,-2%); }
  80% { transform: translate(2%,3%); }
  90% { transform: translate(-1%,-4%); }
  100% { transform: translate(0,0); }
}

/* ============ MOUSE BLOB ============ */
#blob {
  width: 600px; height: 600px;
  background: radial-gradient(circle at center,
    color-mix(in oklch, var(--accent) 60%, transparent) 0%,
    transparent 60%);
  filter: blur(80px);
  transform: translate(-50%, -50%);
  left: 50%; top: 50%;
  opacity: 0.55;
  transition: opacity 0.4s ease;
  will-change: transform;
}

/* ============ INTRO ============ */
.intro-content { opacity: 1; transition: opacity 0.5s ease 0.1s; }
.intro-word { display: inline-block; transform: translateY(110%); opacity: 0; }
.intro-cols { transform: translateY(0); }
.intro-col { background: var(--ink); will-change: transform; }

body.intro-played .intro-content { opacity: 0; }
body.intro-played .intro-col { transform: translateY(-100%); transition: transform 1s cubic-bezier(0.85,0,0.15,1); }
body.intro-played .intro-col:nth-child(1) { transition-delay: 0ms; }
body.intro-played .intro-col:nth-child(2) { transition-delay: 60ms; }
body.intro-played .intro-col:nth-child(3) { transition-delay: 120ms; }
body.intro-played .intro-col:nth-child(4) { transition-delay: 180ms; }
body.intro-played .intro-col:nth-child(5) { transition-delay: 240ms; }
body.intro-played .intro-col:nth-child(6) { transition-delay: 300ms; }
body.intro-played #intro { transition: visibility 0s linear 1.4s; visibility: hidden; }
body.no-intro #intro { display: none !important; }

/* ============ NAV LINKS ============ */
.nav-link { position: relative; padding: 4px 0; }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.65,0,0.35,1);
}
.nav-link:hover::after { transform: scaleX(1); }

/* ============ STATUS DOT ============ */
.status-dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 70%, transparent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* ============ MARQUEE ============ */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track {
  display: inline-flex; gap: 4rem; align-items: center;
  animation: marquee 38s linear infinite;
  white-space: nowrap;
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 4rem; }
.marquee[data-direction="reverse"] .marquee-track { animation-direction: reverse; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ PROJECT PLACEHOLDERS ============ */
.project-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(243,239,230,0.55);
}
.project-placeholder::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(243,239,230,0.05) 0px,
    rgba(243,239,230,0.05) 1px,
    transparent 1px,
    transparent 14px
  );
}
.project-placeholder::after {
  content: attr(data-label);
  position: relative; z-index: 1;
}
.project-placeholder[data-tone="amber"]::before {
  background-color: color-mix(in oklch, var(--accent) 35%, var(--ink));
}
.project-placeholder[data-tone="amber"] { color: rgba(11,11,12,0.7); }
.project-placeholder[data-tone="amber"]::before {
  background-image: repeating-linear-gradient(
    135deg, rgba(11,11,12,0.08) 0px, rgba(11,11,12,0.08) 1px, transparent 1px, transparent 14px),
    radial-gradient(ellipse at 70% 30%, color-mix(in oklch, var(--accent) 80%, white) 0%, color-mix(in oklch, var(--accent) 35%, var(--ink)) 80%);
}
.project-placeholder[data-tone="bone"]::before {
  background-color: var(--bone);
  background-image: repeating-linear-gradient(
    135deg, rgba(11,11,12,0.04) 0px, rgba(11,11,12,0.04) 1px, transparent 1px, transparent 14px);
}
.project-placeholder[data-tone="bone"] { color: rgba(11,11,12,0.5); }
.project-placeholder[data-tone="dark"]::before {
  background-color: #1a1a1f;
  background-image: repeating-linear-gradient(
    135deg, rgba(243,239,230,0.04) 0px, rgba(243,239,230,0.04) 1px, transparent 1px, transparent 14px);
}
.project-placeholder[data-tone="accent"]::before {
  background-color: var(--ink-2);
  background-image:
    radial-gradient(circle at 30% 40%, color-mix(in oklch, var(--accent) 50%, transparent), transparent 50%),
    radial-gradient(circle at 80% 70%, color-mix(in oklch, var(--accent) 30%, transparent), transparent 50%),
    repeating-linear-gradient(135deg, rgba(243,239,230,0.04) 0px, rgba(243,239,230,0.04) 1px, transparent 1px, transparent 14px);
}
.project-placeholder[data-tone="bone-light"]::before {
  background-color: #ecdfc4;
  background-image: repeating-linear-gradient(
    135deg, rgba(11,11,12,0.05) 0px, rgba(11,11,12,0.05) 1px, transparent 1px, transparent 14px);
}
.project-placeholder[data-tone="bone-light"] { color: rgba(11,11,12,0.45); }

/* live screenshot overlay (thum.io) */
.project-media { position: relative; }
.project-screenshot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2,0,0.2,1);
}
.project-screenshot.loaded { opacity: 1; }
.project-card:hover .project-screenshot { transform: scale(1.03); }

/* ============ IMAGE REVEAL ON SCROLL ============ */
[data-reveal] .project-media { position: relative; }
[data-reveal] .project-media::after {
  content: ''; position: absolute; inset: 0;
  background: var(--ink);
  transform-origin: bottom center;
  transition: transform 1.1s cubic-bezier(0.7,0,0.2,1);
  z-index: 2;
}
[data-reveal].in-view .project-media::after { transform: scaleY(0); }

[data-reveal] .project-placeholder {
  transform: scale(1.18);
  transition: transform 1.6s cubic-bezier(0.2,0,0.2,1);
}
[data-reveal].in-view .project-placeholder { transform: scale(1); }

[data-reveal] h3,
[data-reveal] .project-card-meta {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s ease 0.3s, transform 0.8s cubic-bezier(0.2,0,0.2,1) 0.3s;
}
[data-reveal].in-view h3,
[data-reveal].in-view .project-card-meta { opacity: 1; transform: translateY(0); }

.project-card a { display: block; }
.project-card .project-media { transition: transform 0.6s cubic-bezier(0.2,0,0.2,1); }
.project-card:hover .project-media { transform: translateY(-6px); }

/* ============ HERO SCRAMBLE LINES ============ */
[data-scramble] {
  display: block;
  position: relative;
}

/* ============ SKILL CELL ============ */
.skill-cell {
  background: var(--ink);
  padding: 2rem 1.5rem;
  min-height: 160px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: background 0.3s ease;
}
.skill-cell:hover { background: var(--ink-2); }

/* ============ CASE PANELS ============ */
.case-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(50px);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2,0,0.2,1);
}
.case-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 2;
}
.case-shot { background-position: center; background-size: cover; }

/* case-shot images: portrait demo cards fill the tall column */
.case-shot .project-screenshot {
  object-fit: cover;
  object-position: center;
}

/* case study side rail */
.case-rail {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 3;
  pointer-events: none;
}
.case-rail-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(11,11,12,0.3);
  transition: color 0.4s ease, transform 0.4s ease;
}
.case-rail-step::before {
  content: '';
  width: 12px; height: 1px;
  background: rgba(11,11,12,0.2);
  transition: width 0.4s ease, background 0.4s ease;
}
.case-rail-step.is-active {
  color: var(--ink);
  transform: translateX(4px);
}
.case-rail-step.is-active::before {
  width: 28px;
  background: var(--accent);
}
@media (max-width: 1024px) {
  .case-rail { display: none; }
}

/* ============ TIMELINE HOVER ============ */
.timeline-row { transition: padding-left 0.4s ease; }
.timeline-row:hover { padding-left: 1.5rem; }
.timeline-row { position: relative; }
.timeline-row::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 0; height: 1px;
  background: var(--accent); transform: translateY(-50%);
  transition: width 0.4s ease;
}
.timeline-row:hover::before { width: 1rem; }

/* ============ FORM ============ */
.form-field { border-bottom: 1px solid rgba(243,239,230,0.15); padding-bottom: 1rem; transition: border-color 0.3s ease; }
.form-field:focus-within { border-color: var(--accent); }
.form-field label { display: block; margin-bottom: 0.6rem; }
.form-input {
  width: 100%; background: transparent; border: none; outline: none;
  font-family: var(--font-ui); font-size: 1.05rem; color: var(--bone);
  padding: 0;
}
.form-input::placeholder { color: rgba(243,239,230,0.3); }
.form-select { appearance: none; cursor: pointer; }
.form-select option { background: var(--ink); color: var(--bone); }

/* ============ SCROLL ARROW ============ */
.scroll-arrow { animation: arrow 2s ease-in-out infinite; }
@keyframes arrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* ============ TWEAKS PANEL ============ */
/* removed — design is locked in */

/* ============ MOBILE DRAWER ============ */
#mobile-drawer {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s cubic-bezier(0.85,0,0.15,1);
}
#mobile-drawer.is-open {
  clip-path: inset(0 0 0 0);
}
#mobile-drawer a {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#mobile-drawer.is-open a {
  opacity: 1; transform: translateY(0);
}
#mobile-drawer.is-open a:nth-child(1) { transition-delay: 0.15s; }
#mobile-drawer.is-open a:nth-child(2) { transition-delay: 0.2s; }
#mobile-drawer.is-open a:nth-child(3) { transition-delay: 0.25s; }
#mobile-drawer.is-open a:nth-child(4) { transition-delay: 0.3s; }
#mobile-drawer.is-open a:nth-child(5) { transition-delay: 0.35s; }
#mobile-drawer.is-open a:nth-child(6) { transition-delay: 0.4s; }
#mobile-menu-btn { transition: transform 0.3s ease; }
#mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
#mobile-menu-btn.is-open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
#mobile-menu-btn span { transition: transform 0.3s ease; transform-origin: center; }

/* ============ WORK SECTION — VIEW TOGGLE ============ */
#work[data-view="index"] .work-grid { display: none; }
#work[data-view="grid"] .work-index { display: none; }

.view-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid rgba(243,239,230,0.15);
  border-radius: 999px;
  padding: 3px;
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: rgba(243,239,230,0.55);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.view-btn:hover { color: var(--bone); }
.view-btn.is-active {
  background: var(--bone);
  color: var(--ink);
}
.view-btn svg { display: block; }

/* ============ WORK INDEX (editorial list) ============ */
.work-index {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(243,239,230,0.12);
}
.work-row {
  position: relative;
  border-bottom: 1px solid rgba(243,239,230,0.12);
  transition: background 0.4s ease;
}
.work-row > a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto 32px;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 0;
  color: var(--bone);
  text-decoration: none;
  transition: padding 0.5s cubic-bezier(0.2,0,0.2,1), color 0.3s ease;
}
.work-row:hover > a {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.work-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 20% 50%, color-mix(in oklch, var(--bone) 6%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.work-row:hover::before { opacity: 1; }

.work-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(243,239,230,0.4);
  align-self: start;
  margin-top: 0.5rem;
}
.work-name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25em;
  min-width: 0;
}
.work-name-text {
  transition: transform 0.5s cubic-bezier(0.2,0,0.2,1);
  display: inline-block;
}
.work-row:hover .work-name-text { transform: translateX(8px); }
.work-name-italic {
  font-style: italic;
  color: rgba(243,239,230,0.35);
  font-size: 0.55em;
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.work-row:hover .work-name-italic {
  opacity: 0.7;
  transform: translateX(12px);
}
.work-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243,239,230,0.5);
  white-space: nowrap;
}
.work-year {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(243,239,230,0.5);
  white-space: nowrap;
}
.work-arrow {
  font-family: var(--font-mono);
  font-size: 18px;
  color: rgba(243,239,230,0.4);
  transform: translateX(-4px) rotate(0deg);
  transition: transform 0.5s cubic-bezier(0.2,0,0.2,1), color 0.3s ease;
  display: inline-block;
}
.work-row:hover .work-arrow {
  transform: translateX(0) rotate(45deg);
  color: var(--accent);
}

/* ============ CURSOR-FOLLOWING PREVIEW IMAGE ============ */
.work-preview {
  position: fixed;
  pointer-events: none;
  width: clamp(280px, 24vw, 420px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2,0,0.2,1);
  z-index: 5;
  border: 1px solid rgba(243,239,230,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  will-change: transform, top, left;
  top: 50%;
  left: 50%;
}
.work-row.is-hovered .work-preview {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(var(--rot, -2deg));
}

/* mobile: switch index to a simpler stacked layout, hide preview */
@media (max-width: 768px) {
  .work-row > a {
    grid-template-columns: 36px 1fr auto;
    grid-template-areas:
      "num name name"
      "num tag year";
    gap: 0.75rem 1rem;
    padding: 1.25rem 0;
  }
  .work-num { grid-area: num; margin-top: 0.6rem; }
  .work-name { grid-area: name; font-size: clamp(1.5rem, 7vw, 2.25rem); }
  .work-name-italic { display: none; }
  .work-tag { grid-area: tag; font-size: 9px; }
  .work-year { grid-area: year; font-size: 9px; }
  .work-arrow { display: none; }
  .work-preview { display: none; }
  .work-row:hover > a {
    padding-left: 0;
    padding-right: 0;
  }
  .work-row:hover .work-name-text { transform: none; }
  /* on mobile, prefer grid view by default since list lacks images */
  .view-toggle .view-btn span { display: none; }
}

/* ============ ARCHIVE CARDS ============ */
.archive-card .project-media { transition: transform 0.4s ease; }
.archive-card:hover .project-media { transform: translateY(-4px); }
.archive-card.is-hidden { display: none; }

/* ============ ARCHIVE FILTER CHIPS ============ */
.archive-chip {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(243,239,230,0.15);
  color: var(--bone);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.3s ease;
}
.archive-chip:hover { border-color: var(--accent); color: var(--accent); }
.archive-chip.is-active { background: var(--bone); color: var(--ink); border-color: var(--bone); }

/* ============ SERVICES ============ */
.service-card {
  position: relative;
  padding: 2.5rem 2rem;
  border-top: 1px solid rgba(243,239,230,0.1);
  transition: background 0.4s ease;
}
.service-card:hover { background: rgba(243,239,230,0.02); }
.service-card .service-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(243,239,230,0.3);
  margin-bottom: 1.5rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.service-card p {
  font-size: 0.95rem;
  color: rgba(243,239,230,0.6);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.service-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(243,239,230,0.7);
}
.service-card ul li::before {
  content: '— ';
  color: var(--accent);
}

/* ============ CODE SHOWCASE ============ */
.code-block {
  background: #0a0a0c;
  border: 1px solid rgba(243,239,230,0.08);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(243,239,230,0.08);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243,239,230,0.4);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(243,239,230,0.15); }
.code-body {
  padding: 1.5rem;
  overflow-x: auto;
  color: rgba(243,239,230,0.85);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.code-body .tk-kw { color: #c89aff; }
.code-body .tk-fn { color: #ffd591; }
.code-body .tk-str { color: #b6e3a3; }
.code-body .tk-cm { color: rgba(243,239,230,0.35); font-style: italic; }
.code-body .tk-var { color: #82c8ff; }
.code-body .tk-num { color: #ffb86c; }
.code-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.code-tab {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(243,239,230,0.15);
  color: rgba(243,239,230,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.code-tab:hover { color: var(--bone); border-color: rgba(243,239,230,0.4); }
.code-tab.is-active { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.code-pane { display: none; }
.code-pane.is-active { display: block; }

/* ============ FAQ ACCORDION ============ */
.faq-item {
  border-top: 1px solid rgba(243,239,230,0.1);
}
.faq-item:last-child { border-bottom: 1px solid rgba(243,239,230,0.1); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  background: transparent;
  border: none;
  color: var(--bone);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.2;
  transition: opacity 0.3s ease;
}
.faq-question:hover { opacity: 0.7; }
.faq-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(243,239,230,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(243,239,230,0.5);
  transition: transform 0.4s ease, border-color 0.3s ease, color 0.3s ease;
}
.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.2,0,0.2,1);
}
.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}
.faq-answer > div {
  overflow: hidden;
}
.faq-answer p {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(243,239,230,0.6);
  padding-bottom: 1.75rem;
  max-width: 65ch;
}

/* ============ BACK TO TOP ============ */
#back-to-top { transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s ease, color 0.3s ease; }
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ============ READING PROGRESS ============ */
#read-progress-bar {
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 50%, var(--bone)));
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  #grain { animation: none; }
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  #cursor-dot, #cursor-ring { display: none; }
  body.has-cursor, body.has-cursor * { cursor: auto !important; }
  .case-pin { height: auto !important; }
  .case-stage { position: relative !important; height: auto !important; }
  .case-panel { position: relative !important; opacity: 1 !important; padding: 4rem 1rem !important; transform: none !important; pointer-events: auto !important; }
  /* shrink heavy display copy on phones */
  .marquee-track { gap: 2rem; }
  .marquee-track > span { gap: 2rem; }
  /* tweaks panel selector removed */
  /* footer email */
  footer .font-display { font-size: 2.5rem !important; line-height: 1.05; word-break: break-all; }
  /* contact giant h2 */
  #contact h2 { font-size: 12vw !important; }
  /* hide blob on mobile to save perf */
  #blob { display: none; }
  /* mobile drawer text scale */
  #mobile-drawer a.font-display { font-size: clamp(2rem, 9vw, 3rem); }
}

