/* Links page specific styles */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.links-container {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.profile-section {
  margin-bottom: 2rem;
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background-image: url("../images/hayley-pierce-profile-small.jpeg");
  background-image: image-set(
    url("../images/hayley-pierce-profile-small.webp") type("image/webp"),
    url("../images/hayley-pierce-profile-small.jpeg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  border: 3px solid var(--devon-sand);
}

.profile-name {
  margin-bottom: 0.5rem;
}

.profile-name img {
  height: auto;
  width: 90%;
  display: block;
  margin: 0 auto;
}

.profile-tagline {
  color: var(--fog-80);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  font-style: italic;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-item {
  display: block;
  background-color: rgba(224, 226, 224, 0.1);
  border: 1px solid var(--devon-sand-30);
  padding: 1.2rem;
  text-decoration: none;
  color: var(--fog);
  border-radius: 12px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  position: relative;
  will-change: transform;
}

.link-item:hover {
  background-color: rgba(193, 122, 95, 0.15);
  border-color: var(--devon-sand);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(193, 122, 95, 0.3);
}

.link-title {
  font-weight: 400;
  margin-bottom: 0.25rem;
  display: block;
}

.link-description {
  font-size: 0.9rem;
  color: var(--fog-60);
  font-style: italic;
}

.link-divider {
  width: 80px;
  height: 40px;
  margin: 0.5rem auto;
  opacity: 0.5;
  filter: invert(1) brightness(2);
}

.link-divider img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.back-to-site {
  margin-top: 3rem;
  display: inline-block;
  color: var(--devon-sand);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.back-to-site:hover {
  color: var(--fog);
}

/* Optimized Animation - using CSS containment and will-change */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-section,
.link-item,
.link-divider {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: calc(var(--animation-order, 0) * 0.05s);
  contain: layout style paint;
}

/* Set animation order via CSS custom properties for better performance */
.profile-section { --animation-order: 1; }
.links-list > :nth-child(1) { --animation-order: 2; }
.links-list > :nth-child(2) { --animation-order: 3; }
.links-list > :nth-child(3) { --animation-order: 4; }
.links-list > :nth-child(4) { --animation-order: 5; }
.links-list > :nth-child(5) { --animation-order: 6; }
.links-list > :nth-child(6) { --animation-order: 7; }
.links-list > :nth-child(7) { --animation-order: 8; }
.links-list > :nth-child(8) { --animation-order: 9; }
.links-list > :nth-child(9) { --animation-order: 10; }
.links-list > :nth-child(10) { --animation-order: 11; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .profile-section,
  .link-item,
  .link-divider {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .profile-name {
    font-size: 1.75rem;
  }

  .link-item {
    padding: 1rem;
    font-size: 1rem;
  }
}
