/**
 * Main stylesheet of the site.
 *
 * Mobile-first, breakpoints: 768px (tablet) and 1024px (desktop).
 * Order: design tokens, base, shared components, header, hero, sections,
 * portfolio, carousel, lightbox, experience, contacts, footer, error page,
 * reveal animations, progressive enhancements.
 *
 * Sections share one light canvas: their backgrounds are soft radial glows
 * and gradients that fade into the base colour at the edges, so blocks flow
 * into each other without visible borders. Only `opacity` and `transform`
 * are animated to keep scrolling smooth.
 */

:root {
  --color-primary: #41D098;
  --color-secondary: #45A57F;
  --color-primary-strong: #2E7D5F;
  --color-primary-soft: #E3F7EE;
  --color-on-primary: #10261D;
  --color-bg: #F6F6F6;
  --color-line: #EEEEEE;
  --color-surface: #FFFFFF;
  --color-text: #333333;
  --color-muted: #5F6B66;

  --glow-primary: rgb(65 208 152 / 0.16);
  --glow-secondary: rgb(69 165 127 / 0.1);
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow-s: 0 1px 2px rgb(51 51 51 / 0.04), 0 4px 12px rgb(51 51 51 / 0.05);
  --shadow-m: 0 2px 6px rgb(51 51 51 / 0.04), 0 16px 40px rgb(51 51 51 / 0.07);
  --shadow-l: 0 4px 12px rgb(51 51 51 / 0.05), 0 28px 64px rgb(51 51 51 / 0.1);
  --shadow-primary: 0 10px 24px rgb(65 208 152 / 0.32);

  --header-h: 76px;
  --container: 1120px;
  --gutter: 16px;
  --section-space: 96px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-duration: 900ms;
  --reveal-shift: 32px;

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --header-h: 88px;
    --gutter: 32px;
    --section-space: 136px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-primary-strong);
  outline-offset: 3px;
}

::selection {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  color: var(--color-surface);
  background: var(--color-text);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: none;
  transition-duration: 0.1s;
}

.button__icon {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease);
}

.button:hover .button__icon {
  transform: translateX(4px);
}

.button:hover .button__icon--down {
  transform: translateY(3px);
}

.button--primary {
  color: var(--color-on-primary);
  background: var(--color-primary);
  box-shadow: var(--shadow-primary), inset 0 1px 0 rgb(255 255 255 / 0.35);
}

.button--primary:hover {
  box-shadow: 0 16px 36px rgb(65 208 152 / 0.42), inset 0 1px 0 rgb(255 255 255 / 0.35);
}

.button--ghost {
  background: rgb(255 255 255 / 0.8);
  box-shadow: inset 0 0 0 1px rgb(51 51 51 / 0.08), var(--shadow-s);
}

.button--ghost:hover {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-primary), var(--shadow-m);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-primary-strong);
  background: var(--color-primary-soft);
}

.status {
  padding: 28px 24px;
  border-radius: var(--radius-m);
  text-align: center;
  color: var(--color-muted);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.8125rem;
  color: var(--color-on-primary);
  background: var(--gradient-primary);
  box-shadow: 0 6px 14px rgb(65 208 152 / 0.35), inset 0 1px 0 rgb(255 255 255 / 0.35);
  transition: transform 0.5s var(--ease);
}

.logo:hover .logo__mark {
  transform: rotate(-8deg) scale(1.05);
}

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: 10px;
  pointer-events: none;
}

.header__progress {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 6px 0 10px;
  border-radius: 20px;
  pointer-events: auto;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.header.is-scrolled .header__inner,
.header.is-menu-open .header__inner {
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 0 0 1px rgb(51 51 51 / 0.06), 0 12px 32px rgb(51 51 51 / 0.08);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  transition: background-color 0.2s;
}

.menu-toggle:hover {
  background: var(--color-primary-soft);
}

.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--ease), background-color 0.3s;
}

.menu-toggle__bar {
  position: relative;
}

.menu-toggle__bar::before,
.menu-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle__bar::before {
  transform: translateY(-6px);
}

