body, html {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  color: #5c4033;
}

#background-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

#background-audio {
  display: none;
}

.content-block {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.7);
  padding: 20px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  max-width: 80%;
  width: 90%;
}

.section {
  display: none;
}

.section.visible {
  display: block;
}

.avatar {
  border-radius: 50%;
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
  border: 4px solid #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

h1, h2 {
  margin: 10px 0;
}

.photo-gallery {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.photo-card {
  width: 250px;
  height: 300px;
  perspective: 1000px;
}

.photo-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.photo-card:hover .photo-card-inner {
  transform: rotateY(180deg);
}

.photo-card-front,
.photo-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card-back {
  background: #ff7043;
  color: #fff;
  font-size: 1.4em;
  transform: rotateY(180deg);
}

.timeline {
  position: relative;
  margin: 40px 0;
  padding: 0 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff7043;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin: 20px 0;
  width: 50%;
  padding: 10px 20px;
  box-sizing: border-box;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-dot {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #ff7043;
  border-radius: 50%;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.timeline-content h3 {
  margin: 0 0 5px;
}

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

.yaml-section {
  background: #2d2d2d;
  color: #f8f8f2;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  overflow-x: auto;
}

.yaml-section .key {
  color: #ffb86c;
}

.yaml-section .value {
  color: #8be9fd;
}

.yaml-section .string {
  color: #50fa7b;
}

button {
  margin-top: 20px;
  background: #ff7043;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s ease;
}

button:hover {
  background: #d84315;
}

/* ✅ Responsive for tablets and below */
@media (max-width: 768px) {
  body, html {
    overflow: auto;
  }

  .content-block {
    position: static; /* Let it flow naturally */
    transform: none;
    margin: 20px auto;
    width: 99%;
    padding: 15px 20px;
  }

  .photo-card {
    width: 100%; /* Full width of content-block */
    height: 500px; /* Consistent height for visibility */
  }

  .photo-card-front,
  .photo-card-back {
    height: 500px; /* Match the container’s height */
  }

  .photo-gallery {
    gap: 20px;
    flex-direction: column;
    align-items: center;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: calc(100% - 40px);
    left: 20px !important;
    margin-left: 10px;
  }

  .timeline-content {
    padding: 20px;
  }

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

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.3em;
  }

  .photo-card-back {
    font-size: 1.2em;
  }
}

/* ✅ Responsive for small mobile screens */
@media (max-width: 480px) {
  .content-block {
    width: 99%;
    margin: 15px auto;
    padding: 10px 15px;
  }

  .photo-card {
    width: 100%;
    height: 500px; /* Slightly smaller for tiny screens */
  }

  .photo-card-front,
  .photo-card-back {
    height: 500px; /* Maintain height consistency */
  }

  .photo-gallery {
    gap: 15px;
  }

  .timeline-item {
    width: calc(100% - 20px);
    left: 10px !important;
    margin-left: 10px;
  }

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

  h1 {
    font-size: 1.3em;
  }

  h2 {
    font-size: 1.1em;
  }

  .photo-card-back {
    font-size: 1em;
  }
}
