@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/montserrat-300.ttf') format('truetype');
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/montserrat-400.ttf') format('truetype');
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/montserrat-600.ttf') format('truetype');
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/montserrat-700.ttf') format('truetype');
}

:root {
  color-scheme: dark;
  --background: #1b1b1c;
  --white: #dcdcdc;
  --pink: #ff008a;
  --blue: #007aff;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--background); }
body { margin: 0; color: var(--white); background: var(--background); }
main { position: relative; overflow: hidden; min-height: 100vh; background-image: linear-gradient(-33.385deg, #000 11.573%, transparent 62.986%), linear-gradient(90deg, #1b1b1c 0%, #1b1b1c 100%); }

.hero { position: relative; height: 593px; min-height: 593px; display: flex; justify-content: center; overflow: hidden; padding: 120px 24px 24px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(10,10,12,.06), #1b1b1c 90%); }
.hero-glows { position: absolute; width: min(840px, 100vw); height: 500px; top: 70px; left: 50%; transform: translateX(-50%); z-index: -1; background: url('assets/glow-pink.svg') 34% 50% / 75% auto no-repeat, url('assets/glow-blue.svg') 68% 50% / 75% auto no-repeat; opacity: .8; pointer-events: none; }
.device-wall { position: absolute; inset: 0; z-index: -1; overflow: hidden; opacity: .08; mask-image: linear-gradient(to bottom, #000 0, transparent 96%); }
.device { position: absolute; width: 140px; height: 280px; border: 2px solid rgba(255,255,255,.32); border-radius: 25px; padding: 7px; background: #111; box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 16px 42px #000; overflow: hidden; }
.device img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.device-a { left: calc(50% - 400px); top: -95px; transform: rotate(-12deg); }
.device-b { left: calc(50% - 235px); top: -82px; transform: rotate(-6deg); }
.device-c { left: calc(50% - 70px); top: -108px; transform: rotate(2deg); }
.device-d { left: calc(50% + 95px); top: -78px; transform: rotate(8deg); }
.device-e { left: calc(50% + 260px); top: -98px; transform: rotate(14deg); }
.hero-content { width: min(800px, 100%); display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.avatar { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; box-shadow: 0 3px 25px rgba(0,0,0,.28); }
h1 { margin: 0; color: #f5f5f5; font-size: 56px; line-height: normal; font-weight: 700; }
.role { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0; font-size: 24px; line-height: normal; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.role span { color: var(--pink); font-weight: 600; }
.role b { color: var(--blue); font-weight: 600; }
.tagline { margin: 0; color: #dcdcdc; font-size: 24px; line-height: normal; font-weight: 300; }
.client-logos { display: flex; align-items: center; justify-content: center; gap: 56px; height: 32px; margin: 0; }
.client-logos img { display: block; max-width: 117px; max-height: 32px; width: auto; height: auto; opacity: .45; filter: grayscale(1); }
.telegram-button { display: inline-flex; height: 48px; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-radius: 12px; color: #fff; background: #007aff; font-size: 16px; font-weight: 600; text-decoration: none; box-shadow: 0 5px 18px rgba(0,122,255,.22); transition: transform .18s ease, background-color .18s ease; }
.telegram-button:hover { background: #0876d5; transform: translateY(-2px); }
.telegram-button img { width: 24px; height: 24px; }

.section { width: min(800px, calc(100% - 48px)); margin: 0 auto; }
.section h2, .footer h2 { margin: 0; color: var(--pink); font-size: 24px; line-height: normal; font-weight: 600; }
.about { display: flex; flex-direction: column; gap: 24px; padding: 32px 0; }
.about-info { display: flex; flex-direction: column; gap: 24px; }
.about-copy { max-width: 800px; margin: 0; color: var(--white); font-size: 16px; line-height: 20px; }
.skills { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 0; }
.skills li { padding: 4px 12px; color: #dcdcdc; background: #2a2a2b; border-radius: 8px; font-size: 16px; line-height: 20px; }
.experience { display: flex; flex-direction: column; gap: 24px; padding: 32px 0; }
.jobs { display: grid; gap: 16px; }
.job { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
.job time { color: var(--white); font-size: 20px; line-height: normal; white-space: nowrap; }
.job-copy, .project-copy { display: flex; flex-direction: column; gap: 8px; }
.job h3, .project h3 { margin: 0; color: var(--blue); font-size: 20px; line-height: normal; font-weight: 600; }
.job p, .project p { margin: 0; color: var(--white); font-size: 16px; line-height: normal; }
.projects { display: flex; flex-direction: column; gap: 48px; width: min(800px, calc(100% - 48px)); padding: 32px 0 72px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.project { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.project-link { color: inherit; text-decoration: none; }
.project-link img { transition: transform .2s ease; }
.project-link:hover img { transform: translateY(-4px); }
.project img { display: block; width: 100%; aspect-ratio: 746 / 496; object-fit: cover; box-shadow: 0 41.778px 33.422px rgba(0,0,0,.4); }
.footer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 162px; padding: 48px max(24px, calc((100% - 800px) / 2)); border-top: 1px solid rgba(255,255,255,.08); overflow: visible; }
.footer-glow { position: absolute; z-index: 0; width: 542px; height: 542px; left: calc(50% - 271px); top: 25px; overflow: visible; pointer-events: none; }
.footer-glow img { position: absolute; left: -411px; top: -411px; max-width: none; }
.footer h2 { position: relative; z-index: 1; margin: 0; white-space: nowrap; }
.contact-links { position: relative; z-index: 1; display: flex; align-items: center; gap: 26px; }
.contact-links a { display: flex; align-items: center; gap: 9px; color: var(--white); font-size: 16px; font-weight: 600; text-decoration: none; }
.contact-links a:hover { color: #fff; }
.contact-links img { display: block; width: 24px; height: 24px; }

@media (min-width: 1200px) {
  .section, .projects { width: min(800px, calc(100% - 48px)); }
}
@media (max-width: 700px) {
  .hero { height: 545px; min-height: 545px; padding: 80px 16px 24px; }
  .hero-glows { width: 620px; height: 400px; top: 95px; background-size: 70% auto, 70% auto; }
  .device-wall { opacity: .1; }
  .device { width: 140px; height: 280px; }
  .device-a { left: -68px; top: -48px; }
  .device-b { left: 24px; top: -48px; }
  .device-c { left: 116px; top: -48px; }
  .device-d { left: 208px; top: -48px; }
  .device-e { left: 300px; top: -48px; }
  .hero-content { width: 100%; }
  .hero-copy { gap: 24px; }
  .avatar { width: 78px; height: 78px; }
  h1 { margin: 0; font-size: 32px; }
  .role { flex-direction: column; gap: 16px; margin: 0; font-size: 16px; letter-spacing: 2px; }
  .tagline { max-width: 345px; font-size: 16px; line-height: normal; font-weight: 400; }
  .desktop-break { display: none; }
  .client-logos { gap: 22px; height: 27px; margin: 0; }
  .client-logos img { max-width: 90px; max-height: 27px; }
  .telegram-button { height: 40px; margin: 0; padding: 8px 12px; border-radius: 12px; font-size: 14px; }
  .telegram-button img { width: 20px; height: 20px; }
  .section, .projects { width: calc(100% - 32px); }
  .section h2 { font-size: 24px; }
  .about { gap: 32px; padding: 24px 0 40px; }
  .about-info { gap: 24px; }
  .about-copy { font-size: 16px; line-height: 20px; }
  .skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .skills li { text-align: center; padding: 4px 12px; font-size: 16px; }
  .skills li:nth-child(odd):last-child { grid-column: 1 / -1; }
  .experience { gap: 32px; padding: 24px 0 40px; }
  .jobs { gap: 24px; }
  .job { display: block; }
  .job time { display: block; margin-bottom: 8px; font-size: 16px; }
  .job h3, .project h3 { font-size: 16px; }
  .job p { font-size: 16px; line-height: normal; }
  .projects { gap: 32px; padding: 24px 0; }
  .project-grid { grid-template-columns: 1fr; gap: 32px; }
  .project p { font-size: 14px; }
  .project img { aspect-ratio: 746 / 496; }
  .footer { min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 24px 16px; }
  .footer h2 { font-size: 18px; }
  .contact-links { gap: 20px; }
  .contact-links a { gap: 6px; font-size: 14px; }
  .contact-links img { width: 20px; height: 20px; }
  .footer-glow { left: calc(50% - 271px); top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Project detail: My Auto */
.case-main { min-height: 100vh; padding: 120px 24px 64px; }
.case-content { width: min(800px, 100%); margin: 0 auto; }
.case-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 48px; color: #8d8d8d; font-size: 16px; line-height: 24px; }
.case-breadcrumb a { color: inherit; text-decoration: none; }
.case-breadcrumb a:hover { color: var(--white); }
.case-title { margin: 0 0 32px; color: var(--pink); font-size: 24px; line-height: 29px; font-weight: 600; }
.case-section { margin: 0 0 32px; padding-bottom: 32px; }
.case-intro { margin-bottom: 0; }
.case-lead { display: flex; flex-direction: column; gap: 8px; margin: 0 0 24px; font-size: 20px; line-height: 1.5; }
.case-lead strong { color: var(--blue); font-size: 20px; line-height: 1.2; font-weight: 600; }
.case-copy { margin: 0; color: var(--white); font-size: 20px; line-height: 1.5; font-weight: 400; }
.case-image { display: block; width: 100%; aspect-ratio: 746 / 496; object-fit: cover; border-radius: 24px; box-shadow: 0 41.778px 33.422px rgba(0,0,0,.4); }
.case-image-first { margin-top: 24px; }
.credit-content > .case-image-first { margin-bottom: 32px; }
.case-role { display: flex; gap: 16px; margin: 0 0 24px; font-size: 20px; line-height: 1.5; }
.case-role strong { color: #b8ff15; font-weight: 400; white-space: nowrap; flex-shrink: 0; }
.case-heading { margin: 0 0 8px; color: var(--blue); font-size: 20px; line-height: 1.2; font-weight: 600; }
.case-copy + .case-copy { margin-top: 8px; }
.case-list { margin: 8px 0; padding-left: 32px; font-size: 20px; line-height: 1.5; }
.case-list li { padding-left: 0; margin-bottom: 10px; }
.case-list li:last-child { margin-bottom: 0; }
.case-section .case-image { margin-top: 24px; }
.case-image-natural { height: auto; aspect-ratio: auto; object-fit: contain; }
.case-gallery { display: grid; gap: 32px; margin-top: 24px; }
.case-gallery figure { margin: 0; }
.presentation-carousel { padding-bottom: 32px; }
.case-gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 24px; box-shadow: 0 41.778px 33.422px rgba(0,0,0,.4); }
.case-gallery figcaption { margin: 0 0 24px; color: var(--white); font-size: 20px; line-height: 1.4; }
.presentation-track { display: flex; gap: 24px; width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #676769 transparent; }
.presentation-track:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.presentation-slide { position: relative; flex: 0 0 min(800px, 100%); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 24px; background-color: #29292b; background-repeat: no-repeat; box-shadow: 0 41.778px 33.422px rgba(0,0,0,.4); scroll-snap-align: start; }
.presentation-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; object-fit: fill; border-radius: 0; box-shadow: none; }
.case-metric { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; padding: 24px; border-radius: 24px; background: #29292b; }
.case-metric-block { display: flex; flex-direction: column; gap: 16px; }
.case-metric hr { width: 100%; height: 1px; margin: 0; border: 0; background: rgba(0,0,0,.35); }
.case-metric h3 { margin: 0; color: #dcdcdc; font-size: 20px; line-height: normal; font-weight: 600; }
.case-metric h3.case-green { color: #b8ff15; }
.case-metric p { margin: 0; font-size: 16px; line-height: normal; font-weight: 400; }
.case-metric + .case-metric { margin-top: 16px; }
.case-green { color: #b8ff15; }
.case-pink { color: var(--pink); }
.back-to-top-wrap { display: flex; justify-content: center; width: 100%; margin-top: 32px; }
.back-to-top { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; transition: transform .18s ease, opacity .18s ease; }
.back-to-top img { display: block; width: 32px; height: 32px; }
.back-to-top:hover { transform: translateY(-3px); opacity: .8; }
.back-to-top:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.salary-content > .case-lead + .case-image { margin-bottom: 64px; }
.salary-content .case-market { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); align-items: stretch; gap: 24px; margin: 24px 0; padding: 24px; border-radius: 24px; background: #2a2a2b; box-shadow: 0 41.778px 33.422px rgba(0,0,0,.4); }
.salary-content .case-market h3 { margin: 0 0 16px; font-size: 20px; line-height: 1.2; }
.salary-content .case-market p { margin: 0; font-size: 16px; line-height: 1.5; }
.salary-content .case-market-divider { display: block; width: 1px; min-height: 100%; background: rgba(0,0,0,.4); }
.salary-content .case-image-wide { aspect-ratio: 1600 / 490; }
.salary-content .case-image-wide + .case-copy { margin-top: 24px; }
.salary-content .case-metric hr { width: 100%; height: 1px; margin: 0; border: 0; background: rgba(0,0,0,.35); }
.salary-content .case-section > .case-copy + .case-copy { margin-top: 8px; }
.salary-content .case-metric + .case-metric { margin-top: 24px; }
.salary-content .case-metric + .case-copy { margin-top: 24px; }

@media (max-width: 700px) {
  .case-main { padding: 40px 16px 48px; }
  .case-breadcrumb { margin-bottom: 32px; font-size: 14px; }
  .case-title { margin-bottom: 24px; }
  .case-copy, .case-lead, .case-list { font-size: 16px; }
  .case-lead strong, .case-heading { font-size: 16px; }
  .case-role { flex-wrap: wrap; gap: 4px 12px; font-size: 16px; }
  .case-image { border-radius: 16px; }
  .case-gallery img { border-radius: 16px; }
  .case-gallery figcaption { font-size: 16px; }
  .presentation-slide { border-radius: 16px; }
  .case-metric { padding: 20px; border-radius: 18px; }
  .case-metric p { font-size: 16px; }
  .salary-content .case-market { grid-template-columns: 1fr; gap: 20px; padding: 20px; border-radius: 18px; }
  .salary-content .case-market-divider { width: 100%; min-height: 1px; }
}
