/* ivanoff.app — case study pages (tokens & chrome live in base.css) */

/* language toggle: default ru, no flash */
html[data-lang="ru"] .lang-en { display: none; }
html[data-lang="en"] .lang-ru { display: none; }

/* hero */
.chero { display: flex; align-items: center; gap: var(--s4); }
.chero-text { display: flex; flex-direction: column; min-width: 0; }
h1.cname {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--fg);
}
.crole { margin-top: var(--s1); font-size: 15px; color: var(--dim); }
.cperiod { color: var(--muted); font-family: var(--mono); font-size: 13px; }

.cvisit { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; }
.cvisit a { font-size: 13px; padding: 5px 12px; }
.cbadges { margin-top: var(--s4); }
.cbadges a { display: inline-block; transition: opacity .2s, transform .3s var(--ease); }
.cbadges a:hover { opacity: .9; transform: translateY(-1px); }
.cbadges img { height: 40px; width: auto; display: block; }

/* prose */
.prose { margin: 0; color: var(--fg-2); font-size: 15px; line-height: 1.75; max-width: 62ch; }
.prose strong { color: var(--fg); font-weight: 500; }

/* what-i-did list */
.dolist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); max-width: 62ch; }
.dolist li { position: relative; padding-left: 22px; color: var(--dim); line-height: 1.7; }
.dolist li::before { content: "→"; position: absolute; left: 0; color: var(--faint); }
.dolist strong { color: var(--fg); font-weight: 500; }

/* stack */
.stack { color: var(--dim); font-family: var(--mono); font-size: 13px; }
.stack .k { color: var(--fg); font-weight: 500; }

/* sub-project block */
.proj { margin-top: var(--s7); }
.proj:first-of-type { margin-top: 0; }
.proj h3 { margin: 0 0 var(--s2); font-size: 18px; line-height: 1.35; font-weight: 550; letter-spacing: -.015em; color: var(--fg); }
.proj .pdesc { margin: 0 0 var(--s4); color: var(--dim); font-size: 14.5px; line-height: 1.7; max-width: 60ch; }

/* shots */
.shots { display: flex; flex-direction: column; gap: var(--s3); }
.shots.grid-2, .shots.grid-3 { display: grid; gap: var(--s3); }
.shots.grid-2 { grid-template-columns: repeat(2, 1fr); }
.shots.grid-3 { grid-template-columns: repeat(3, 1fr); }
.shots img, .shots video {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #111;
}
.shots img { cursor: zoom-in; transition: border-color .25s, transform .4s var(--ease), box-shadow .4s var(--ease); }
.shots img:hover { border-color: #3a3a3a; transform: translateY(-2px); box-shadow: 0 16px 40px -20px rgba(0,0,0,.9); }
@media (max-width: 600px) {
  .shots.grid-3 { grid-template-columns: repeat(2, 1fr); }
  .shots img:hover { transform: none; box-shadow: none; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(6, 6, 6, 0.94);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 88vw; max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  transform: scale(.97);
  transition: transform .3s var(--ease);
}
.lightbox.open img { transform: none; }
.lightbox button {
  position: fixed;
  background: transparent; border: 0;
  color: var(--muted);
  font-family: var(--font);
  cursor: pointer;
  transition: color .2s;
}
.lightbox button:hover { color: var(--fg); }
.lightbox .lb-close { top: 22px; right: 28px; font-size: 24px; line-height: 1; padding: 8px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 26px; padding: 16px; }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 26px; padding: 16px; }
.lightbox .lb-count { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
body.lb-open { overflow: hidden; }
@media (max-width: 600px) {
  .lightbox { padding: 16px; }
  .lightbox .lb-prev { left: 2px; padding: 10px; }
  .lightbox .lb-next { right: 2px; padding: 10px; }
}

/* prev / next case */
.cnav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s9); }
.cnav a {
  display: block;
  padding: var(--s4) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--dim);
  transition: border-color .25s, background .25s, color .25s;
}
.cnav a:hover { border-color: var(--line-2); background: var(--bg-2); color: var(--fg); }
.cnav a.next { text-align: right; }
.cnav .k { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s1); }
.cnav .n { font-size: 15px; font-weight: 500; color: var(--fg); }
.cnav .ar { display: inline-block; transition: transform .25s var(--ease); }
.cnav a:hover .ar { transform: translateX(3px); }
.cnav a.prev:hover .ar { transform: translateX(-3px); }
.cnav a:empty { visibility: hidden; }
@media (max-width: 600px) {
  .cnav { grid-template-columns: 1fr; margin-top: var(--s8); }
  .cnav a.next { text-align: left; }
}
