﻿/* ═══════════════════════════════════════════════════════════════════════
   mrubin.dev
   Ported from the Claude Design project "mrubin.dev Redesign".

   The design is dark-only — there is no light palette in it, so there is
   none here. Its `style-hover` attributes are a Design-Canvas construct and
   appear below as real :hover rules.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --accent:   #8fa9f7;

  /* Per-project accent, an r,g,b triplet sampled from the project's own
     screenshot (hue-normalised server-side). Set inline on each deck card,
     the feature section and each row; this is only the fallback for anything
     that reads it outside a project's scope. */
  --pa:       143, 169, 247;
  --bg:       #0c0c0f;
  --text:     #e9e9ec;
  --dim:      #c9c9d1;
  --muted:    #a2a2ac;
  --muted-2:  #9a9aa4;
  --soft:     #8b8b96;
  --faint:    #6d6d78;

  --card:     #131318;
  --card-hi:  #17171d;
  --figure:   #121216;
  --thumb:    #0e0e12;

  --line:     rgba(255, 255, 255, .09);
  --line-2:   rgba(255, 255, 255, .12);
  --line-3:   rgba(255, 255, 255, .14);
  --line-4:   rgba(255, 255, 255, .24);
  --line-5:   rgba(255, 255, 255, .32);

  --live:     #61cd99;
  --danger:   #f27a70;

  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --hatch: repeating-linear-gradient(45deg, transparent, transparent 12.7px,
           rgba(255, 255, 255, .05) 12.7px, rgba(255, 255, 255, .05) 14.14px);
}

/* ── keyframes ──────────────────────────────────────────────────────── */
@keyframes riseIn     { from { transform: translateY(118%); } to { transform: translateY(0); } }
@keyframes fadeUp     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes growX      { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes stripeSlide{ from { background-position: 0 0; } to { background-position: 20px 0; } }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  position: relative; /* the glow layer positions against the page, not the viewport */
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* One page-spanning element holds every section's radial wash, built by
   reveal.js from the sections' data-glow attributes. Sharing a canvas is what
   lets adjacent washes blend instead of cutting off at section borders. */
.glow-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; transition: color .12s; }
a:hover { color: var(--text); }

::selection { background: rgba(143, 169, 247, .3); color: #fff; }

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

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }

/* ═══ INTRO ═════════════════════════════════════════════════════════ */

.intro {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px clamp(24px, 6vw, 72px);
  overflow: hidden;
}

.corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  animation: fadeUp .6s ease both;
}

.corner-tl { top: 30px; left:  clamp(24px, 6vw, 72px); animation-delay: 1.15s; }
.corner-tr { top: 30px; right: clamp(24px, 6vw, 72px); animation-delay: 1.2s;  }
.corner-bl { bottom: 30px; left:  clamp(24px, 6vw, 72px); animation-delay: 1.25s; }
.corner-br { bottom: 30px; right: clamp(24px, 6vw, 72px); animation-delay: 1.3s;  }

.intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(40px, 6vw, 96px);
  row-gap: 56px;
  max-width: 1360px;
}

.intro-copy { flex: 1 1 520px; min-width: min(100%, 420px); max-width: 760px; }

/* name ---------------------------------------------------------------- */
.intro-name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(3rem, 9.5vw, 7.5rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.name-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.name-letter {
  display: inline-block;
  animation: riseIn .8s cubic-bezier(.16, 1, .3, 1) both;
}

.name-space { display: inline-block; width: 0.45em; }

.name-plain { display: inline-block; animation: fadeUp .6s ease .15s both; }

/* supporting copy ------------------------------------------------------ */
.intro-role {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--soft);
  margin: 22px 0 0;
  animation: fadeUp .6s ease .55s both;
}

.intro-hairline {
  height: 1px;
  max-width: 520px;
  background: rgba(255, 255, 255, .16);
  margin: 34px 0 0;
  transform-origin: left;
  animation: growX .8s cubic-bezier(.16, 1, .3, 1) .65s both;
}

.intro-text {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 54ch;
  margin: 28px 0 0;
  text-wrap: pretty;
  animation: fadeUp .6s ease .8s both;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin: 34px 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  animation: fadeUp .6s ease .95s both;
}

