/* SergeiGalimulin — общие стили сайта и админки */

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .22s; }

:root {
  --bg: #000000;
  --surface: #111111;
  --surface-2: #161616;
  --skeleton: #0d0d0d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f5f5f4;
  --muted: #a3a3a0;
  --subtle: #8f8f8c;
  --accent: #e8a657;
  --danger: #dc2626;
  --ok: #4ade80;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 3vw, 32px);
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 1360px; margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { margin: 0; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Шапка ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: transform .35s var(--ease);
  view-transition-name: site-nav;
}
.nav.is-hidden { transform: translateY(-101%); }
.nav:focus-within { transform: none; }
.nav-bar { max-width: 1360px; margin: 0 auto; height: 60px; padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { height: 44px; display: inline-flex; align-items: center; font-size: 16px; letter-spacing: -.02em; }
.logo b { font-weight: 600; }
.logo i { font-style: normal; font-weight: 400; color: var(--muted); }
.nav-links { display: flex; gap: 28px; }
.nav-link { height: 44px; display: inline-flex; align-items: center; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-link:hover { color: #fff; }
.nav-link.is-active { color: #fff; font-weight: 500; }
.badge { height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; font-size: 11px; letter-spacing: .12em; color: #c9c9c6; }
@media (max-width: 480px) { .nav-home { display: none; } .nav-links { gap: 20px; } }

/* ---------- Кнопки ---------- */
.btn {
  height: 52px; padding: 0 24px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 15px 'Geist', system-ui, sans-serif;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-primary:hover .arr { transform: translate(2px, -2px); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: rgba(255,255,255,.12); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); }
.btn-ghost:hover .arr-left { transform: translateX(-3px); }
.btn-ghost:hover .arr-up { transform: translate(2px, -2px); }
.btn-sm { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-md { height: 48px; padding: 0 22px; font-size: 14px; }
.btn-danger-outline { background: transparent; color: var(--muted); border-color: rgba(255,255,255,.1); }
.btn-danger-outline:hover { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.5); color: #fca5a5; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ef4444; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); background: #000; border: 1px solid var(--line-strong);
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--text); color: #000; border-color: var(--text); }
.text-btn { height: 44px; padding: 0; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; transition: color .2s; }
.text-btn:hover { color: #fff; }

/* ---------- Картинки: заглушка и проявление ---------- */
.ph { background: linear-gradient(100deg, #0d0d0d 35%, #151515 50%, #0d0d0d 65%) #0d0d0d; background-size: 250% 100%; animation: shimmer 1.4s linear infinite; }
.ph.done { animation: none; background: #0b0b0b; }
.lz { opacity: 0; transition: opacity .5s ease, transform .8s var(--ease); }
.lz.on { opacity: 1; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.fade-in { animation: fade .35s ease both; }

/* ---------- Карточки работ ---------- */
.card { display: block; cursor: pointer; }
.card-media { position: relative; overflow: hidden; border-radius: 24px; isolation: isolate; }
.card-media::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); pointer-events: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-media img.on { transform: scale(1.04); }
.card-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 35%, rgba(0,0,0,0) 60%); pointer-events: none; }
.card-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 8px; transition: transform .5s var(--ease); }
.card:hover .card-info { transform: translateY(-4px); }
.card-cat { font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card-name { font-size: clamp(17px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: #fff; text-wrap: balance; }
.card-video { position: absolute; top: 14px; right: 14px; z-index: 3; height: 32px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--text); background: #000; border: 1px solid var(--line-strong); }

/* ---------- Главная ---------- */
.hero { padding-top: clamp(64px, 9vw, 120px); }
.hero h1 { margin: 24px 0 0; font-weight: 600; font-size: clamp(48px, 9vw, 148px); line-height: .9; letter-spacing: -.055em; max-width: 11ch; text-wrap: balance; }
.hero-row { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.hero-row p { margin: 0; max-width: 34ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.hero-card { margin-top: clamp(40px, 5vw, 64px); }
.hero-card .card-media { border-radius: 32px; }
.hero-tag { position: absolute; left: 20px; bottom: 20px; z-index: 2; height: 44px; padding: 0 8px 0 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 14px; font-size: 14px; background: #000; border: 1px solid var(--line-strong); }
.hero-tag .go { width: 30px; height: 30px; border-radius: 999px; background: var(--text); color: #000; display: inline-flex; align-items: center; justify-content: center; }
.section { padding-top: clamp(96px, 11vw, 160px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { margin: 14px 0 0; font-weight: 600; font-size: clamp(32px, 4vw, 56px); letter-spacing: -.045em; line-height: 1; }
.bento { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.bento .card { display: flex; flex-direction: column; min-width: 0; }
.bento .card-media { aspect-ratio: 4 / 3; }
.bento .big { grid-row: span 2; }
.bento .big .card-media { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
.bento .big .card-media img { position: absolute; inset: 0; }
.bento .big .card-name { font-size: clamp(20px, 2.2vw, 30px); }
@media (max-width: 820px) {
  .bento { grid-template-columns: 1fr; }
  .bento .big { grid-row: auto; }
  .bento .big .card-media { flex: none; aspect-ratio: 4 / 5; }
}

/* ---------- Портфолио ---------- */
.page-head { padding-top: clamp(56px, 8vw, 104px); }
.page-head-row { margin-top: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-weight: 600; font-size: clamp(56px, 9vw, 148px); line-height: .88; letter-spacing: -.06em; }
.count { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.chips { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); background: transparent; color: var(--muted);
  font: 500 14px 'Geist', system-ui, sans-serif;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip .n { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; color: var(--subtle); transition: color .2s; }
.chip:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.32); color: #fff; }
.chip:hover .n { color: #c9c9c6; }
.chip.is-active { background: var(--text); border-color: var(--text); color: #000; }
.chip.is-active .n { color: #57575a; }
.masonry { margin-top: 40px; columns: 380px 3; column-gap: 16px; }
.masonry .card { break-inside: avoid; margin-bottom: 16px; }
.empty { margin-top: 40px; min-height: 440px; border-radius: 32px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 48px 24px; text-align: center; }
.empty-title { margin: 0; font-weight: 600; font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.045em; line-height: 1.05; max-width: 16ch; text-wrap: balance; }

/* ---------- Страница проекта ---------- */
.project-grid { margin-top: 28px; display: flex; flex-wrap: wrap; gap: clamp(32px, 4vw, 56px); align-items: flex-start; }
.project-media { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.viewer { position: relative; border-radius: 28px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #0b0b0b; }
.viewer::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); pointer-events: none; }
.viewer img, .viewer video { width: 100%; height: 100%; }
.zoom { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.counter { position: absolute; left: 16px; top: 16px; height: 32px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; background: #000; border: 1px solid var(--line-strong); }
.viewer-full { position: absolute; right: 16px; top: 16px; }
.viewer-arrows { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.thumbs { display: flex; gap: 12px; overflow-x: auto; padding: 4px; }
.thumb { position: relative; flex: 0 0 auto; width: 104px; height: 78px; padding: 0; border-radius: 14px; overflow: hidden; border: 0; background: #141414; cursor: pointer; opacity: .5; outline: 2px solid transparent; outline-offset: 3px; transition: opacity .2s, outline-color .2s; }
.thumb:hover { opacity: 1; }
.thumb.is-active { opacity: 1; outline-color: var(--text); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.35); pointer-events: none; }
.project-aside { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.project-aside h1 { margin: 0; font-weight: 600; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.project-desc { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); white-space: pre-line; text-wrap: pretty; }
.specs { margin: 0; padding: 4px 20px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-size: 14px; }
.specs div + div { border-top: 1px solid rgba(255,255,255,.07); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.pn-grid { margin-top: clamp(80px, 9vw, 128px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; }
.pn { display: flex; align-items: center; gap: 20px; padding: 12px; border-radius: 24px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); transition: background-color .25s, border-color .25s; }
.pn:hover { background: #171717; border-color: rgba(255,255,255,.16); }
.pn.next { flex-direction: row-reverse; text-align: right; }
.pn-img { flex: 0 0 auto; width: 120px; height: 90px; border-radius: 14px; overflow: hidden; background: #141414; }
.pn-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pn:hover .pn-img img { transform: scale(1.06); }
.pn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pn-label { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.pn-title { font-size: 20px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.not-found { padding: 120px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; color: var(--muted); }

/* ---------- Полноэкранный просмотр ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: #050505; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade .25s ease both; }
.lb[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: zoom-out; }
.lb-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px clamp(16px, 2vw, 24px); pointer-events: none; }
.lb-top > * { pointer-events: auto; }
.lb-title { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.lb-title span:first-child { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px clamp(12px, 7vw, 112px); pointer-events: none; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; pointer-events: auto; user-select: none; }
.lb-btn { width: 48px; height: 48px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: #141414; border: 1px solid rgba(255,255,255,.12); cursor: pointer; pointer-events: auto; transition: background-color .2s, color .2s, border-color .2s; }
.lb-btn:hover { background: var(--text); color: #000; border-color: var(--text); }
.lb-arrow { position: absolute; top: 50%; width: 56px; height: 56px; transform: translateY(-50%); }
.lb-prev { left: clamp(12px, 2vw, 32px); }
.lb-next { right: clamp(12px, 2vw, 32px); }
.lb-strip { position: relative; z-index: 1; display: flex; justify-content: center; gap: 10px; padding: 16px 16px 24px; overflow-x: auto; pointer-events: none; }
.lb-thumb { position: relative; flex: 0 0 auto; width: 80px; height: 56px; padding: 0; border-radius: 10px; overflow: hidden; border: 0; background: #141414; cursor: pointer; opacity: .4; outline: 2px solid transparent; outline-offset: 3px; pointer-events: auto; transition: opacity .2s, outline-color .2s; }
.lb-thumb:hover { opacity: 1; }
.lb-thumb.is-active { opacity: 1; outline-color: var(--text); }
.lb-thumb img, .lb-thumb video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .lb-arrow { top: auto; bottom: 8px; transform: none; width: 48px; height: 48px; }
  .lb-stage { padding: 8px 12px 64px; }
}

/* ---------- Подвал ---------- */
.footer { margin-top: clamp(96px, 12vw, 180px); padding-bottom: 24px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.foot-link { height: 44px; display: inline-flex; align-items: center; color: var(--muted); transition: color .2s; }
.foot-link:hover { color: #fff; }

/* ---------- Админка ---------- */
.admin-main { padding-top: clamp(40px, 6vw, 80px); padding-bottom: 120px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.admin-head h1 { margin: 12px 0; font-weight: 600; font-size: clamp(36px, 4.6vw, 64px); line-height: .95; letter-spacing: -.05em; }
.panel { border-radius: 28px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); padding: clamp(20px, 2.4vw, 28px); }
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; color: var(--muted); }
.input { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: #000; color: var(--text); font: 400 15px 'Geist', system-ui, sans-serif; transition: border-color .2s, box-shadow .2s; }
textarea.input { height: auto; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.input::placeholder { color: var(--subtle); }
.input:hover { border-color: rgba(255,255,255,.22); }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.input.is-error { border-color: #f87171; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.eye { position: absolute; right: 3px; top: 3px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color .2s, background-color .2s; }
.eye:hover { color: #fff; background: rgba(255,255,255,.06); }
.err { margin: 0; font-size: 13px; color: #fca5a5; }
.notice { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(74,222,128,.1); color: #86efac; font-size: 14px; line-height: 1.4; }
.login { min-height: calc(100vh - 61px); display: flex; align-items: center; justify-content: center; padding: 80px 16px; }
.login-card { width: 100%; max-width: 440px; padding: clamp(28px, 4vw, 40px); border-radius: 32px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 32px; }
.login-card h1 { margin: 12px 0; font-weight: 600; font-size: 36px; line-height: 1; letter-spacing: -.045em; }

.list { list-style: none; margin: 0; padding: 8px; border-radius: 28px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px; border-radius: 20px; transition: background-color .2s; }
.row:hover { background: var(--surface-2); }
.row + .row { margin-top: 2px; }
.row-thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: #141414; display: flex; align-items: center; justify-content: center; color: #6b6b68; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-text { flex: 999 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-title { font-size: 15px; font-weight: 500; line-height: 1.3; transition: color .2s; }
.row-title:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.row-meta { font-size: 13px; color: var(--muted); }
.row-actions { flex: 1 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pill { height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font: 500 13px 'Geist', system-ui, sans-serif; color: var(--muted); background: transparent; border: 1px solid rgba(255,255,255,.1); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.pill:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.24); color: #fff; }
.status { min-width: 124px; }
.status .dot { width: 7px; height: 7px; border-radius: 999px; background: #6b6b68; }
.status.is-on { color: var(--text); }
.status.is-on .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(74,222,128,.15); }
.round-btn { width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 1px solid rgba(255,255,255,.1); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.round-btn.danger:hover { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.5); color: #fca5a5; }
.admin-empty { min-height: 360px; border-radius: 28px; background: var(--surface); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px 24px; text-align: center; }

.editor-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.editor-left { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.editor-right { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: var(--muted); font: 500 13px 'Geist', system-ui, sans-serif; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.cat-chip:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.24); }
.cat-chip.is-active { background: var(--text); color: #000; border-color: var(--text); }
.switch-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s; }
.switch-row:hover { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.03); }
.track { flex: 0 0 auto; width: 48px; height: 28px; border-radius: 999px; background: #2a2a2a; position: relative; transition: background-color .25s; }
.knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: var(--muted); transition: transform .3s var(--ease), background-color .25s; }
.switch-row[aria-checked="true"] .track { background: var(--text); }
.switch-row[aria-checked="true"] .knob { transform: translateX(20px); background: #000; }
.drop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: 20px; border: 1px dashed rgba(255,255,255,.18); transition: border-color .2s, background-color .2s; }
.drop:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.02); }
.drop.is-drag { border-color: var(--text); background: rgba(255,255,255,.06); }
.drop-text { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.upload { position: relative; }
.upload:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.tile { position: relative; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.07); animation: pop .3s var(--ease) both; }
.tile-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #141414; }
.tile-img img, .tile-img video { width: 100%; height: 100%; object-fit: cover; }
.tile-badge { position: absolute; left: 10px; top: 10px; height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 10px; letter-spacing: .12em; }
.tile-badge.cover { background: var(--text); color: #000; }
.tile-badge.video { background: #000; color: var(--text); border: 1px solid var(--line-strong); }
.tile-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.tile:hover .tile-tools, .tile:focus-within .tile-tools { opacity: 1; }
@media (hover: none) { .tile-tools { opacity: 1; } }
.tool { width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: #000; border: 1px solid var(--line-strong); cursor: pointer; transition: background-color .2s, color .2s; }
.tool:hover { background: var(--text); color: #000; }
.tool:disabled { opacity: .35; cursor: default; background: #000; color: var(--text); }
.tile-foot { padding: 10px; }
.select { width: 100%; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: var(--surface); color: var(--text); font: 400 13px 'Geist', system-ui, sans-serif; cursor: pointer; transition: border-color .2s; }
.select:hover { border-color: rgba(255,255,255,.24); }
.editor-actions { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s ease both; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(0,0,0,.72); cursor: default; }
.modal-card { position: relative; width: 100%; max-width: 420px; padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 12px; animation: pop .25s var(--ease) both; }
.modal-card h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.modal-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.modal-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--text); color: #000; font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: fade .25s ease both; }
.toast[hidden] { display: none; }
.toast button { height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: #000; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.toast span:only-child { padding-right: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; transition: none !important; }
}

/* Resume / Contact */
.cv { margin-top: 48px; border-top: 1px solid var(--line); }
.cv-sec { display: grid; grid-template-columns: minmax(140px, 260px) 1fr; gap: 24px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.cv-body { max-width: 860px; color: var(--muted); line-height: 1.65; }
.cv-body p { margin: 0 0 14px; }
.cv-lead { color: var(--text); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.35; letter-spacing: -.02em; }
.cv-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.cv-list li::marker { color: var(--accent); }
.cv-chips { margin-top: 0; }
.cv-chips .chip { cursor: default; }
.cv-job { padding-bottom: 36px; }
.cv-job + .cv-job { padding-top: 36px; border-top: 1px solid var(--line); }
.cv-job-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cv-job h3 { margin: 0; color: var(--text); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.cv-co { margin: 4px 0 0; }
.cv-date { margin: 0; font-size: 12px; color: var(--subtle); }
.ct-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ct-row:last-child { border: 0; }
.ct-val { color: var(--text); font-size: clamp(18px, 2vw, 24px); letter-spacing: -.02em; }
.ct-val a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.ct-val a:hover { color: var(--accent); }
@media (max-width: 720px) { .cv-sec, .ct-row { grid-template-columns: 1fr; gap: 12px; } }
.cv-co a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.cv-co a:hover { color: var(--accent); }
.copy { all: unset; cursor: pointer; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.copy:hover { color: var(--accent); }
.copy small { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); margin-left: 8px; text-decoration: none; display: inline-block; }