.menu-toggle__bar::after {
  transform: translateY(6px);
}

.is-menu-open .menu-toggle__bar {
  background: transparent;
}

.is-menu-open .menu-toggle__bar::before {
  transform: rotate(45deg);
}

.is-menu-open .menu-toggle__bar::after {
  transform: rotate(-45deg);
}

.nav {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 8px;
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 0 0 1px rgb(51 51 51 / 0.06), var(--shadow-l);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: 50% 0;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s 0.4s;
}

.is-menu-open .nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.nav__list {
  display: grid;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
  transition: color 0.25s, background-color 0.25s;
}

.nav__link:hover {
  color: var(--color-primary-strong);
}

.nav__link[aria-current] {
  color: var(--color-primary-strong);
  background: var(--color-primary-soft);
}

@media (min-width: 768px) {
  .header {
    padding-top: 16px;
  }

  .header__inner {
    padding: 0 8px 0 12px;
    border-radius: 999px;
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    display: flex;
  }

  .nav__link {
    padding: 8px 16px;
    border-radius: 999px;
  }
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 32px) 0 112px;
  overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 88% -10%, var(--glow-primary), transparent 65%),
    radial-gradient(44rem 30rem at -10% 90%, var(--glow-secondary), transparent 65%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(51 51 51 / 0.1) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 35%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  align-items: center;
  gap: 56px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary-strong);
  background: rgb(255 255 255 / 0.85);
  box-shadow: inset 0 0 0 1px rgb(65 208 152 / 0.25), var(--shadow-s);
}

.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgb(65 208 152 / 0.2);
  animation: pulse 2.4s var(--ease) infinite;
}

.hero__title {
  margin-top: 24px;
  font-size: clamp(2.375rem, 1.2rem + 4.6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.accent {
  color: var(--color-primary-strong);
  background: linear-gradient(90deg, rgb(65 208 152 / 0.45), rgb(69 165 127 / 0.3)) no-repeat 0 88% / 0% 34%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 1.1s var(--ease) 0.5s;
}

.is-visible .accent {
  background-size: 100% 34%;
}

.hero__slogan {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
}

.hero__slogan::before {
  content: "";
  width: 40px;
  height: 3px;
  flex: none;
  border-radius: 3px;
  background: var(--gradient-primary);
}

.hero__lead {
  max-width: 34rem;
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--color-muted);
}

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

.hero__visual {
  position: relative;
  display: none;
  justify-self: center;
  isolation: isolate;
}

.hero__visual::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(65 208 152 / 0.28), rgb(65 208 152 / 0.08) 45%, transparent 70%);
}

.hero__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
  border: 1.5px dashed rgb(69 165 127 / 0.35);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}

.hero__orbit::before,
.hero__orbit::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 6px rgb(65 208 152 / 0.18);
}

.hero__orbit::before {
  top: 12%;
  left: 12%;
}

.hero__orbit::after {
  right: 6%;
  bottom: 26%;
  width: 10px;
  height: 10px;
  background: var(--color-secondary);
}

.phone {
  width: 270px;
  aspect-ratio: 9 / 18.5;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #3a3a3a, #1f1f1f);
  box-shadow: 0 50px 90px rgb(16 38 29 / 0.28), 0 0 0 1px #444 inset, 0 0 0 4px rgb(255 255 255 / 0.06) inset;
  animation: float 7s ease-in-out infinite;
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 44px 14px 14px;
  overflow: hidden;
  border-radius: 36px;
  background: var(--color-bg);
}

.phone__screen::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 84px;
  height: 22px;
  border-radius: 999px;
  background: #1f1f1f;
  transform: translateX(-50%);
}

.phone__banner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  height: 128px;
  flex: none;
  padding: 16px;
  border-radius: 22px;
  background: var(--gradient-primary);
  box-shadow: 0 10px 20px rgb(65 208 152 / 0.3);
}

.phone__line {
  width: 70%;
  height: 10px;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.75);
}

.phone__line--short {
  width: 42%;
  background: rgb(255 255 255 / 0.45);
}

