@font-face { font-family: "Montserrat"; src: url("/static/fonts/Montserrat.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: local("Bebas Neue"), local("BebasNeue-Regular"), url("/static/fonts/BebasNeue-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
:root { --h: 46px; --display: "Bebas Neue","Oswald","Impact","Arial Narrow",sans-serif; --line: rgba(255,255,255,.14); --muted: #8c8c8c; --font: "Montserrat","Segoe UI",system-ui,-apple-system,Arial,sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #000; }
body {
  margin: 0; color: #f2f2f2; font: 16px/1.6 var(--font);
  background: radial-gradient(ellipse 70% 55% at 50% 30%, #1b1b1b 0%, #0a0a0a 55%, #000 100%) fixed;
}
body::after { content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 40%, rgba(0,0,0,.85) 100%); }
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.layer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.layer.front { z-index: 2; }

.hero { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 2rem 1rem 4.5rem; }
.title { margin: 0; text-align: center; max-width: 100%;
  font: 400 clamp(3.6rem, 21vw, 14rem)/.9 var(--display); letter-spacing: .05em; text-shadow: 0 0 60px rgba(255,255,255,.14); }
.word { position: relative; display: inline-block; padding-left: .05em; }
.dev { position: absolute; left: 100%; bottom: .06em; margin-left: .08em; font-size: .22em; line-height: 1; letter-spacing: .1em; color: #9c9c9c; text-shadow: none; }
.contact { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: 2.2rem; max-width: 100%; }
.avatar { width: var(--h); height: var(--h); border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.28); flex: none; }
.links { display: flex; gap: .7rem; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: var(--h); padding: 0 1.15rem; font-size: .85rem; font-weight: 500; letter-spacing: .06em; white-space: nowrap;
  color: #d8d8d8; text-decoration: none; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px;
  transition: background .2s, border-color .2s, color .2s; }
.btn:hover { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); }
.btn svg { flex: none; }
.down { position: absolute; bottom: 1.6rem; color: var(--muted); line-height: 0; }
.down:hover { color: #fff; }

.portfolio { position: relative; z-index: 3; max-width: 1100px; margin: 0 auto; padding: 7rem 1.25rem 6rem; }
.portfolio h2 { margin: 0 0 2rem; font: 400 2.4rem/1 var(--display); letter-spacing: .1em; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.4rem; }
.card { display: block; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; overflow: hidden;
  background: rgba(12,12,12,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 6px; }
.card:hover { border-color: rgba(255,255,255,.4); }
.cover { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #111; }
.card-body { display: block; padding: 1rem 1.1rem 1.2rem; }
.card-title { display: block; font: 400 1.2rem var(--font); }
.badge { display: inline-block; margin-top: .2rem; font-size: .75rem; color: var(--muted); }
.card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: .5rem; color: #b5b5b5; font-size: .92rem; white-space: pre-line; }

dialog { width: min(1000px, 94vw); max-height: 94vh; padding: 0; color: #f2f2f2; background: #0b0b0b;
  border: 1px solid var(--line); border-radius: 6px; overflow: auto; }
dialog::backdrop { background: rgba(0,0,0,.88); }
.stage { position: relative; display: flex; align-items: center; justify-content: center; background: #050505; }
.stage img { display: block; max-width: 100%; max-height: 68vh; object-fit: contain; }
.stage img[hidden] { display: none; }
.nav, .x { position: absolute; border: 0; color: #fff; background: rgba(0,0,0,.55); cursor: pointer; font-size: 2rem; line-height: 1; border-radius: 4px; padding: .3rem .8rem; }
.x { top: .6rem; right: .6rem; z-index: 2; font-size: 1.6rem; }
.prev { left: .6rem; } .next { right: .6rem; }
dialog.single .nav { display: none; }
.info { padding: 1.1rem 1.4rem 1.5rem; }
.info h3 { display: inline; margin: 0; font: 400 1.4rem var(--font); }
.count { margin-left: .8rem; color: var(--muted); font-size: .85rem; }
.info p { margin: .7rem 0 0; color: #bdbdbd; white-space: pre-line; }


/* ---------- Телефоны ---------- */
@media (max-width: 560px) {
  :root { --h: 40px; }
  .hero { padding: 1.5rem .75rem 4.5rem; }
  .contact { gap: .45rem; margin-top: 1.6rem; }
  .links { gap: .45rem; }
  .btn { padding: 0 .8rem; gap: .4rem; font-size: .74rem; letter-spacing: .03em; }
  .btn svg { width: 17px; height: 17px; }
  .portfolio { padding: 4.5rem .9rem 4rem; }
  .portfolio h2 { font-size: 2rem; margin-bottom: 1.4rem; }
  .grid { gap: 1rem; }
  dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .stage img { max-height: 55dvh; }
  .nav, .x { padding: .5rem .9rem; }
  .info { padding: 1rem 1rem 1.6rem; }
}
@media (max-width: 370px) {
  .btn span { display: none; }
  .btn { width: var(--h); padding: 0; }
}
@media (hover: none) { .btn:hover { color: #d8d8d8; background: rgba(255,255,255,.05); border-color: var(--line); } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
