@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #1f2230;
  --bg-alt: #2a2e3f;
  --surface: rgba(46, 50, 69, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --title: #ffffff;
  --text: #bcc1d1;
  --muted: #9198ad;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #00d9a6;
  --accent-strong: #08b98f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --body-font: "Poppins", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(0, 217, 166, 0.08), transparent 26%),
    radial-gradient(circle at bottom right, rgba(0, 217, 166, 0.05), transparent 22%),
    linear-gradient(180deg, #1f2230 0%, #242839 100%);
}

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

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

ul {
  padding-left: 1.1rem;
}

.container {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0 3.5rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(31, 34, 48, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.header.is-scrolled {
  background: rgba(31, 34, 48, 0.9);
  border-bottom-color: var(--line);
}

.header__content {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header__brand {
  color: var(--title);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  position: relative;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__link:hover::after {
  transform: scaleX(1);
}

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

.main {
  overflow: hidden;
}

.hero {
  padding-top: 7rem;
}

.hero__container {
  display: grid;
  justify-items: center;
}

.hero__identity {
  display: grid;
  align-items: center;
  gap: 1.5rem 2rem;
  width: min(820px, 100%);
  padding: 1.75rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(0, 217, 166, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(44, 49, 68, 0.92), rgba(34, 38, 53, 0.96));
  border: 1px solid var(--line);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.18);
}

.hero__headline,
.hero__media,
.hero__contacts {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__media {
  transition-delay: 0.12s;
}

.hero__contacts {
  transition-delay: 0.22s;
}

.hero__headline.is-visible,
.hero__media.is-visible,
.hero__contacts.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__media {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.hero__headline {
  min-width: 0;
  max-width: 100%;
  justify-self: start;
}

.hero h1 {
  color: var(--title);
  font-size: clamp(2.35rem, 4vw, 3.45rem);
  line-height: 0.98;
  margin-bottom: 0.35rem;
  white-space: normal;
  letter-spacing: -0.04em;
}

.hero__role {
  color: #8db5ff;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__summary {
  max-width: 31rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #cdd4e2;
}

.hero__stat {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 8.5rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(12, 16, 28, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero__stat strong,
.hero__stat span {
  display: block;
}

.hero__stat strong {
  color: var(--title);
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 700;
}

.hero__stat span {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0.35rem;
}

.hero__photo {
  justify-self: center;
  width: 152px;
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
}

.hero__photo::before {
  content: "";
  position: absolute;
  inset: -0.35rem;
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(0, 217, 166, 0.9), rgba(76, 128, 255, 0.55)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.22));
}

.hero__photo-image {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow);
  background: #172030;
}

.hero__contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, max-content));
  gap: 0.45rem 1.1rem;
  justify-content: start;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  max-width: 26rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.contact__card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.contact__card:hover {
  transform: translateY(-1px);
  color: var(--title);
}

.contact__card i {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.88rem;
}

@media screen and (min-width: 768px) {
  .hero__identity {
    grid-template-columns: 152px minmax(0, 1fr);
  }
}

.resume {
  background: rgba(255, 255, 255, 0.02);
}

.experience {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.education {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
}

.projects {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0));
}

.projects__layout {
  display: grid;
  gap: 2.25rem;
}

.footer {
  padding: 1.75rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top left, rgba(0, 217, 166, 0.05), transparent 28%),
    rgba(14, 17, 28, 0.7);
}

.footer__content {
  display: grid;
  gap: 1.1rem;
  align-items: center;
}

.footer__brand {
  display: grid;
  gap: 0.2rem;
}

.footer__name {
  color: var(--title);
  font-size: 1.02rem;
  font-weight: 700;
}

.footer__role,
.footer__copy,
.footer__contacts,
.footer__contacts a,
.footer__contacts span {
  color: var(--muted);
}

.footer__role,
.footer__copy {
  font-size: 0.88rem;
}

.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  font-size: 0.88rem;
}

.footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer__contact i {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(0, 217, 166, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.footer__contacts a:hover {
  color: var(--title);
  transform: translateY(-1px);
  border-color: rgba(0, 217, 166, 0.18);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  display: grid;
  place-items: center;
  padding: 3.5rem 1rem 1rem;
}

.lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 1280px);
  max-height: calc(100vh - 6rem);
  border-radius: 0.9rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  background: rgba(12, 16, 28, 0.95);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--title);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.03);
}

.resume__grid {
  display: grid;
  gap: 2rem;
}

.resume__content {
  display: grid;
  gap: 2rem;
}

.panel {
  padding: 0;
  background: transparent;
}

.panel--feature {
  position: relative;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.section-heading span {
  color: var(--title);
  font-size: 1.7rem;
  font-weight: 700;
}

.panel > p,
.education__item p,
.timeline__item > p {
  color: var(--text);
}

.education__item h3,
.timeline__meta h3,
.skills-card h3 {
  color: var(--title);
  font-size: 1.02rem;
  line-height: 1.4;
}

.simple-list li {
  color: var(--text);
}

.simple-list li + li {
  margin-top: 0.45rem;
}

.language-panel {
  padding-bottom: 0.35rem;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.language-pill {
  min-width: 10rem;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.language-pill strong,
.language-pill span {
  display: block;
}

.language-pill strong {
  color: var(--title);
  font-size: 0.95rem;
  font-weight: 600;
}

.language-pill span {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.timeline {
  position: relative;
  margin-top: 1rem;
  display: grid;
  gap: 1.35rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(0, 217, 166, 0.4), rgba(255, 255, 255, 0.08));
}

.timeline__item {
  position: relative;
  width: calc(50% - 2.6rem);
  padding: 1.35rem 1.4rem;
  opacity: 0;
  transform: translateY(42px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.25s ease,
    border-color 0.25s ease;
  transition-delay: var(--delay, 0s);
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  width: 1rem;
  height: 1rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border: 3px solid var(--bg);
  border-radius: 0.3rem;
  box-shadow: 0 0 0 6px rgba(0, 217, 166, 0.08);
}

.timeline__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline__item:nth-child(odd) {
  justify-self: start;
  transform: translate3d(-56px, 42px, 0);
}

.timeline__item:nth-child(odd)::before {
  right: -3.12rem;
}

.timeline__item:nth-child(even) {
  justify-self: end;
  transform: translate3d(56px, 42px, 0);
}

.timeline__item:nth-child(even)::before {
  left: -3.12rem;
}

.timeline__item:nth-child(odd).is-visible,
.timeline__item:nth-child(even).is-visible,
.timeline__item:hover {
  transform: translate3d(0, 0, 0);
}

.timeline__item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 217, 166, 0.18);
}

.timeline__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.timeline__meta span {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.timeline__item > .timeline__company {
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.project-grid,
.company-projects {
  display: grid;
  gap: 1rem;
}

.project-tabs {
  display: inline-flex;
  gap: 0.55rem;
  padding: 0.35rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.project-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.project-tab:hover {
  color: var(--title);
}

.project-tab.is-active {
  color: var(--title);
  background: rgba(0, 217, 166, 0.14);
}

.project-panel[hidden] {
  display: none;
}

.project-panel.is-active {
  animation: projectPanelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes projectPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card,
.company-block {
  padding: 1.35rem 1.4rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.company-block {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.company-block::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(0, 217, 166, 0.12));
}

.company-block:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 217, 166, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.project-card__top {
  margin-bottom: 0.75rem;
}

.project-card__company {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.project-card h3,
.company-block h3 {
  color: var(--title);
  font-size: 1.08rem;
  line-height: 1.35;
}

.project-card__summary {
  color: var(--text);
  margin-bottom: 0.9rem;
}

.project-carousel {
  margin-bottom: 1rem;
}

.project-carousel__viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 18, 0.6);
}

.project-carousel--portrait .project-carousel__viewport {
  aspect-ratio: 4 / 5;
  max-width: 20rem;
  margin-inline: auto;
}

.project-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.85rem;
  background: rgba(7, 10, 18, 0.88);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.28s ease, transform 0.28s ease;
  cursor: zoom-in;
  pointer-events: none;
}

.project-carousel__slide--contain {
  object-fit: contain;
}

.project-carousel__slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.project-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.project-carousel__button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--title);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.project-carousel__button:hover {
  background: rgba(0, 217, 166, 0.12);
  border-color: rgba(0, 217, 166, 0.2);
  transform: translateY(-1px);
}

.project-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1;
}

.project-carousel__dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.project-carousel__dots span.is-active {
  background: var(--accent);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 217, 166, 0.08);
  border: 1px solid rgba(0, 217, 166, 0.12);
  color: #bfeee0;
  font-size: 0.76rem;
  font-weight: 600;
}

.project-detail {
  margin-top: 1.15rem;
  margin-bottom: 0.95rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-detail__label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.project-detail p:last-child {
  color: var(--text);
}

.company-projects__list {
  color: var(--text);
  padding-left: 0;
}

.company-block h3 {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.company-block__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1.05rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.company-block__count {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(0, 217, 166, 0.08);
  border: 1px solid rgba(0, 217, 166, 0.14);
  color: #bfeee0;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.company-projects__list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.8rem;
}

.company-project {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.company-project__title {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1rem 1rem 0.95rem;
  background: rgba(255, 255, 255, 0.025);
  color: var(--title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.company-project__body {
  padding: 1rem 1rem 0.95rem;
}

.company-project__body p {
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
}

.project-tags--compact {
  margin-bottom: 0;
}

.project-tags--compact span {
  font-size: 0.72rem;
  padding: 0.32rem 0.58rem;
}

.company-projects {
  gap: 1.1rem;
}

.company-block__header + .company-projects__list {
  margin-top: 0.05rem;
}

.company-block__header {
  align-items: baseline;
}

.company-block__count {
  align-self: flex-start;
}

.skills-grid {
  display: grid;
  gap: 1rem;
}

.skills-card {
  padding: 1.25rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.skills-card h3 {
  margin-bottom: 0.7rem;
}

.skill-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.6rem;
}

.skill-list__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.95rem;
}

.skill-list__item i {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--accent);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (min-width: 768px) {
  .timeline__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid .project-card:nth-child(5) {
    grid-column: 1 / -1;
  }

  .company-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 540px) {
  .company-block__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .company-project {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .company-project__title {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.85rem;
  }
}

@media screen and (min-width: 1024px) {
  .resume__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer__content {
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
  }
}

@media screen and (max-width: 767px) {
  .container {
    width: min(1120px, calc(100% - 2rem));
  }

  .header__content {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0.9rem 0;
  }

  .nav {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 6rem;
  }

  .hero__role {
    max-width: none;
  }

  .hero__photo {
    order: -1;
    justify-self: center;
    width: 132px;
  }

  .hero__identity {
    width: 100%;
    padding: 1.4rem 1.1rem;
    gap: 1.25rem;
  }

  .hero__contacts {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .footer__contacts {
    flex-direction: column;
    gap: 0.35rem;
  }

  .timeline::before {
    left: 0.45rem;
    transform: none;
  }

  .timeline__item,
  .timeline__item:nth-child(odd),
  .timeline__item:nth-child(even) {
    width: auto;
    justify-self: stretch;
    margin-left: 1.8rem;
    transform: translateY(38px);
  }

  .timeline__item::before,
  .timeline__item:nth-child(odd)::before,
  .timeline__item:nth-child(even)::before {
    left: -2.36rem;
    right: auto;
    top: 1.45rem;
  }

  .timeline__item:nth-child(odd).is-visible,
  .timeline__item:nth-child(even).is-visible {
    transform: translateY(0);
  }
}