.phone__row {
  position: relative;
  height: 64px;
  flex: none;
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: var(--shadow-s);
}

.phone__row::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-primary-soft);
}

.phone__row::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 64px;
  right: 16px;
  height: 28px;
  background:
    linear-gradient(var(--color-line) 0 0) 0 0 / 80% 10px no-repeat,
    linear-gradient(var(--color-line) 0 0) 0 100% / 50% 10px no-repeat;
}

.phone__fab {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--color-primary);
  box-shadow: var(--shadow-primary);
}

.hero__badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 0 0 1px rgb(51 51 51 / 0.05), var(--shadow-m);
  animation: float 8s ease-in-out infinite;
}

.hero__badge--top {
  top: 18%;
  left: -72px;
  animation-delay: -2s;
}

.hero__badge--top::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.hero__badge--bottom {
  bottom: 16%;
  right: -64px;
  color: var(--color-on-primary);
  background: var(--color-primary);
  box-shadow: var(--shadow-primary);
  animation-delay: -5s;
}

.hero__visual:not(.is-visible) .phone,
.hero__visual:not(.is-visible) .hero__badge,
.hero__visual:not(.is-visible) .hero__orbit {
  animation-play-state: paused;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  display: none;
  width: 28px;
  height: 44px;
  margin-left: -14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgb(95 107 102 / 0.6);
  transition: box-shadow 0.3s;
}

.hero__scroll:hover {
  box-shadow: inset 0 0 0 2px var(--color-primary-strong);
}

.hero__scroll span {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--color-primary-strong);
  animation: scroll-hint 1.8s var(--ease) infinite;
}

@media (min-width: 768px) {
  .hero__scroll {
    display: block;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .hero__visual {
    display: block;
  }
}

@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgb(65 208 152 / 0.08);
  }
}

@keyframes scroll-hint {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }

  40% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

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

.section--portfolio {
  background:
    radial-gradient(50rem 36rem at -10% 30%, var(--glow-secondary), transparent 65%),
    radial-gradient(44rem 32rem at 110% 75%, var(--glow-primary), transparent 65%);
}

.section--experience {
  background: linear-gradient(
    to bottom,
    var(--color-bg),
    var(--color-surface) 22%,
    var(--color-surface) 78%,
    var(--color-bg)
  );
}

.section__header {
  max-width: 44rem;
  margin-bottom: 56px;
}

.section__eyebrow,
.contacts__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary-strong);
}

.section__number {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.section__eyebrow::after {
  content: "";
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1s var(--ease) 0.3s;
}

.is-visible .section__eyebrow::after {
  transform: none;
}

.section__title {
  margin-top: 16px;
  font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section__subtitle {
  max-width: 36rem;
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--color-muted);
}

.projects {
  display: grid;
  gap: 32px;
  counter-reset: project;
}

.project {
  position: relative;
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--color-surface);
  box-shadow: 0 0 0 1px rgb(51 51 51 / 0.04), var(--shadow-m);
  isolation: isolate;
  counter-increment: project;
  transition: box-shadow 0.5s var(--ease);
}

.project::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -160px;
  z-index: -1;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(65 208 152 / 0.12), transparent 70%);
}

.project:hover {
  box-shadow: 0 0 0 1px rgb(65 208 152 / 0.3), var(--shadow-l);
}

.project__body::before {
  content: counter(project, decimal-leading-zero);
  content: counter(project, decimal-leading-zero) / "";
  display: block;
  margin-bottom: 8px;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(65 208 152 / 0.55);
}

.project__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.project .tags {
  margin-top: 14px;
}

.project__description {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px 0 14px;
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--color-line);
  transition: transform 0.4s var(--ease), color 0.3s, background-color 0.3s, box-shadow 0.4s var(--ease);
}

.store-link .icon {
  width: 22px;
  height: 22px;
  color: var(--color-secondary);
  transition: color 0.3s;
}

.store-link:hover {
  color: var(--color-on-primary);
  background: var(--color-primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-2px);
}

.store-link:hover .icon {
  color: currentColor;
}

