.home-header,
.home-main,
.home-footer {
  width: min(880px, calc(100% - 96px));
  margin: 0 auto;
}

.home-header {
  padding: 34px 0 0;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  align-items: center;
  gap: clamp(36px, 7vw, 72px);
  padding: 96px 0 54px;
  border-bottom: 1px solid var(--line);
}

.home-intro h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: 0;
}

.home-intro p {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.profile-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface);
  cursor: default;
  isolation: isolate;
}

.profile-avatar:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

.profile-avatar-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-avatar-glasses {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  color: #050505;
  pointer-events: none;
  transform-origin: 67% 51%;
  transition:
    opacity 240ms ease,
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-avatar-glint,
.profile-avatar-sparkle {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.profile-avatar-glint {
  animation: profile-avatar-lens-sweep 7s 1.2s infinite ease-in-out;
}

.profile-avatar-sparkle {
  animation: profile-avatar-sparkle-pop 7s 1.2s infinite ease-in-out;
}

.profile-avatar:hover .profile-avatar-glasses,
.profile-avatar:focus .profile-avatar-glasses {
  opacity: 0;
  transform: translate(8px, 28px) rotate(9deg) scale(0.98);
}

@keyframes profile-avatar-lens-sweep {
  0%,
  12% {
    opacity: 0;
    transform: translateX(-190px) rotate(18deg);
  }

  15% {
    opacity: 0.85;
  }

  24% {
    opacity: 0.85;
    transform: translateX(390px) rotate(18deg);
  }

  25%,
  100% {
    opacity: 0;
    transform: translateX(390px) rotate(18deg);
  }
}

@keyframes profile-avatar-sparkle-pop {
  0%,
  26%,
  39%,
  100% {
    opacity: 0;
    transform: scale(0.15) rotate(-12deg);
  }

  29% {
    opacity: 1;
    transform: scale(1.12) rotate(5deg);
  }

  33% {
    opacity: 1;
    transform: scale(0.86) rotate(0deg);
  }

  36% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.home-list-section {
  padding: 42px 0 34px;
}

.home-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.home-section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.home-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.home-item-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.home-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 142px;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.home-item-type {
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-item-main h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.home-item-main p {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.home-item-meta {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

a.home-item:hover h3 {
  color: var(--accent-strong);
}

.experience-list {
  border-top: 1px solid var(--line);
}

.experience-entry {
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--line);
}

.experience-entry-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.experience-entry-heading h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.experience-entry-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.experience-entry > p {
  max-width: 700px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.home-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-top: 34px;
  padding: 30px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-contact p {
  margin: 0 0 3px;
  color: var(--ink);
}

.footer-contact a {
  color: var(--accent-strong);
  font-weight: 680;
}

.footer-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  .home-header,
  .home-main,
  .home-footer {
    width: min(100% - 40px, 880px);
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 64px 0 44px;
  }

  .profile-avatar {
    width: 156px;
    justify-self: start;
  }

  .home-section-heading,
  .experience-entry-heading,
  .home-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-footer,
  .experience-entry-heading {
    gap: 8px;
  }

  .home-section-heading {
    gap: 6px;
  }

  .home-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-item-meta {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-avatar-glasses {
    transition: none;
  }

  .profile-avatar-glint,
  .profile-avatar-sparkle {
    animation: none;
  }
}
