:root {
  --color-primary: #7d559d;
  --color-primary-dark: #6a4687;
  --color-accent: #d6b0ff;
  --color-light: #f3eaff;
  --color-bg: #ada2c8e2;
  --color-text: #333333;
  --color-muted: #666666;
  --color-dark: #4a2d63;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--color-text);
}

.container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.container-main {
  flex-grow: 1;
  background-color: var(--color-bg);
  padding: 0 100px;
}

footer {
  text-align: center;
  padding-top: 15px;
  height: 50px;
  background-color: var(--color-accent);
}

.container-nav {
  display: flex;
  flex-direction: row;
  justify-content: end;
  background-color: var(--color-primary);
  padding: 30px 100px;
  list-style: none;
}

.container-nav li {
  text-align: center;
  background-color: var(--color-accent);
  margin-right: 5px;
  border-radius: 12px;
}

.container-nav li:hover {
  background-color: aliceblue;
}

.container-nav .link {
  display: block;
  padding: 10px;
  color: black;
  text-decoration: none;
}

.menu-toggle {
  display: none;
}

.has-submenu {
  position: relative;
}

.submenu-toggle {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

.has-submenu > .link::after {
  content: "▾";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.3s ease;
}

.has-submenu:hover > .link::after,
.has-submenu:focus-within > .link::after {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  min-width: 100%;
  padding: 6px;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  list-style: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.submenu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.submenu li {
  margin-right: 0;
  border-radius: 8px;
  background-color: transparent;
  text-align: left;
}

.submenu li:hover {
  background-color: var(--color-light);
}

.submenu .link {
  white-space: nowrap;
}

.container-about {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-card,
.container-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 700px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin: 20px;
}

.profile-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
}

.profile-avatar img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-light);
}

.profile-work {
  padding: 10px 0 0 0;
}

.profile-work img {
  width: 300px;
  height: 250px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--color-light);
}

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 40px;
}

.carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 664px;
}

.carousel-track {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  scroll-snap-align: start;
}

.carousel-btn {
  grid-row: 1;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--color-primary);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-btn:hover {
  background-color: var(--color-accent);
  transform: scale(1.1);
}

.carousel-prev {
  grid-column: 1;
}

.carousel-next {
  grid-column: 3;
}

.carousel-dots {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-dot.is-active {
  background-color: var(--color-primary);
  transform: scale(1.3);
}

.profile {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.profile-position {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 600;
  margin: 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-bio {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-muted);
  margin: 0 0 20px 0;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px 0;
  list-style: none;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.work-words {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: auto 0;
  list-style: none;
}

.work-words li {
  padding: 6px 16px;
  border-radius: 999px;
  background-color: var(--color-light);
  color: var(--color-primary);
  font-weight: 600;
  transition: transform 0.3s ease;
}

.work-words li:hover {
  transform: scale(1.08);
}

.card-note {
  margin: auto 0;
  padding: 16px 12px;
  border-radius: 12px;
  background-color: var(--color-light);
  color: var(--color-dark);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

.card-note strong {
  display: block;
  margin-top: 4px;
  color: var(--color-primary);
  font-size: 1rem;
}

.container-achievements {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.container-achievements .achievements {
  border-radius: 32px;
  padding: 32px 28px;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-light);
  margin: 20px 0 20px 20px;
}

.achievements a {
  display: block;
  cursor: zoom-in;
}

.achievements figcaption {
  max-width: 400px;
  margin-top: 16px;
  color: var(--color-dark);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.achievements figcaption strong,
.lightbox-caption strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
}

.lightbox {
  margin: auto;
  border: none;
  background: none;
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pop-in 0.3s ease;
}

.lightbox::backdrop {
  background-color: rgba(40, 20, 60, 0.85);
  animation: fade-in 0.3s ease;
}

.lightbox-close {
  align-self: flex-end;
  border: none;
  background: none;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
}

.lightbox-caption {
  margin-top: 12px;
  color: #ffffff;
  text-align: center;
}

.container-feedback {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.feedback-intro {
  flex: 0 1 320px;
}

.feedback-card {
  flex: 0 1 480px;
}

.feedback-form {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--color-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  padding: 10px 12px;
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  background-color: var(--color-light);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-accent);
}

.form-button {
  align-self: center;
  margin-top: 6px;
  padding: 10px 28px;
  border: none;
  border-radius: 12px;
  background-color: var(--color-primary);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.container-info {
  margin: 10px;
}

.form-button:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.container-info {
  display: flex;
  justify-content: center;
}

.info-card {
  flex: 0 1 520px;
  gap: 12px;
}

.card-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  object-fit: cover;
}

.info-links {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.info-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  background-color: var(--color-light);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.info-links a:hover {
  background-color: var(--color-accent);
  transform: translateX(4px);
}

.info-domain {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card,
.container-card {
  animation: fade-up 0.6s ease backwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container-card:nth-child(2) {
  animation-delay: 0.15s;
}

.container-card:nth-child(3) {
  animation-delay: 0.3s;
}

.profile-card:hover,
.container-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.badge,
.work-words li,
.card-note {
  animation: pop-in 0.4s ease backwards;
}

.card-note {
  animation-delay: 0.55s;
}

.badge:nth-child(1) {
  animation-delay: 0.5s;
}

.badge:nth-child(2) {
  animation-delay: 0.65s;
}

.work-words li:nth-child(1) {
  animation-delay: 0.7s;
}

.work-words li:nth-child(2) {
  animation-delay: 0.85s;
}

.work-words li:nth-child(3) {
  animation-delay: 1s;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1100px) {
  .container-nav {
    padding: 24px;
  }

  .container-main {
    padding: 0 24px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background-color: var(--color-primary);
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    align-self: flex-end;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background-color: var(--color-accent);
    cursor: pointer;
  }

  .menu-toggle span {
    height: 3px;
    border-radius: 2px;
    background-color: var(--color-dark);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .is-open .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .is-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .is-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .container-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0 4px;
  }

  .is-open .container-nav {
    display: flex;
    animation: slide-down 0.3s ease;
  }

  .container-nav li {
    margin-right: 0;
  }

  .container-nav .link {
    padding: 12px;
  }

  .has-submenu > .link::after {
    content: none;
  }

  .submenu {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px 8px;
    background: none;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .submenu::before {
    content: none;
  }

  .submenu li {
    background-color: var(--color-light);
    text-align: center;
  }

  .container-main {
    padding: 4px 16px;
  }

  .container-about,
  .container-feedback {
    flex-direction: column;
  }

  .profile-card,
  .container-card {
    max-width: none;
    margin: 12px 0;
    gap: 12px;
  }

  .container-card .profile {
    text-align: center;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar img {
    width: 200px;
    height: 200px;
  }
  .profile-work img {
    width: 200px;
    height: 200px;
  }

  .profile-badges {
    justify-content: center;
  }

  .feedback-intro,
  .feedback-card {
    flex: none;
  }

  .carousel {
    gap: 6px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }

  .info-card {
    flex: 1 1 100%;
  }

  .form-field input,
  .form-field textarea {
    font-size: 1rem;
  }

  .container-achievements .achievements {
    width: 100%;
    margin: 12px 0;
    padding: 16px;
  }

  .achievements img {
    width: 100%;
    height: auto;
  }

  .achievements figcaption {
    max-width: none;
  }
}