.intro-links a { color: var(--soft); display: inline-flex; align-items: center; gap: 8px; }
.intro-links a:hover { color: var(--text); }
.intro-links svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.intro-links .intro-jump { color: var(--accent); }
.intro-links .intro-jump:hover { color: var(--text); }

/* ── the deck ───────────────────────────────────────────────────────── */

.deck {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 34px 44px 18px;
  animation: fadeUp .6s ease 1.2s both;
}

.deck-card {
  width: 150px;
  aspect-ratio: 5 / 7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line-3);
  border-radius: 10px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .95);
  font-family: var(--mono);
  color: var(--dim);
  position: relative;
  transform: rotate(var(--rot, 0deg));
  transform-origin: 50% 135%;
  transition: transform .18s, border-color .18s, background .18s, color .18s, box-shadow .18s;
}

.deck-card + .deck-card { margin-left: -80px; }

.deck-card:hover,
.deck-card:focus-visible {
  transform: rotate(var(--rot, 0deg)) translateY(-18px);
  border-color: rgba(var(--pa), .6);
  background: var(--card-hi);
  color: var(--text);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .95), 0 0 26px -8px rgba(var(--pa), .35);
  z-index: 8;
}

.deck-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; align-self: flex-start; }
.deck-foot { align-self: flex-end; transform: rotate(180deg); }

.deck-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  color: rgba(var(--pa), .62);
}

.deck-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(var(--pa), .85); }

.deck-title { font-size: 0.72rem; line-height: 1.35; }

.deck-mid { display: flex; flex-direction: column; gap: 9px; }

.deck-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  background-color: var(--thumb);
  background-image: var(--hatch);
  overflow: hidden;
}

.deck-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ── scroll cue ─────────────────────────────────────────────────────── */

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  animation: fadeUp .7s ease 1.4s both;
}

.cue-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .4), transparent);
}

/* ═══ FEATURE ═══════════════════════════════════════════════════════ */

.feature { border-top: 1px solid var(--line); }
.feature-inner { max-width: 1280px; margin: 0 auto; padding: 84px clamp(24px, 5vw, 64px) 96px; }

.feature-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.feature-eyebrow { display: flex; align-items: baseline; gap: 16px; font-family: var(--mono); }
.feature-num   { font-size: 0.8125rem; color: rgba(var(--pa), .8); }
.feature-label { font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }

.feature-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 18px; margin: 24px 0 0; }

.feature-title h2 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.feature-what   { font-size: 1.125rem;  color: var(--dim);   max-width: 62ch; margin: 18px 0 0; text-wrap: pretty; }
.feature-detail { font-size: 0.9375rem; color: var(--muted); max-width: 70ch; margin: 30px 0 0; text-wrap: pretty; }

.feature-top .go { margin: 0; }

/* ═══ ROWS ══════════════════════════════════════════════════════════ */

.others { max-width: 1280px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 64px); }

.rule {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.rule-line { flex: 1; height: 1px; background: var(--line); }

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding: 72px 0;
}

.row + .row, .row-add { border-top: 1px solid var(--line); }

.row-media { min-width: 0; }
.row-body  { min-width: 0; }

.row-num { display: block; font-family: var(--mono); font-size: 0.8125rem; color: rgba(var(--pa), .8); }

.row-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 14px 0 0; }

.row-title h3 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  letter-spacing: -0.035em;
}

.row-what   { font-size: 1rem;     color: var(--dim);     max-width: 56ch; margin: 16px 0 0; text-wrap: pretty; }
.row-detail { font-size: 0.875rem; color: var(--muted-2); max-width: 60ch; margin: 12px 0 0; text-wrap: pretty; }

/* ═══ FIGURES ═══════════════════════════════════════════════════════ */

.shot {
  margin: 0;
  aspect-ratio: 16 / 10;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  background-color: var(--figure);
  background-image: var(--hatch);
  overflow: hidden;
  transition: border-color .15s;
  display: grid;
  place-items: center;
}

.shot-wide { aspect-ratio: 16 / 9; margin: 44px 0 0; }

.shot:hover { border-color: rgba(var(--pa), .45); animation: stripeSlide .9s linear infinite; }
.shot.has-image:hover { animation: none; }