@media (min-width: 768px) {
  .project {
    padding: 32px;
  }
}

@media (min-width: 1024px) {
  .projects {
    gap: 56px;
  }

  .project {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 48px;
    padding: 44px;
  }

  .project:nth-child(even) .project__body {
    order: 2;
  }

  .project:nth-child(even)::before {
    right: auto;
    left: -160px;
  }
}

.carousel {
  --slide-h: 320px;
  position: relative;
  min-width: 0;
  padding: 12px 12px 18px;
  border-radius: var(--radius-m);
  background: linear-gradient(145deg, var(--color-bg), #EEF7F2);
  box-shadow: inset 0 0 0 1px rgb(51 51 51 / 0.04);
}

.carousel__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-s);
  container-type: inline-size;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: none;
  scroll-snap-align: start;
}

.carousel__open {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--color-line);
  box-shadow: 0 6px 16px rgb(51 51 51 / 0.08);
  cursor: zoom-in;
}

.carousel__image {
  width: auto;
  height: var(--slide-h);
  max-width: 100cqw;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
}

.carousel__open:hover .carousel__image {
  transform: scale(1.03);
}

.carousel__nav {
  position: absolute;
  top: calc(12px + var(--slide-h) / 2);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  color: var(--color-text);
  background: rgb(255 255 255 / 0.94);
  box-shadow: var(--shadow-m);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85);
  transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0s 0.4s, color 0.3s, background-color 0.3s;
}

.carousel__nav .icon {
  width: 20px;
  height: 20px;
}

.carousel__nav--prev {
  left: 20px;
}

.carousel__nav--next {
  right: 20px;
}

