/* Main stylesheet: Dark theme with gold accents, shared across all pages */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #050a0c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Background image layer - uses transform for smooth GPU animation */
body::after {
  content: '';
  position: fixed;
  inset: -10%;
  background:
    linear-gradient(180deg, rgba(5, 15, 20, 0.7) 0%, rgba(10, 25, 30, 0.75) 100%),
    url('img/pichu.jpg') center/cover no-repeat;
  z-index: -2;
  transform: scale(1.15);
  animation: backgroundReveal 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform;
}

@keyframes backgroundReveal {
  0% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* Primary mist layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(5, 10, 12, 0.7) 0%, rgba(5, 10, 12, 0.95) 100%);
  pointer-events: none;
  z-index: 0;
  animation: mistClear 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: opacity;
}

@keyframes mistClear {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

body > * {
  position: relative;
  z-index: 1;
}

body.page-standard {
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

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

.back-link {
  display: inline-block;
  color: #d4a574;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.back-link:hover {
  color: #e8c49a;
  text-shadow: 0 0 12px rgba(212, 165, 116, 0.5);
}

.profile {
  margin-bottom: 2.5rem;
}

.profile h1,
.profile .tagline {
  animation: contentRise 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.4s both;
  will-change: transform, opacity;
}

@keyframes contentRise {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-small {
  margin-bottom: 1.5rem;
}

.avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 2px solid rgba(212, 165, 116, 0.4);
  box-shadow:
    0 0 30px rgba(212, 165, 116, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.5);
  animation: contentRise 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.4s both;
  will-change: transform, opacity;
}

h1 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.tagline {
  color: #d4a574;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: contentRise 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.8s both;
  will-change: transform, opacity;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: rgba(20, 20, 25, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.link-card:hover {
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.1);
  transform: translateY(-2px);
}

.link-card:focus-visible {
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.6);
  box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.35);
  transform: translateY(-2px);
  outline: none;
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #c9a67a;
}

.link-card:hover .link-icon {
  color: #e8c49a;
}

.icon-airbnb {
  color: #c9a67a;
}

.link-card:hover .icon-airbnb {
  color: #e8c49a;
}

.link-card-secondary {
  background: rgba(20, 20, 25, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

.link-card-secondary:hover {
  background: rgba(212, 165, 116, 0.08);
}

.badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: rgba(212, 165, 116, 0.2);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 4px;
  color: #d4a574;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.container-wide {
  max-width: 640px;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #d4a574;
  margin-bottom: 1.25rem;
  text-align: left;
}

.blog-section {
  text-align: left;
}

.blog-section.editorial {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(15, 18, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.blog-section.editorial .section-title {
  margin-bottom: 1.5rem;
}

.blog-section.editorial .blog-post {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 0;
  margin-bottom: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
}

.blog-section.editorial .blog-post:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.blog-section.editorial .post-date {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #b59b7b;
}

.blog-section.editorial .post-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.blog-section.editorial .post-excerpt {
  color: #c4c4c4;
  line-height: 1.7;
}

.blog-post {
  background: rgba(20, 20, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.post-date {
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0.5rem 0;
  letter-spacing: 0.02em;
}

.post-excerpt {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.6;
}

.password-section {
  background: rgba(20, 20, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2rem;
  backdrop-filter: blur(8px);
}

.password-message {
  color: #aaa;
  margin-bottom: 1.25rem;
}

.password-form {
  display: flex;
  gap: 0.5rem;
}

.password-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
}

.password-input:focus {
  outline: none;
  border-color: rgba(212, 165, 116, 0.5);
}

.password-input::placeholder {
  color: #666;
}

.password-submit {
  padding: 0.75rem 1.25rem;
  background: rgba(212, 165, 116, 0.2);
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: 6px;
  color: #d4a574;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.password-submit:hover {
  background: rgba(212, 165, 116, 0.3);
  border-color: rgba(212, 165, 116, 0.6);
}

.error-message {
  color: #e57373;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.album-description {
  color: #aaa;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.photo-content {
  text-align: left;
}

.family-photo-link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  text-decoration: none;
}

.family-photo-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.family-photo-link:hover .family-photo-preview {
  transform: scale(1.05);
}

.family-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.family-photo-text {
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.photo-year {
  margin-bottom: 2.5rem;
}

.year-label {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #d4a574;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.photo-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.photo-grid img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

a:focus-visible:not(.link-card),
button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(212, 165, 116, 0.8);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  body.page-standard {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
    letter-spacing: 0.06em;
  }

  .avatar {
    width: 110px;
    height: 110px;
  }

  .tagline {
    letter-spacing: 0.08em;
  }

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

  .photo-grid img {
    height: 100px;
  }
}

@media (max-width: 600px) {
  .blog-section.editorial .blog-post {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  body::before,
  .avatar,
  .profile h1,
  .profile .tagline,
  .links {
    animation: none;
  }

  body::after {
    transform: scale(1);
  }

  body::before {
    opacity: 0.4;
  }
}
