/* portfolio.koli-bg.com — no web fonts, no external requests. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1a1b1f;
  --muted: #5d6070;
  --border: #e3e3df;
  --accent: #3f51c7;
  --accent-text: #ffffff;
  --chip: #eef0fa;
  --chip-text: #343d8f;
  --shadow: 0 1px 2px rgb(20 20 40 / 5%), 0 10px 30px rgb(20 20 40 / 7%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111215;
    --surface: #1a1b20;
    --text: #ececef;
    --muted: #a2a5b4;
    --border: #2b2d35;
    --accent: #8d9bff;
    --accent-text: #111215;
    --chip: #23263a;
    --chip-text: #c3c9ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; height: 58px; gap: 16px; }
.me { color: var(--text); font-weight: 700; text-decoration: none; }
.top nav { display: flex; gap: 20px; font-size: 15px; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
.top nav .lang { border: 1px solid var(--border); border-radius: 8px; padding: 2px 9px; color: var(--text); }

.hero .wrap { padding-top: 80px; padding-bottom: 40px; }
.hero h1 { margin: 0; font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; }
.role { margin: 10px 0 18px; color: var(--accent); font-weight: 600; }
.intro { margin: 0; max-width: 36em; font-size: clamp(19px, 2.3vw, 22px); color: var(--muted); }

.group { padding: 40px 0 8px; }
.group h2 { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cards > .card:only-child { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.summary { margin: 0 0 10px; }
.notes { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.stack { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { background: var(--chip); color: var(--chip-text); font-size: 13px; padding: 3px 9px; border-radius: 999px; }
.links { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 16px; font-weight: 600; font-size: 15px; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* screenshots: one slide per page (desktop with the phone view in front of
   its corner), crossfading; site.js rotates them and opens the lightbox */
.shots { position: relative; background: linear-gradient(160deg, var(--chip), var(--bg)); border-bottom: 1px solid var(--border); overflow: hidden; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; margin: 0; padding: 22px 22px 0; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.slide.on { opacity: 1; visibility: visible; transition: opacity 0.9s ease; }
.slide .open { display: block; width: 86%; cursor: zoom-in; }
.slide .desk { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px 8px 0 0; border: 1px solid var(--border); border-bottom: 0; }
.slide .phone { position: absolute; right: 22px; bottom: -40px; width: 22%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 14px; border: 4px solid #1a1b20; box-shadow: var(--shadow); pointer-events: none; }
.slide figcaption { position: absolute; left: 30px; bottom: 10px; background: rgb(15 16 22 / 72%); color: #fff; font-size: 12px; padding: 2px 9px; border-radius: 999px; pointer-events: none; }
.dots { position: absolute; right: 22px; top: 8px; display: flex; gap: 6px; }
.dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--text) 25%, transparent); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .slide, .slide.on { transition: none; } }

/* lightbox (a <dialog>: Esc closes it, focus stays inside) */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgb(8 9 12 / 95%); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: calc(100vw - 140px); }
.lb-imgs { display: flex; align-items: flex-start; gap: 20px; }
.lb-desk { max-height: calc(100vh - 110px); max-width: min(1200px, calc(100vw - 340px)); width: auto; border-radius: 8px; }
.lb-phone { max-height: calc(100vh - 110px); width: auto; max-width: 200px; border-radius: 16px; border: 4px solid #2a2b33; }
.lightbox figcaption { color: #e9e9ee; font-size: 15px; }
.lightbox button { position: absolute; background: rgb(255 255 255 / 10%); color: #fff; border: 1px solid rgb(255 255 255 / 20%); border-radius: 50%; width: 44px; height: 44px; font-size: 22px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / 20%); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 800px) {
  .lightbox figure { max-width: 100vw; padding: 0 8px; }
  .lb-phone { display: none; }
  .lb-desk { max-width: calc(100vw - 16px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

.contact { padding: 56px 0 72px; }
.contact h2 { font-size: clamp(28px, 4vw, 36px); margin: 0 0 8px; letter-spacing: -0.02em; }
.contact p { color: var(--muted); max-width: 36em; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 20px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-text); padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; }
footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .wrap { padding-top: 24px; padding-bottom: 24px; }

@media (max-width: 800px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-top: 48px; }
  .top nav { gap: 14px; }
}
.admin { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--chip); border-radius: 0 10px 10px 0; font-size: 15px; color: var(--text); }
.admin strong { display: block; color: var(--chip-text); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