.carousel.is-scrollable .carousel__nav:not(:disabled) {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.carousel__nav:hover {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.carousel__progress {
  width: 96px;
  height: 4px;
  margin: 14px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(51 51 51 / 0.08);
  opacity: 0;
  transition: opacity 0.3s;
}

.carousel.is-scrollable .carousel__progress {
  opacity: 1;
}

.carousel__thumb {
  display: block;
  width: var(--thumb-size, 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
  transform: translateX(var(--thumb-offset, 0%));
}

@media (min-width: 768px) {
  .carousel {
    --slide-h: 400px;
  }
}

@media (min-width: 1024px) {
  .carousel {
    --slide-h: 440px;
  }
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 64px 16px 24px;
  border: 0;
  color: var(--color-surface);
  background: transparent;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgb(14 26 21 / 0.92);
  animation: fade-in 0.35s var(--ease);
}

.lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  animation: zoom-in 0.45s var(--ease);
}

.lightbox__image {
  width: auto;
  height: auto;
  max-width: min(100%, 1280px);
  max-height: calc(100svh - 150px);
  border-radius: var(--radius-s);
  object-fit: contain;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.4);
}

.lightbox__caption {
  max-width: 40rem;
  font-size: 0.9375rem;
  text-align: center;
  opacity: 0.85;
}

.lightbox__button {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  transition: color 0.3s, background-color 0.3s;
}

.lightbox__button:hover {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.lightbox__button .icon {
  width: 22px;
  height: 22px;
}

.lightbox__close {
  top: 12px;
  right: 12px;
}

.lightbox__nav {
  top: 50%;
  margin-top: -24px;
}

.lightbox__nav--prev {
  left: 12px;
}

.lightbox__nav--next {
  right: 12px;
}

.lightbox.is-single .lightbox__nav {
  display: none;
}

@media (min-width: 768px) {
  .lightbox {
    padding: 64px 88px 32px;
  }

  .lightbox__nav--prev {
    left: 24px;
  }

  .lightbox__nav--next {
    right: 24px;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

.timeline {
  --line-x: 7px;
  --offset: 32px;
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: var(--offset);
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: var(--line-x);
  width: 2px;
  border-radius: 2px;
}

.timeline::before {
  background: var(--color-line);
}

.timeline::after {
  background: linear-gradient(var(--color-primary), var(--color-secondary));
  transform-origin: 50% 0;
}

.job {
  position: relative;
}

.job::before {
  content: "";
  position: absolute;
  top: 30px;
  left: calc(var(--line-x) + 1px - 8px - var(--offset));
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 3px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 0 0 5px rgb(65 208 152 / 0.14);
  transition: background-color 0.5s var(--ease) 0.3s, box-shadow 0.5s var(--ease) 0.3s;
}

.job.is-visible::before {
  background: var(--color-primary);
  box-shadow: 0 0 0 7px rgb(65 208 152 / 0.18);
}

.job__card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-l);
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--color-line);
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.job__card:hover {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px rgb(65 208 152 / 0.45), var(--shadow-l);
}

.job__period {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary-strong);
}

.job__duration {
  font-weight: 500;
  color: var(--color-muted);
}

.job__position {
  margin-top: 8px;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.job__company {
  margin-top: 4px;
  font-weight: 600;
  color: var(--color-muted);
}

.job__details {
  display: grid;
  align-content: start;
  gap: 20px;
  margin-top: 20px;
}

.job__summary {
  display: grid;
  gap: 8px;
}

.job__subtitle {
  margin-bottom: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.job__list {
  display: grid;
  gap: 8px;
}

.job__list li {
  position: relative;
  padding-left: 24px;
}

.job__list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
}

.job__list--achievements li::before {
  top: 0.32em;
  width: 7px;
  height: 12px;
  border: solid var(--color-secondary);
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0;
  background: none;
  transform: rotate(45deg);
}

@media (min-width: 768px) {
  .timeline {
    --line-x: 15px;
    --offset: 56px;
    gap: 32px;
  }

  .job__card {
    padding: 32px;
  }
}

@media (min-width: 1024px) {
  .job__card {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    align-items: start;
    gap: 48px;
  }

  .job__header {
    padding-right: 32px;
    border-right: 1px solid var(--color-line);
  }

  .job__details {
    margin-top: 0;
  }
}

.contacts {
  display: flex;
  align-items: center;
  min-height: 70vh;
  min-height: 70svh;
  background: radial-gradient(48rem 28rem at 50% 70%, var(--glow-primary), transparent 70%);
}

.contacts .container {
  flex: 1;
}

.contacts__card {
  position: relative;
  padding: 56px 20px;
  overflow: hidden;
  border-radius: 36px;
  text-align: center;
  color: var(--color-on-primary);
  background:
    radial-gradient(circle at 20% 0%, rgb(255 255 255 / 0.25), transparent 50%),
    var(--gradient-primary);
  box-shadow: 0 30px 70px rgb(69 165 127 / 0.32), inset 0 1px 0 rgb(255 255 255 / 0.3);
  isolation: isolate;
}

.contacts__card::before,
.contacts__card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  animation: drift 14s ease-in-out infinite alternate;
}

.contacts__card::before {
  top: -140px;
  right: -90px;
  width: 340px;
  height: 340px;
  background: rgb(255 255 255 / 0.14);
}

.contacts__card::after {
  bottom: -170px;
  left: -110px;
  width: 380px;
  height: 380px;
  border: 2px solid rgb(255 255 255 / 0.2);
  animation-delay: -7s;
}

.contacts__card:not(.is-visible)::before,
.contacts__card:not(.is-visible)::after {
  animation-play-state: paused;
}

.contacts__eyebrow {
  justify-content: center;
  color: var(--color-on-primary);
}

.contacts__eyebrow .section__number {
  color: var(--color-primary-strong);
  background: var(--color-surface);
}

.contacts__title {
  margin-top: 16px;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.contacts__text {
  max-width: 34rem;
  margin: 16px auto 0;
  font-size: 1.0625rem;
}

.contacts__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 32px;
  margin-top: 44px;
}

.contact {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-weight: 700;
}

.contact__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: 0 12px 24px rgb(16 38 29 / 0.18);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), color 0.3s;
}

.contact__icon .icon {
  width: 32px;
  height: 32px;
}

.contact:hover .contact__icon {
  color: var(--color-secondary);
  box-shadow: 0 22px 40px rgb(16 38 29 / 0.26);
  transform: translateY(-6px) rotate(-4deg);
}