.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.shot-hint {
  position: relative;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  background: rgba(12, 12, 15, .82);
  border-radius: 3px;
  padding: 5px 11px;
  text-align: center;
  max-width: 86%;
}

/* ═══ BADGES / TAGS / LINKS ═════════════════════════════════════════ */

.badge {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 3px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
}

/* All three kinds wear the project's hue; the KIND survives as weight —
   live is filled, local is outlined, wip is a faint wash. */
.badge.live  { color: rgb(var(--pa)); background: rgba(var(--pa), .14); }
.badge.local { color: rgba(var(--pa), .82); border: 1px solid rgba(var(--pa), .38); padding: 3px 8px; }
.badge.wip   { color: rgba(var(--pa), .75); background: rgba(var(--pa), .09); }

.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: rgb(var(--pa)); display: inline-block; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.tag {
  border: 1px solid rgba(var(--pa), .3);
  border-radius: 3px;
  padding: 2px 8px;
  color: rgba(var(--pa), .78);
  white-space: nowrap;
}

.tag.empty { color: var(--faint); font-style: italic; }

.go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.go-item { display: inline-flex; align-items: center; gap: 8px; }
.go-item > a { color: rgb(var(--pa)); }
.go-item > a:hover { color: var(--text); }
.go-arrow { color: rgba(var(--pa), .65); }

/* ═══ DETAIL OVERLAYS ═══════════════════════════════════════════════ */

/* Full-screen deep-dive per project. reveal.js shows/hides it and drives the
   FLIP morph; everything here is static layout. Titles and figures that open
   it advertise themselves. */
[data-open] { cursor: pointer; }
h2[data-open], h3[data-open] { transition: color .15s; }
h2[data-open]:hover, h3[data-open]:hover { color: rgb(var(--pa)); }

.detail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  transition: opacity .28s ease;
}

.detail-close {
  position: absolute;
  top: 20px;
  right: clamp(20px, 4vw, 40px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: .08em;
  color: var(--soft);
  background: var(--card);
  border: 1px solid var(--line-3);
  border-radius: 4px;
  padding: 8px 13px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.detail-close:hover { color: var(--text); border-color: var(--line-5); }

.detail-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.detail-inner { max-width: 1380px; margin: 0 auto; padding: 76px clamp(24px, 5vw, 64px) 96px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

.detail-copy { min-width: 0; }

.detail-eyebrow {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
}
.detail-num { font-size: 0.8125rem; color: rgba(var(--pa), .8); }
.detail-kind { font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }
.detail-eyebrow a { font-size: 0.8125rem; color: rgb(var(--pa)); }
.detail-eyebrow a:hover { color: var(--text); }

.detail-title {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
  will-change: transform;
}

.detail-what { font-size: 1.0625rem; color: var(--dim); max-width: 58ch; margin: 18px 0 0; text-wrap: pretty; }

.detail-h4 {
  margin: 36px 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.detail-p { font-size: 0.9375rem; color: var(--muted); max-width: 62ch; margin: 14px 0 0; text-wrap: pretty; }
.detail-p + .detail-p { margin-top: 12px; }

/* The owner edits why/built as one raw block — newlines must survive. */
.detail-edit-block { white-space: pre-wrap; }

.detail-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-list li { display: flex; gap: 12px; font-size: 0.9rem; color: var(--muted); max-width: 62ch; }
.detail-dash { color: rgba(var(--pa), .75); flex: none; }

.detail-stack {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  align-items: center;
  margin: 14px 0 0;
  font-family: var(--mono);
}
.detail-stack-note { font-size: 0.8125rem; color: var(--muted-2); font-family: var(--sans); }
.detail-copy .link-add { margin-top: 14px; }

.detail-media { min-width: 0; position: sticky; top: 24px; align-self: start; }

.detail-hero {
  margin: 0;
  aspect-ratio: 16 / 10;
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--figure);
  overflow: hidden;
  will-change: transform;
  display: grid;
  place-items: center;
}
.detail-hero-wide { aspect-ratio: 16 / 9; }
.detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: opacity .16s ease; }

.detail-caption { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); margin: 12px 0 0; min-height: 1.2em; }

.detail-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }

.thumb-wrap { position: relative; display: inline-flex; }

.thumb {
  width: 118px;
  flex: none;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--thumb);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
}
.thumb:hover { border-color: rgba(var(--pa), .45); }
.thumb.active { border-color: rgba(var(--pa), .7); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.thumb-tools {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity .12s;
}
.thumb-wrap:hover .thumb-tools, .thumb-tools:focus-within { opacity: 1; }
.thumb-tools button {
  font-family: var(--mono);
  font-size: 0.625rem;
  line-height: 1;
  color: var(--dim);
  background: rgba(12, 12, 15, .92);
  border: 1px solid var(--line-3);
  border-radius: 3px;
  padding: 3px 5px;
  cursor: pointer;
}
.thumb-tools button:hover { color: var(--text); border-color: var(--line-5); }

.thumb-add {
  width: 118px;
  flex: none;
  aspect-ratio: 16 / 10;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--soft);
  background: var(--card);
  border: 1px dashed var(--line-3);
  border-radius: 4px;
  cursor: pointer;
}
.thumb-add:hover { color: var(--text); border-color: var(--line-5); }

/* ═══ FOOTER ════════════════════════════════════════════════════════ */

.site-footer { border-top: 1px solid var(--line); }

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px clamp(24px, 5vw, 64px) 72px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

/* ═══════════════════════════════════════════════════════════════════
   OWNER MODE
   ═══════════════════════════════════════════════════════════════════ */

.editbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px clamp(24px, 5vw, 64px);
  background: #14192b;
  border-bottom: 1px solid var(--line-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.editbar-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

.editbar button {
  margin-left: auto;
  font: inherit;
  color: var(--accent);
  background: none;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 2px 10px;
  cursor: pointer;
}
.editbar button:hover { background: rgba(143, 169, 247, .12); }

/* Entrance animation and editing do not mix — a field that is mid-fade cannot
   be clicked, and the intro replays on every save-triggered reload. */
.is-owner .corner,
.is-owner .name-plain,
.is-owner .intro-role,
.is-owner .intro-hairline,
.is-owner .intro-text,
.is-owner .intro-links,
.is-owner .deck,
.is-owner .scroll-cue { animation: none; opacity: 1; transform: none; }

.is-owner .intro { min-height: auto; padding-top: 76px; padding-bottom: 72px; }
.is-owner .scroll-cue { display: none; }

/* editable text -------------------------------------------------------- */
.is-owner [data-edit] {
  border-radius: 3px;
  outline: 1px dashed transparent;
  outline-offset: 4px;
  transition: outline-color .12s, background .12s;
}
.is-owner [data-edit]:hover { outline-color: var(--line-3); }
.is-owner [data-edit]:focus { outline: 2px solid var(--accent); background: rgba(143, 169, 247, .08); }
.is-owner [data-edit]:empty::before { content: attr(data-placeholder); color: var(--faint); font-style: italic; }
.is-owner [data-edit].saving { outline-color: var(--accent); }
.is-owner [data-edit].saved  { outline: 1px solid var(--live); }
.is-owner [data-edit].failed { outline: 2px solid var(--danger); }

/* tags ----------------------------------------------------------------- */
.edit-tags { flex-direction: column; align-items: flex-start; gap: 10px; }
.edit-tags .tags-view { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-tags .tags-input {
  display: block;
  width: 100%;
  max-width: 60ch;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  border: 1px dashed var(--line-3);
  border-radius: 3px;
  padding: 4px 8px;
}

/* shots ---------------------------------------------------------------- */
.editable-shot { cursor: pointer; }

.shot-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: var(--mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(12, 12, 15, .9);
  border: 1px solid var(--line-3);
  border-radius: 3px;
  padding: 3px 8px;
  color: var(--muted);
  opacity: 0;
  transition: opacity .12s;
}
.editable-shot:hover .shot-badge,
.editable-shot:focus-visible .shot-badge { opacity: 1; }
.editable-shot.uploading { opacity: .55; }

/* status picker --------------------------------------------------------- */
.badge-edit select {
  font: inherit;
  font-size: 0.625rem;
  color: inherit;
  background: transparent;
  border: 0;
  border-left: 1px solid currentColor;
  padding-left: 6px;
  cursor: pointer;
}
.badge-edit select option { background: var(--card); color: var(--text); }

/* buttons ---------------------------------------------------------------- */
.link-add, .link-edit, .link-del,
.controls button,
.row-add button {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--soft);
  background: var(--card);
  border: 1px solid var(--line-3);
  border-radius: 3px;
  padding: 3px 9px;
  cursor: pointer;
  line-height: 1.6;
}

.link-add:hover, .link-edit:hover, .controls button:hover:not(:disabled),
.row-add button:hover { color: var(--text); border-color: var(--line-5); background: var(--card-hi); }

.link-del:hover, .danger:hover { color: var(--danger); border-color: var(--danger); }
.controls button:disabled { opacity: .5; cursor: default; }
.controls button.is-featured { color: var(--accent); border-color: var(--accent); }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
}

