@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/google-sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/google-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  font-family: "Google Sans", sans-serif;
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
  color-scheme: light;
  --muted: #686b70;
  --accent: #5246e5;
  --page: #fff;
  --text: #202124;
  --surface: #f1f2f4;
  --hover: #f6f6f8;
  --badge-bg: #f3f1ff;
  --badge-text: #695bb6;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #171819;
    --text: #f3f1ed;
    --muted: #afb0b5;
    --accent: #c7c2ff;
    --surface: #242527;
    --hover: #232426;
    --badge-bg: #302b41;
    --badge-text: #d0c5f6;
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 6px; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 5; padding: 12px 16px; background: var(--page); }
.skip-link:focus { top: 16px; }
main, .footer { width: min(600px, calc(100% - 40px)); margin-inline: auto; }
.hero { padding: 64px 0 44px; text-align: center; }
.portrait { position: relative; display: grid; place-items: center; width: 160px; height: 160px; margin: 0 auto 22px; overflow: hidden; border-radius: 50%; background: var(--surface); }
.portrait-letter { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -.06em; color: #55585e; padding-right: .06em; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.035em; font-weight: 600; }
.intro-description { margin: 12px 0 14px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.contact-links { display: flex; align-items: center; justify-content: center; gap: 8px; }
.contact-links a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--muted); transition: background .16s, color .16s; }
.contact-links a:hover { background: var(--hover); color: var(--text); }
.icon, .icon-arrow { display: inline-block; width: 24px; height: 24px; flex: none; background: currentColor; mask-position: center; mask-size: contain; mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; }
.icon-telegram { -webkit-mask: none; mask: none; background: url('assets/telegram.svg') center / contain no-repeat; }
.telegram-mention { white-space: nowrap; }
.telegram-mention .icon { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.icon-mail { position: relative; border-radius: 50%; -webkit-mask: none; mask: none; background: linear-gradient(#2aabee, #229ed9); }
.icon-mail::before { content: ''; position: absolute; inset: 4px; background: #fff; -webkit-mask: url('assets/iconoteka-mail.svg') center / contain no-repeat; mask: url('assets/iconoteka-mail.svg') center / contain no-repeat; }
.icon-arrow { -webkit-mask-image: url('assets/iconoteka-arrow-up-right.svg'); mask-image: url('assets/iconoteka-arrow-up-right.svg'); }
.projects h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) {
  .home-page main { width: min(1040px, calc(100% - 64px)); }
  .home-page .hero { max-width: 600px; margin-inline: auto; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 64px); }
}
.project { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 24px; gap: 16px; align-items: start; padding: 18px 0; }
.project::before { content: ''; position: absolute; inset: 4px -12px; border-radius: 12px; background: var(--hover); opacity: 0; pointer-events: none; transition: opacity .16s; }
.project > * { position: relative; }
a.project:hover::before { opacity: 1; }
.project-icon { width: 48px; height: 48px; margin-top: 1px; display: grid; place-items: center; border: 1px solid #e8e8eb; border-radius: 12px; background: #fff; overflow: hidden; }
.project-icon img { width: 36px; height: 36px; object-fit: contain; border-radius: 5px; }
.project-copy h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.project-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.project-tags { display: flex; flex-wrap: wrap; gap: 3px 0; }
.project-tags span { white-space: nowrap; }
.project-tags span + span::before { content: '·'; margin-inline: 7px; }
.project-copy .project-tags { margin-top: 8px; font-size: 12px; line-height: 1.5; }
.project-date { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.project-arrow { display: flex; align-items: center; justify-content: flex-end; margin-top: 1px; color: var(--muted); transition: color .16s, transform .16s; }
.project-arrow .icon-arrow { width: 20px; height: 20px; transform: rotate(45deg); }
a.project:hover .project-arrow { color: var(--accent); transform: translateX(2px); }
.status { display: inline-block; margin-left: 7px; padding: 2px 6px; border-radius: 4px; background: var(--badge-bg); color: var(--badge-text); font-size: 12px; line-height: 1.4; font-weight: 400; letter-spacing: 0; vertical-align: 1px; }
.footer { padding: 30px 0 32px; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.project-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.project-main { flex: 1; padding-top: 40px; padding-bottom: 56px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 14px; }
.back-link .icon-arrow { width: 18px; height: 18px; transform: rotate(-135deg); }
.back-link:hover { color: var(--text); }
.project-detail { padding-top: 40px; }
.detail-category { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.detail-heading { display: flex; align-items: center; gap: 18px; }
.detail-heading .project-icon { flex: none; width: 64px; height: 64px; border-radius: 16px; }
.detail-heading .project-icon img { width: 48px; height: 48px; }
.detail-heading h1 { font-size: 30px; line-height: 1.2; }
.detail-heading .status { display: table; margin: 8px 0 0; }
.detail-description { margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.project-detail > .project-date { margin-top: 18px; }
.service-actions { display: flex; flex-wrap: wrap; gap: 20px 24px; margin-top: 32px; }
.service-action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.service-link { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; padding: 12px 18px; border-radius: 10px; color: var(--page); background: var(--text); font-size: 15px; font-weight: 500; transition: opacity 160ms ease, transform 160ms ease; }
.service-link--secondary { color: var(--text); background: var(--surface); }
.service-link .icon-arrow { width: 20px; height: 20px; }
.service-link:active { transform: scale(.98); }
.service-address { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.project-gallery { margin-top: 48px; }
.gallery-heading { margin-bottom: 18px; }
.gallery-heading h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.gallery-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.gallery-images { display: grid; gap: 24px 20px; align-items: start; }
.gallery-images--phone { max-width: 320px; margin-inline: auto; }
.gallery-images--steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-shot { min-width: 0; margin: 0; }
.screenshot-link { display: block; overflow: hidden; border: 1px solid var(--surface); border-radius: 12px; background: var(--surface); cursor: zoom-in; }
.screenshot-link img { width: 100%; height: auto; }
.project-shot figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.viewer-open, .viewer-open body { overflow: hidden; }
.screenshot-viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 76px 24px 28px; border: 0; color: #fff; background: transparent; overscroll-behavior: contain; }
.screenshot-viewer[open] { display: grid; place-items: center; }
.screenshot-viewer::backdrop { background: rgb(8 9 11 / 90%); }
.viewer-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgb(255 255 255 / 20%); border-radius: 50%; color: #fff; background: #292a2d; cursor: pointer; }
.viewer-close:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.viewer-close:active { transform: scale(.96); }
.viewer-figure { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 100%; min-width: 0; margin: 0; }
.viewer-image { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 176px); max-height: calc(100dvh - 176px); object-fit: contain; border-radius: 8px; }
.viewer-figure figcaption { max-width: 600px; color: #d0d1d4; font-size: 13px; line-height: 1.5; text-align: center; }
@media (hover: hover) and (pointer: fine) { .viewer-close:hover { background: #3b3c40; } }
@media (max-width: 480px) {
  .screenshot-viewer { padding-inline: 16px; }
  .gallery-images--steps { grid-template-columns: minmax(0, 1fr); max-width: 358px; margin-inline: auto; }
}
@media (hover: hover) and (pointer: fine) { .service-link:hover { opacity: .85; } }
@media (max-width: 640px) {
  .project-main { padding-top: 24px; }
  .project-detail { padding-top: 28px; }
  .detail-heading { gap: 14px; }
  .detail-heading h1 { font-size: 26px; }
  .detail-description { font-size: 16px; }
  .hero { padding-top: 36px; padding-bottom: 36px; }
  .portrait { width: 144px; height: 144px; margin-bottom: 20px; }
  .portrait-letter { font-size: 44px; }
  h1 { font-size: 26px; }
  .intro-description { font-size: 15px; }
  .project { grid-template-columns: 42px minmax(0, 1fr) 20px; gap: 12px; padding-block: 16px; }
  .project-icon { width: 42px; height: 42px; border-radius: 10px; }
  .project-icon img { width: 32px; height: 32px; }
  .status { display: table; margin: 5px 0 6px; }
}
@media (max-width: 360px) {
  main, .footer { width: calc(100% - 32px); }
  h1 { font-size: 24px; }
  .project { gap: 10px; }
}
@keyframes page-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .projects h2, .project, .footer, .project-detail {
    animation: page-enter 700ms cubic-bezier(.22, 1, .36, 1) backwards;
  }
  .hero h1 { animation-delay: 60ms; }
  .intro-description { animation-delay: 110ms; }
  .contact-links { animation-delay: 160ms; }
  .projects h2 { animation-delay: 220ms; }
  .project:nth-child(1) { animation-delay: 260ms; }
  .project:nth-child(2) { animation-delay: 310ms; }
  .project:nth-child(3) { animation-delay: 360ms; }
  .project:nth-child(4) { animation-delay: 410ms; }
  .project:nth-child(5) { animation-delay: 460ms; }
  .project:nth-child(6) { animation-delay: 510ms; }
  .footer { animation-delay: 560ms; }
  .hero:focus-within, .hero > :focus-within, .project:focus-within { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