.contact:focus-visible {
  outline-color: var(--color-on-primary);
  border-radius: 8px;
}

@media (min-width: 768px) {
  .contacts__card {
    padding: 88px 48px;
  }

  .contact__icon {
    width: 88px;
    height: 88px;
    border-radius: 28px;
  }

  .contact__icon .icon {
    width: 38px;
    height: 38px;
  }
}

@keyframes drift {
  to {
    transform: translate3d(-24px, 18px, 0) scale(1.06);
  }
}

.footer {
  position: relative;
  padding: 32px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100% - 2 * var(--gutter), var(--container));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(51 51 51 / 0.12), transparent);
  transform: translateX(-50%);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px 24px;
}

.footer .logo {
  color: var(--color-text);
}

.logo--small .logo__mark {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.footer__nav {
  grid-column: 1 / -1;
  grid-row: 2;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-weight: 600;
}

.footer__links a {
  transition: color 0.25s;
}

.footer__links a:hover {
  color: var(--color-primary-strong);
}

.footer__copy {
  grid-column: 1 / -1;
}

.footer__top {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-line), var(--shadow-s);
  transition: transform 0.4s var(--ease), color 0.3s, background-color 0.3s;
}

.footer__top .icon {
  width: 20px;
  height: 20px;
}

.footer__top:hover {
  color: var(--color-on-primary);
  background: var(--color-primary);
  transform: translateY(-3px);
}

@media (min-width: 1024px) {
  .footer__inner {
    grid-template-columns: auto 1fr auto auto;
  }

  .footer__nav,
  .footer__copy,
  .footer__top {
    grid-column: auto;
    grid-row: auto;
  }

  .footer__nav {
    justify-self: center;
  }
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px var(--gutter);
  text-align: center;
  background: radial-gradient(40rem 30rem at 50% 30%, var(--glow-primary), transparent 70%);
}

.error-page__code {
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-primary);
}

.error-page__title {
  margin-top: 12px;
  font-size: 1.5rem;
}

.error-page__text {
  margin: 8px 0 32px;
  color: var(--color-muted);
}

.reveal {
  --reveal-x: 0px;
  --reveal-y: var(--reveal-shift);
  --reveal-scale: 1;
  opacity: 0;
  transform: translate3d(var(--reveal-x), var(--reveal-y), 0) scale(var(--reveal-scale));
  transition:
    opacity calc(var(--reveal-duration) * 0.7) var(--ease),
    transform var(--reveal-duration) var(--ease);
}

.reveal.is-above:not([data-reveal]) {
  --reveal-y: calc(var(--reveal-shift) * -1);
}

.reveal[data-reveal="left"] {
  --reveal-x: calc(var(--reveal-shift) * -1.5);
  --reveal-y: 0px;
}

.reveal[data-reveal="right"] {
  --reveal-x: calc(var(--reveal-shift) * 1.5);
  --reveal-y: 0px;
}

.reveal[data-reveal="zoom"] {
  --reveal-y: 0px;
  --reveal-scale: 0.94;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition-delay: var(--reveal-delay, 0ms);
}

.delay-1 {
  --reveal-delay: 100ms;
}

.delay-2 {
  --reveal-delay: 200ms;
}

.delay-3 {
  --reveal-delay: 300ms;
}

.delay-4 {
  --reveal-delay: 400ms;
}

@supports (animation-timeline: scroll()) {
  .header__progress {
    animation: grow-x linear both;
    animation-timeline: scroll(root block);
  }

  .timeline {
    view-timeline-name: --timeline;
  }

  .timeline::after {
    animation: grow-y linear both;
    animation-timeline: --timeline;
    animation-range: cover 15% cover 70%;
  }
}

@keyframes grow-x {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes grow-y {
  from {
    transform: scaleY(0);
  }

  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .accent {
    background-size: 100% 34%;
    transition: none;
  }

  .section__eyebrow::after {
    transform: none;
    transition: none;
  }

  .header__progress {
    display: none;
  }
}