.row-add { display: grid; place-items: center; padding: 56px 0; }
.row-add button { padding: 11px 22px; font-size: 0.8125rem; }

/* toast ------------------------------------------------------------------ */
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 9px 16px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s, transform .16s;
  z-index: 40;
  max-width: min(90vw, 460px);
  text-align: center;
}
#toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--danger); color: #14100f; }

/* ═══ SIGN-IN MODAL ═════════════════════════════════════════════════ */

/* The way in. Styled as the corner label it replaces — a button that looks
   like a button here would be a permanent "admin" sign on a personal site. */
.corner-signin {
  font: inherit;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color .12s;
}
.corner-signin:hover { color: var(--muted); }

.auth-modal {
  width: min(92vw, 380px);
  padding: 30px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  position: relative;
}

.auth-modal::backdrop { background: rgba(6, 6, 8, .72); backdrop-filter: blur(3px); }

.auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
  line-height: 1;
  color: var(--faint);
  background: none;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
}
.auth-close:hover { color: var(--text); }

.auth-eyebrow {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 10px;
}

.auth-modal h2 {
  font-family: var(--mono);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-note { color: var(--muted); font-size: 0.875rem; margin: 10px 0 24px; }
.auth-hint { color: var(--faint); font-size: 0.75rem; font-family: var(--mono); margin: -6px 0 0; }

.auth-modal label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--soft);
  margin: 0 0 16px;
}

.auth-modal input {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-3);
  border-radius: 4px;
  padding: 9px 11px;
}
.auth-modal input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.auth-modal button[type="submit"] {
  width: 100%;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--bg);
  background: var(--text);
  border: 0;
  border-radius: 4px;
  padding: 11px;
  cursor: pointer;
}
.auth-modal button[type="submit"]:hover:not(:disabled) { opacity: .88; }
.auth-modal button[type="submit"]:disabled { opacity: .55; cursor: default; }

.auth-secondary {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--soft);
  background: none;
  border: 1px solid var(--line-3);
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
}
.auth-secondary:hover:not(:disabled) { color: var(--text); border-color: var(--line-5); }
.auth-secondary:disabled { opacity: .5; cursor: default; }

.auth-error { color: var(--danger); font-size: 0.8125rem; margin: 14px 0 0; }

.auth-warn {
  color: var(--muted);
  border-left: 2px solid var(--line-3);
  padding-left: 10px;
  margin: -8px 0 20px;
  line-height: 1.5;
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════════ */

/* Below the wrap point the deck sits under the copy, so it centres rather
   than hanging off the right edge. */
@media (max-width: 1180px) {
  .deck { margin: 0 auto; padding: 34px 40px 18px; }
}

@media (max-width: 720px) {
  .intro { padding: 88px clamp(20px, 6vw, 72px); }
  .corner-bl, .corner-br { display: none; }

  /* Six overlapping cards do not survive a phone. Scroll them instead. */
  .deck {
    width: 100%;
    padding: 24px 0 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .deck-card { transform: none; scroll-snap-align: center; flex: none; width: 132px; }
  .deck-card + .deck-card { margin-left: 12px; }
  .deck-card:hover, .deck-card:focus-visible { transform: translateY(-8px); }

  .row { padding: 56px 0; }
  .shot-wide { margin-top: 32px; }
  .footer-inner { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
