/* ============================================================
   VP Studio · Vishnu Panji
   Palette: black, greys and one blue (#007AFF). All colors live in :root.
   ============================================================ */

:root {
  /* greys */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --line: #E4E4E7;
  --line-2: #D4D4D8;

  /* text */
  --ink: #0A0A0A;
  --ink-2: #27272A;
  --text: #3F3F46;
  --muted: #71717A;

  /* blue */
  --blue: #007AFF;
  --blue-btn: #006FE8;    /* buttons with white text: same blue, a touch darker for 4.5:1 contrast */
  --blue-hover: #0062CC;
  --blue-text: #0062CC;   /* blue for small text on white, easier to read */
  --blue-soft: #EAF3FF;

  /* dark sections */
  --dark: #0A0A0A;
  --dark-2: #18181B;
  --dark-line: #2A2A2E;
  --dark-muted: #A1A1AA;
  --dark-text: #D4D4D8;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 18px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  background-color: var(--bg);
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--blue-text); }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.section-pad { padding-top: var(--section); padding-bottom: var(--section); }
.muted { color: var(--muted); }
.blue { color: var(--blue); }

.eyebrow {
  display: inline-flex; align-items: center; align-self: flex-start;
  min-height: 30px; padding: 4px 14px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-text);
  font-size: 13px; font-weight: 600; letter-spacing: 0;
}
.eyebrow-light { background: rgba(0, 122, 255, 0.16); color: #8CC0FF; }
h2.eyebrow { margin: 0; }
.project-cat { font-size: 13px; font-weight: 500; color: var(--muted); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.section-head { display: flex; flex-direction: column; gap: 16px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; }

/* ---------- buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 550 15px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); color: #fff; }
.btn-blue { background: var(--blue-btn); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--blue-soft); color: var(--ink); }
.btn-ghost-dark { border-color: var(--dark-line); color: #fff; }
.btn-ghost-dark:hover { border-color: var(--blue); color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 250, 0.85);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; padding: 6px 0; }
.brand img { height: 44px; width: auto; }
.brand .logo-mark { display: none; }
@media (max-width: 600px) {
  .brand .logo-full { display: none; }
  .brand .logo-mark { display: block; height: 36px; }
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a:not(.btn) {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0;
}
.main-nav a:not(.btn):hover { color: var(--blue); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; position: relative;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, top .2s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px max(var(--gutter), env(safe-area-inset-left)) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.06);
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .main-nav .btn { margin-top: 16px; min-height: 48px; }
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 72px); }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px 64px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 900px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; font-weight: 650; letter-spacing: -0.045em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--text); max-width: 620px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  height: 30px; padding: 0 12px 0 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

.stats {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.stat {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.stat-value { order: -1; font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 6px; }
.stat-value-sm { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.45; }
.stat-value small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.stat-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.stat-note { font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .stat { padding: 18px; }
}

/* ---------- about ---------- */
.about { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-stack { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 88px); }
.about-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 48px 80px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* Photo: 640x640 file, shown at max 380px */
.about-photo { margin: 0; display: flex; flex-direction: column; gap: 16px; max-width: 380px; position: sticky; top: 100px; }
.about-photo img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.about-photo figcaption { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--blue); }
.about-photo strong { font-size: 18px; letter-spacing: -0.02em; }
.about-photo span { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .about-photo { max-width: 280px; position: static; } }

.about-body { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.about-lead { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); max-width: 30ch; }
.about-text { display: flex; flex-direction: column; gap: 18px; font-size: 17px; line-height: 1.7; color: var(--text); max-width: 62ch; padding-top: 24px; border-top: 1px solid var(--line); }
.about-text strong { color: var(--ink); font-weight: 600; }

.expect { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; border-radius: 16px; background: var(--surface-2); max-width: 62ch; }
.expect h3 { font-size: 17px; letter-spacing: -0.02em; }
.expect ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px 24px; }
.expect li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--text); }
.expect svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.skills { display: flex; flex-direction: column; gap: 24px; }
.skills h3 { font-size: 26px; letter-spacing: -0.025em; }
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .skill:last-child { grid-column: 1 / -1; } }
@media (max-width: 540px)  { .skills-grid { grid-template-columns: minmax(0, 1fr); } .skill:last-child { grid-column: auto; } }

