:root {
  --color-text: #222222;
  --color-muted: #5f6670;
  --color-bg: #ffffff;
  --color-surface: #f7f9fb;
  --color-surface-strong: #eef5fb;
  --color-border: #d9e2ea;
  --color-primary: #0e6ca4;
  --color-primary-soft: #e7f3fb;
  --color-accent: #ff4d4f;
  --shadow-soft: 0 12px 32px rgba(14, 34, 54, 0.09);
  --shadow-card: 0 8px 24px rgba(14, 34, 54, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --container: 1120px;
  --section-space: 92px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: "Montserrat", Arial, sans-serif;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

body.lock {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(14, 108, 164, 0.35);
  outline-offset: 3px;
}

button {
  font: inherit;
}

ul {
  list-style-position: inside;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section {
  padding: var(--section-space) 0;
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

.section__header {
  max-width: 760px;
  margin-bottom: 38px;
}

.section__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 14px;
}

.section__subtitle {
  color: var(--color-muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  font-weight: 400;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 0.96rem;
  font-weight: 600;
  white-space: nowrap;
}

.button:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.button--primary {
  color: #ffffff;
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.button--primary:hover {
  color: #ffffff;
  border-color: #095681;
  background: #095681;
}

.button--secondary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.72);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
}

.site-header__container {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header__logo {
  color: var(--color-text);
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-left: auto;
}

.site-header__nav-link {
  color: var(--color-text);
  font-size: 0.94rem;
  font-weight: 500;
}

.language-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.language-switcher__button {
  min-width: 42px;
  border: 0;
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--color-muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
}

.language-switcher__button.is-active {
  color: #ffffff;
  background: var(--color-primary);
}

.site-header__burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
}

.site-header__burger-line {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--color-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header__burger.is-active .site-header__burger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header__burger.is-active .site-header__burger-line:nth-child(2) {
  opacity: 0;
}

.site-header__burger.is-active .site-header__burger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 48%, rgba(255, 255, 255, 0.62) 100%), url("images/header.webp");
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 1px;
  background: var(--color-border);
}

.hero__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 64px;
  padding: 70px 0;
}

.hero__content {
  max-width: 780px;
}

.hero__eyebrow {
  margin-bottom: 16px;
  color: var(--color-primary);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 860px;
  font-size: clamp(2.25rem, 5vw, 4.55rem);
  font-weight: 700;
  line-height: 1.04;
  overflow-wrap: break-word;
}

.hero__subtitle {
  max-width: 720px;
  margin-top: 22px;
  color: #3f4650;
  font-size: clamp(1.04rem, 2vw, 1.32rem);
  font-weight: 400;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero__media {
  display: flex;
  justify-content: center;
}

.hero__avatar {
  width: 220px;
  height: 220px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  background: #ffffff;
}

.featured-projects {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.featured-projects__grid {
  display: grid;
  gap: 28px;
}

.featured-projects__grid[aria-busy=true] {
  min-height: 480px;
}

.projects-load-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.project-card,
.service-card,
.skills__group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.project-card--featured {
  padding: clamp(24px, 4vw, 38px);
  border-color: #c7ddec;
}

.project-card--featured:first-child {
  border-color: #9cc8e6;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.project-card__type,
.project-card__status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.project-card__type {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.project-card__status {
  color: #ffffff;
  background: var(--color-primary);
}

.project-card__title {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 700;
}

.project-card__role {
  margin-bottom: 16px;
  color: var(--color-muted);
  font-weight: 700;
  overflow-wrap: break-word;
}

.project-card__description {
  max-width: 820px;
  color: #3f4650;
  font-size: 1.04rem;
}

.project-card__description + .project-card__description {
  margin-top: 12px;
}

.project-card__note {
  width: fit-content;
  margin-top: 18px;
  padding: 10px 12px;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #273642;
  background: var(--color-primary-soft);
  font-size: 0.94rem;
  font-weight: 700;
}

.project-card__features {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  color: #303842;
  list-style-position: outside;
  padding-left: 20px;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  list-style: none;
}

.badge-list li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: #34404c;
  background: var(--color-surface);
  font-size: 0.84rem;
  font-weight: 600;
}

.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.project-card__links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.project-card__links a:hover {
  color: #ffffff;
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.project-card__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.project-card__gallery-button {
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 16px;
  background: transparent;
  cursor: zoom-in;
}

.project-card__gallery-button:focus-visible {
  outline: 3px solid rgba(14, 108, 164, 0.35);
  outline-offset: 4px;
}

.project-card__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  object-fit: cover;
}

.project-card__gallery--mobile-screens {
  justify-items: center;
  align-items: start;
}

.project-card__gallery--bradbury-mobile {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  align-items: start;
}

.project-card__gallery--bradbury-mobile .project-card__image--mobile-screen {
  max-width: 220px;
}

.project-card__gallery--bradbury-desktop {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.project-card__image--mobile-screen {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 58px 56px;
  background: rgba(8, 16, 24, 0.82);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
}

.lightbox__image {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.lightbox__caption {
  max-width: min(92vw, 820px);
  color: #ffffff;
  font-size: 0.9rem;
  text-align: center;
}

.lightbox__close,
.lightbox__control {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: rgba(10, 22, 34, 0.72);
  cursor: pointer;
  font-weight: 700;
}

.lightbox__close:hover,
.lightbox__control:hover {
  background: rgba(14, 108, 164, 0.9);
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-size: 1.55rem;
  line-height: 1;
}

.lightbox__control {
  position: absolute;
  top: 50%;
  min-width: 74px;
  min-height: 42px;
  padding: 0 14px;
  transform: translateY(-50%);
}

.lightbox__control--prev {
  left: 18px;
}

.lightbox__control--next {
  right: 18px;
}

.skills__grid,
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.skills__group,
.service-card {
  padding: 24px;
}

.skills__group h3,
.service-card h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
  font-weight: 700;
}

.skills__group .badge-list {
  margin-top: 16px;
}

.service-card {
  box-shadow: none;
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.97rem;
}

.about {
  background: var(--color-surface);
}

.about__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
}

.about__content {
  max-width: 760px;
}

.about__content p {
  margin-top: 16px;
  color: #3f4650;
  font-size: 1.04rem;
}

.about__highlights {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  list-style: none;
}

.about__highlights li {
  padding: 12px 14px;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #ffffff;
  font-weight: 600;
}

.about__media img {
  width: 100%;
  max-height: 440px;
  border: 4px solid #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}

.contact {
  background: var(--color-surface-strong);
}

.contact__container {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 44px;
  align-items: start;
}

.contact__list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.contact__list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.contact__list span {
  color: var(--color-muted);
  font-weight: 700;
}

.contact__list a {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.site-footer {
  padding: 28px 0;
  color: var(--color-muted);
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.scroll-to-top {
  position: fixed;
  top: 26px;
  right: 24px;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

@media (max-width: 1024px) {
  :root {
    --section-space: 76px;
  }
  .site-header__container {
    gap: 14px;
  }
  .site-header__nav {
    gap: 14px;
  }
  .hero__container,
  .about__container,
  .contact__container {
    grid-template-columns: 1fr;
  }
  .hero__media {
    display: none;
  }
  .skills__grid,
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about__media {
    max-width: 360px;
  }
  .project-card__gallery--bradbury-desktop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .site-header__container {
    min-height: 66px;
  }
  .site-header__nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s ease;
  }
  .site-header__nav.is-open {
    transform: translateY(0);
    visibility: visible;
  }
  .site-header__nav-link {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }
  .site-header__burger {
    display: block;
  }
  .language-switcher {
    margin-left: auto;
  }
  .hero {
    min-height: auto;
  }
  .hero__container {
    gap: 34px;
    padding: 58px 0;
  }
  .project-card__gallery--bradbury-mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  :root {
    --section-space: 58px;
  }
  .container {
    width: min(100% - 28px, var(--container));
  }
  .site-header__logo {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero__background {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.9) 100%), url("images/header.webp");
  }
  .hero__title {
    font-size: 2.2rem;
  }
  .hero__actions,
  .project-card__links {
    display: grid;
    grid-template-columns: 1fr;
  }
  .button,
  .project-card__links a {
    width: 100%;
  }
  .project-card--featured,
  .skills__group,
  .service-card {
    padding: 20px;
  }
  .project-card__gallery,
  .project-card__gallery--bradbury-mobile,
  .project-card__gallery--bradbury-desktop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .project-card__gallery .project-card__image {
    height: 168px;
    aspect-ratio: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    object-fit: contain;
  }
  .project-card__gallery-button {
    border-radius: var(--radius-sm);
  }
  .lightbox {
    padding: 56px 12px 76px;
  }
  .lightbox__image {
    max-width: 92vw;
    max-height: 78vh;
  }
  .lightbox__control {
    top: auto;
    bottom: 18px;
    min-width: 104px;
    transform: none;
  }
  .lightbox__control--prev {
    left: 14px;
  }
  .lightbox__control--next {
    right: 14px;
  }
  .skills__grid,
  .services__grid {
    grid-template-columns: 1fr;
  }
  .contact__list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .scroll-to-top {
    top: auto;
    right: 16px;
    bottom: 18px;
  }
}
@media (max-width: 430px) {
  .site-header__container {
    gap: 8px;
  }
  .site-header__logo {
    max-width: 38vw;
    font-size: 0.92rem;
  }
  .language-switcher {
    gap: 2px;
    padding: 3px;
  }
  .language-switcher__button {
    min-width: 34px;
    padding: 6px 7px;
  }
  .site-header__burger {
    width: 38px;
    height: 38px;
  }
}
@media (max-width: 359px) {
  .project-card__gallery,
  .project-card__gallery--bradbury-mobile,
  .project-card__gallery--bradbury-desktop {
    grid-template-columns: 1fr;
  }
}
