/* ============================================================
   DJ DEVELOPS — digital business card
   Nocturne palette, but built to open instantly on a phone:
   no video, no canvas, no framework. One screen, then done.
   ============================================================ */
:root {
  --bg: #04070d;
  --panel: rgba(13, 20, 34, 0.72);
  --line: rgba(80, 120, 170, 0.16);
  --ink: #e8eef8;
  --muted: #93a1b8;
  --cyan: #39d7f2;
  --cyan-soft: rgba(57, 215, 242, 0.14);
  --teal: #2dd4bf;
  --amber: #f5a524;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  overflow-x: hidden;
}
.mono { font-family: var(--font-mono); }
a { color: var(--cyan); text-decoration: none; }
::selection { background: rgba(57, 215, 242, 0.35); color: #fff; }

/* ---------- backdrop: pure CSS, costs nothing ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 80% 6%, rgba(57, 215, 242, 0.18), transparent 62%),
    radial-gradient(55% 40% at 10% 88%, rgba(45, 212, 191, 0.12), transparent 60%),
    radial-gradient(40% 30% at 55% 45%, rgba(245, 165, 36, 0.05), transparent 62%),
    linear-gradient(180deg, #05080f 0%, #04070d 100%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 30%, transparent 55%, rgba(2, 4, 8, 0.85) 100%);
}

/* ---------- the card ---------- */
.card {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 34px 22px 24px;   /* tuned so the whole card lands inside one 844px phone screen */
  display: flex; flex-direction: column;
  animation: rise 0.6s var(--ease-out) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- identity ---------- */
.brand { display: flex; align-items: baseline; gap: 6px; margin-bottom: 30px; }
.brand-mark { font-family: var(--font-mono); font-weight: 700; font-size: 21px; color: var(--cyan); letter-spacing: 0.02em; }
.brand-dot { color: var(--amber); font-size: 10px; vertical-align: super; margin-left: 2px; animation: blink 2.4s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.brand-name { font-family: var(--font-mono); font-weight: 500; font-size: 17px; letter-spacing: 0.04em; color: var(--ink); }

.name { font-size: 38px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.role {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--teal); margin-top: 10px;
}
.pitch { color: var(--muted); font-size: 15.5px; margin-top: 16px; }
.here {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-top: 16px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

/* ---------- primary action ---------- */
.save {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 26px; padding: 15px 20px; border-radius: 12px;
  font-weight: 600; font-size: 15.5px; color: #03121a;
  background: linear-gradient(135deg, rgba(57, 215, 242, 0.95), rgba(45, 212, 191, 0.9));
  box-shadow: 0 6px 30px rgba(57, 215, 242, 0.25);
  transition: box-shadow 0.25s, transform 0.15s var(--ease-out);
}
.save:active { transform: scale(0.985); }
.save:hover { box-shadow: 0 8px 40px rgba(57, 215, 242, 0.42); }

/* ---------- contact rows ---------- */
.rows { margin-top: 26px; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 13px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.2s, padding-left 0.2s var(--ease-out);
}
.row:hover { background: rgba(57, 215, 242, 0.06); padding-left: 9px; }
.ico {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--cyan); font-family: var(--font-mono); font-size: 12px; line-height: 1;
}
.row > span:nth-child(2) { min-width: 0; }   /* lets the value ellipsis instead of pushing the row wide */
.row-label {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.row-value {
  display: block; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink);
  margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-go { color: var(--muted); font-size: 15px; transition: color 0.2s, transform 0.2s; }
.row:hover .row-go { color: var(--cyan); transform: translateX(2px); }

/* ---------- work link ---------- */
.work-link {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 26px; padding: 17px 18px;
  border: 1px solid rgba(57, 215, 242, 0.28); border-radius: 14px;
  background: var(--cyan-soft);
  transition: border-color 0.25s, background 0.25s, transform 0.15s var(--ease-out);
}
.work-link:hover { border-color: rgba(57, 215, 242, 0.55); background: rgba(57, 215, 242, 0.2); }
.work-link:active { transform: scale(0.99); }
.work-link b { display: block; color: var(--ink); font-size: 15.5px; font-weight: 600; }
.work-link span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.work-link .arrow { color: var(--cyan); font-size: 19px; flex: none; }

footer {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em;
  color: #5c6b82; text-align: center;
}

/* ============================================================
   WORK GALLERY (work.html)
   ============================================================ */
.gallery-head { width: min(1100px, 100%); margin: 0 auto; padding: 34px 22px 6px; }
.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 24px;
  transition: color 0.2s;
}
.back:hover { color: var(--cyan); }
.gallery-title { font-size: clamp(28px, 7vw, 40px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.gallery-sub { color: var(--muted); font-size: 15px; margin-top: 12px; max-width: 520px; }

.gallery {
  width: min(1100px, 100%); margin: 0 auto; padding: 30px 22px 50px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px;
}
/* A tile is a <button> so it's reachable by keyboard and announced as an
   action — the reset below is what stops it looking like one. */
.tile {
  display: block; width: 100%; padding: 0; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--panel);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.25s var(--ease-out);
}
.tile:hover {
  border-color: rgba(57, 215, 242, 0.4); transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 0 34px rgba(57, 215, 242, 0.08);
}
/* Placeholder art until a screenshot lands — the project's number, set in the
   brand gradient. Swapped out automatically when assets/work/<slug>.jpg exists. */
.shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(75% 85% at 30% 25%, rgba(57, 215, 242, 0.22), transparent 70%),
    linear-gradient(160deg, #0a1322, #060a12);
}
.tile:nth-child(3n + 2) .shot {
  background: radial-gradient(75% 85% at 70% 25%, rgba(45, 212, 191, 0.2), transparent 70%),
              linear-gradient(200deg, #0a1322, #060a12);
}
.tile:nth-child(3n + 3) .shot {
  background: radial-gradient(75% 85% at 50% 70%, rgba(245, 165, 36, 0.15), transparent 70%),
              linear-gradient(180deg, #0a1322, #060a12);
}
/* The poster is a real <img> layered over the placeholder gradient.
   It used to ride on ::after via an inline `--shot: url(...)` custom property,
   which silently never worked: a url() inside a custom property resolves
   against the STYLESHEET, not the document, so `assets/work/x.jpg` was being
   fetched from /card/css/assets/work/x.jpg and 404ing. The gradient stood in
   and it looked intentional. An <img> resolves against the page, and gets
   lazy-loading for free. */
.shot-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
.shot-num {
  font-family: var(--font-mono); font-size: 30px; font-weight: 700;
  color: rgba(232, 238, 248, 0.16); letter-spacing: 0.08em;
}
.tile-body { display: block; padding: 15px 16px 18px; }
.tile-h2 { display: block; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.tile-p { display: block; font-size: 11px; color: var(--muted); margin-top: 7px; line-height: 1.6; }

/* Play badge — only drawn on tiles that actually have a video, so the grid
   itself tells you which ones move before you click anything. */
.play {
  position: absolute; right: 11px; bottom: 11px; z-index: 1;
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid rgba(57, 215, 242, 0.45);
  background: rgba(4, 7, 13, 0.66); backdrop-filter: blur(6px);
  color: var(--cyan); font-size: 10px; padding-left: 2px;
  transition: background 0.25s, transform 0.25s var(--ease-out);
}
.tile:hover .play { background: rgba(57, 215, 242, 0.9); color: #03121a; transform: scale(1.12); }
.hint { color: var(--teal); }

:where(.tile, .sheet-close):focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}

/* ============================================================
   PROJECT DETAIL SHEET
   ============================================================ */
body.locked { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(2, 4, 8, 0.82); backdrop-filter: blur(7px); }
.sheet-panel {
  position: relative; width: min(880px, 100%); max-height: 92svh; overflow-y: auto;
  border: 1px solid rgba(57, 215, 242, 0.22); border-radius: 18px;
  background: linear-gradient(180deg, #0a1322, #060a12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  animation: sheet-in 0.32s var(--ease-out) both;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } }

.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: rgba(4, 7, 13, 0.8); backdrop-filter: blur(6px);
  color: var(--ink); font-size: 13px; line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}
.sheet-close:hover { background: rgba(57, 215, 242, 0.18); border-color: rgba(57, 215, 242, 0.5); }

.sheet-media { background: #04070d; border-bottom: 1px solid var(--line); }
.sheet-video { display: block; width: 100%; max-height: 60svh; object-fit: contain; background: #04070d; }
/* No demo video for this one — reuse the gallery's placeholder look rather
   than leaving a hole or apologising for it. */
.sheet-noshot {
  aspect-ratio: 16 / 7; display: grid; place-items: center;
  background: radial-gradient(70% 80% at 40% 30%, rgba(57, 215, 242, 0.16), transparent 70%),
              linear-gradient(160deg, #0a1322, #060a12);
}
.sheet-noshot .shot-num { font-size: 46px; }

.sheet-body { padding: 22px 26px 30px; }
.sheet-num { font-size: 11px; letter-spacing: 0.16em; color: var(--teal); }
.sheet-body h2 { font-size: clamp(22px, 4.2vw, 30px); font-weight: 700; letter-spacing: -0.025em; margin-top: 6px; }
.sheet-stack { font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); margin-top: 9px; }
.sheet-blurb { font-size: 16px; color: var(--ink); margin-top: 18px; max-width: 68ch; }
.sheet-h3 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--teal); margin-top: 24px;
}
.sheet-how { font-size: 15px; color: var(--muted); margin-top: 10px; max-width: 68ch; }

/* Keep a flick inside the sheet from scrolling the page behind it once the
   sheet hits its end — the classic iOS scroll-chaining annoyance. */
.sheet-panel { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .gallery-head { padding: 26px 18px 4px; }
  .gallery { padding: 22px 18px 40px; gap: 14px; grid-template-columns: 1fr; }
  .gallery-sub { font-size: 14.5px; }

  /* Full-bleed bottom sheet. The page uses viewport-fit=cover, so the bottom
     padding has to clear the home indicator itself or the last line of copy
     sits under it. */
  .sheet { padding: 0; align-items: end; }
  .sheet-panel {
    max-height: 92svh; border-radius: 18px 18px 0 0; border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sheet-body { padding: 20px 20px 30px; }
  .sheet-blurb { font-size: 15.5px; }
  .sheet-how { font-size: 14.5px; }

  .play { width: 34px; height: 34px; }
  /* The hover state never fires on touch, so give the badge its lit look
     permanently rather than leaving it looking disabled. */
  .tile .play { background: rgba(57, 215, 242, 0.9); color: #03121a; }
}

/* ---------- phone held sideways ---------- */
/* The panel is only ~360px tall here. Left alone, the video eats two thirds of
   it and the write-up is a letterbox slot, so cap the video and let the text
   have the rest. */
@media (max-height: 520px) and (orientation: landscape) {
  .sheet-panel { max-height: 96svh; }
  .sheet-video { max-height: 52svh; }
  .sheet-body { padding: 16px 22px 22px; }
  .sheet-body h2 { font-size: 21px; }
  .sheet-blurb { margin-top: 12px; }
  .sheet-h3 { margin-top: 16px; }
}

/* A touch device can't hover, so the lift-on-hover never happens; give the
   press itself the feedback instead. Keyed on the pointer rather than the
   width, so a phone held sideways still counts. */
@media (hover: none) {
  .tile:active { transform: scale(0.985); border-color: rgba(57, 215, 242, 0.4); }
  /* 36px is under every touch-target guideline; 44 is the floor. */
  .sheet-close { width: 44px; height: 44px; top: 10px; right: 10px; font-size: 15px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
