:root {
  --bg: #F6F4EF;
  --bg-2: #EDEAE2;
  --fg: #0E0E0C;
  --mute: #6B675F;
  --mute-2: #A09B91;
  --line: rgba(14,14,12,0.10);
  --accent: #C44A2E;
}
.dark {
  --bg: #0E0E0C;
  --bg-2: #161512;
  --fg: #F6F4EF;
  --mute: #9A958B;
  --mute-2: #5C5850;
  --line: rgba(246,244,239,0.10);
  --accent: #E2674A;
}

html, body { background: var(--bg); color: var(--fg); }
body {
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01","ss02","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.display        { font-family: 'Instrument Serif', ui-serif, Georgia, serif; font-weight: 400; }
.display-italic { font-family: 'Instrument Serif', ui-serif, Georgia, serif; font-style: italic; }

.hairline  { border-color: var(--line); }
.text-mute  { color: var(--mute); }
.text-mute2 { color: var(--mute-2); }
.bg-band    { background: var(--bg-2); }
.text-accent { color: var(--accent); }
.bg-accent   { background: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

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

/* Custom cursor */
.has-cursor, .has-cursor * { cursor: none !important; }
#cursor-dot, #cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate3d(-100px,-100px,0);
  mix-blend-mode: difference;
}
#cursor-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #F6F4EF;
  transition: transform 60ms linear, width 200ms ease, height 200ms ease;
}
#cursor-ring {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(246,244,239,0.6);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), width 250ms ease, height 250ms ease, opacity 200ms ease;
}
.cursor-grow #cursor-ring { width: 56px; height: 56px; }
.cursor-grow #cursor-dot  { width: 10px; height: 10px; }
@media (hover: none), (prefers-reduced-motion: reduce) {
  #cursor-dot, #cursor-ring { display: none; }
  .has-cursor, .has-cursor * { cursor: auto !important; }
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* External-link arrow */
.ext::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.28em;
  font-size: 0.85em;
  transform: translateY(-0.05em);
  transition: transform 250ms cubic-bezier(.2,.7,.2,1), color 200ms ease;
}
.ext:hover::after { transform: translate(0.12em, -0.18em); color: var(--accent); }

/* Project cards */
.card { transition: transform 400ms cubic-bezier(.2,.7,.2,1); }
.card:hover { transform: translateY(-4px); }
.card .shot { transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 400ms ease; filter: saturate(0.92); }
.card:hover .shot { transform: scale(1.025); filter: saturate(1.05); }
.card .arrow { transition: transform 350ms cubic-bezier(.2,.7,.2,1), color 200ms ease; }
.card:hover .arrow { transform: translate(2px,-2px); color: var(--accent); }

/* Availability pulse */
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(196,74,46,0.45); }
  80%  { box-shadow: 0 0 0 8px rgba(196,74,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(196,74,46,0); }
}
.avail-dot { animation: pulseDot 2.2s ease-out infinite; }

/* Command palette */
#cmdk-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
}
.cmdk-item[aria-selected="true"] { background: var(--bg-2); }
.dark .cmdk-item[aria-selected="true"] { background: rgba(246,244,239,0.06); }

/* Striped image placeholder */
.stripes {
  background-color: var(--bg-2);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(14,14,12,0.05) 0 1px,
    transparent 1px 8px
  );
}
.dark .stripes {
  background-color: #1a1916;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(246,244,239,0.04) 0 1px,
    transparent 1px 8px
  );
}

/* Video card play button */
.play-btn { transition: transform 300ms cubic-bezier(.2,.7,.2,1), background 300ms ease; }
.video-card:hover .play-btn { transform: scale(1.08); }

@keyframes pulsePlay {
  0%   { box-shadow: 0 0 0 0 rgba(246,244,239,0.35); }
  70%  { box-shadow: 0 0 0 18px rgba(246,244,239,0); }
  100% { box-shadow: 0 0 0 0 rgba(246,244,239,0); }
}
.dark .play-btn { animation: pulsePlay 2.6s ease-out infinite; }
@keyframes pulsePlayLight {
  0%   { box-shadow: 0 0 0 0 rgba(14,14,12,0.18); }
  70%  { box-shadow: 0 0 0 18px rgba(14,14,12,0); }
  100% { box-shadow: 0 0 0 0 rgba(14,14,12,0); }
}
.play-btn { animation: pulsePlayLight 2.6s ease-out infinite; }

/* Inline text links */
.ulink {
  position: relative;
  background-image: linear-gradient(currentColor,currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 200ms ease;
}
.ulink:hover { color: var(--accent); }

html.dark img.shot { filter: saturate(0.9) brightness(0.95); }

/* Image expand hint */
.img-expand-hint {
  opacity: 0;
  transition: opacity 200ms ease;
}
.img-btn:hover .img-expand-hint { opacity: 1; }

/* Lightbox */
#lightbox {
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#lightbox.open { animation: lbFadeIn 200ms ease forwards; }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
#lightbox-img {
  animation: lbScaleIn 250ms cubic-bezier(.2,.7,.2,1) forwards;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
@keyframes lbScaleIn { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Card arrow — tied to title link hover, not whole card */
.card-title:hover .arrow { transform: translate(2px,-2px); color: var(--accent); }

/* Nav blur backdrop */
header {
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