.skill {
  display: flex; flex-direction: column; gap: 8px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .2s, transform .2s;
}
.skill:hover { border-color: var(--blue); transform: translateY(-2px); }
.skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.skill-icon {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--blue-soft); color: var(--blue);
}
.skill-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.skill-icon svg, .contact-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skill h4 { font-size: 17px; letter-spacing: -0.02em; }
.skill p { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- work ---------- */
.work { display: flex; flex-direction: column; gap: 40px; }
.work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px; }
.work-head .section-head { flex: 1 1 420px; min-width: 0; }
.work-head > p { flex: 0 1 380px; line-height: 1.6; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.project {
  padding: clamp(18px, 2.4vw, 24px); display: flex; flex-direction: column; gap: 20px; min-width: 0;
  transition: border-color .2s, transform .2s;
}
.project:hover { border-color: var(--line-2); transform: translateY(-2px); }
.project-featured {
  padding: clamp(20px, 3vw, 36px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px 48px; align-items: center;
}
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }

.project-info { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.project-info h3 { font-size: 26px; line-height: 1.15; }
.project-featured .project-info { gap: 16px; }
.project-featured .project-info h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.project-info p { line-height: 1.65; }
.badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--blue-btn); color: #fff; font-size: 12px; font-weight: 600;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500;
}
.project-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.project-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.project-media { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.frame-bar span { margin-left: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot { position: relative; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.project:hover .shot img { transform: scale(1.02); }
.shot-empty {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #F4F4F5 0 10px, #EDEDEF 10px 20px);
}
.shot-empty span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  background: var(--surface); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line);
}
.r-16-9 { aspect-ratio: 16 / 9; }
.r-16-10 { aspect-ratio: 16 / 10; }

/* ---------- testimonials ---------- */
.testimonials { display: flex; flex-direction: column; gap: 40px; padding-bottom: var(--section); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .testimonial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .testimonial-grid { grid-template-columns: minmax(0, 1fr); } }

.t-card {
  margin: 0; display: flex; flex-direction: column; gap: 20px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.t-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-quote { width: 28px; height: 28px; fill: var(--blue); }
.t-card blockquote { margin: 0; flex: 1; font-size: 16px; line-height: 1.65; color: var(--text); }
.t-card figcaption { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.t-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.t-initials { display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 600; border: 1px solid var(--line); }
.t-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.t-who strong { font-size: 15px; letter-spacing: -0.01em; }
.t-who span { font-size: 13px; color: var(--muted); }
.t-who a { font-size: 13px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.t-who a:hover { text-decoration: underline; text-underline-offset: 3px; }
.t-source { flex: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-text); background: var(--blue-soft); padding: 4px 8px; border-radius: 999px; }

/* ---------- ebook ---------- */
.ebook-wrap { padding-bottom: var(--section); }
.ebook {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px 64px; align-items: center;
}
.ebook-cover-wrap {
  display: flex; justify-content: center; align-items: center; min-width: 0; padding: 40px 24px; border-radius: 20px;
  background: var(--blue-soft);
}
.ebook-cover, .ebook-cover-img {
  width: 100%; max-width: 260px; aspect-ratio: 600 / 849; border-radius: 4px 10px 10px 4px;
  box-shadow: inset 10px 0 0 rgba(0, 0, 0, 0.14), 0 28px 50px rgba(0, 0, 0, 0.22);
  transform: rotate(-3deg);
}
.ebook-cover-img { height: auto; object-fit: cover; }
.ebook-cover {
  color: #fff; padding: 26px 22px 26px 32px; background: var(--blue);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cover-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.cover-title { display: block; font-size: 68px; font-weight: 750; letter-spacing: -0.06em; line-height: 0.9; }
.cover-sub { display: block; font-size: 26px; font-weight: 500; letter-spacing: -0.03em; margin-top: 4px; }
.cover-author { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }

.ebook-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; min-width: 0; }
.ebook-copy h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.08; }
.ebook-copy > p { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 520px; }
.ebook-meta { display: grid; grid-template-columns: auto auto 1fr; gap: 0; margin: 0; padding: 0; align-self: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ebook-meta div { display: flex; flex-direction: column; gap: 4px; padding: 16px 22px 16px 0; min-width: 0; }
.ebook-meta div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.ebook-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ebook-meta dd { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- contact ---------- */
.contact { background: var(--dark); color: #fff; }
.contact-inner {
  padding-top: var(--section); padding-bottom: max(32px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: clamp(48px, 7vw, 88px);
}
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px 72px; align-items: end; }
.contact-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.contact-copy h2 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.02; color: #fff; }
.contact-links a { color: #fff; text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 4px; }
.contact-links a:hover { color: var(--blue); }
.contact-copy p { font-size: 18px; line-height: 1.6; color: var(--dark-text); max-width: 480px; }

.contact-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.contact-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 18px;
  padding: 20px 22px; border: 1px solid var(--dark-line); border-radius: 16px; background: var(--dark-2);
}
.contact-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--blue); color: #fff; flex: none; }
.contact-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 180px; }
.contact-label { font-size: 13px; color: var(--dark-muted); }
.contact-value { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: break-word; user-select: all; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-copy {
  min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--dark-line);
  background: transparent; color: var(--dark-text); font: 500 14px/1 var(--font); cursor: pointer;
}
.btn-copy:hover { border-color: var(--blue); color: #fff; }

.footer-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-top: 24px; border-top: 1px solid var(--dark-line); font-size: 14px; color: var(--dark-muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-brand img { height: 28px; width: auto; opacity: 0.9; }
.footer-bar a { color: var(--dark-text); text-decoration: none; }
.footer-bar a:hover { color: #fff; }

/* ---------- clickable screenshots ---------- */
.shot-btn { display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); cursor: zoom-in; font: inherit; }
.shot-btn img { display: block; }
.shot-zoom {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(10, 10, 10, 0.72); color: #fff;
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.shot-zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.shot-btn:hover .shot-zoom, .shot-btn:focus-visible .shot-zoom { opacity: 1; transform: none; }
.shot-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 0; }
@media (hover: none) { .shot-zoom { opacity: 1; transform: none; width: 30px; height: 30px; } }

/* ---------- lightbox ---------- */
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column;
  background: rgba(10, 10, 10, 0.96); color: #fff;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.lb-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 24px; }
.lb-caption { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-size: 14px; color: var(--dark-muted); font-variant-numeric: tabular-nums; }
.lb-close, .lb-nav {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer;
  transition: background .15s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-stage {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
  display: flex; justify-content: center; align-items: flex-start; padding: 8px 80px 32px;
  cursor: zoom-out;
}
.lb-img { width: auto; max-width: min(1400px, 100%); height: auto; margin: auto; border-radius: 8px; cursor: default; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: calc(16px + env(safe-area-inset-left, 0px)); }
.lb-next { right: calc(16px + env(safe-area-inset-right, 0px)); }
@media (max-width: 700px) {
  .lb-stage { padding: 8px 12px 88px; }
  .lb-nav { top: auto; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: none; background: rgba(255, 255, 255, 0.16); }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}

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

@media (max-width: 540px) {
  .ebook-meta div { padding-right: 14px; }
  .ebook-meta div + div { padding-left: 14px; }
  .ebook-meta dd { font-size: 16px; }
}
