@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600&display=swap');

:root {
  --color-ivory: #FAF9F6;
  --color-gray: #8B8B8B;
  --color-charcoal: #2C2C2C;
  --color-sand: #C9B8A3;
  --color-terracotta: #D4A5A5;
  --color-mint: #9FCDCD;
  --color-blue: #7B93A8;
}

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

body {
  font-family: 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  line-height: 1.8;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

.fade-in {
  animation: fadeIn 0.8s ease-in;
}

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

.image-hover {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  cursor: pointer;
}

.image-hover:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

.text-hover {
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(10px);
}

.parent-hover:hover .text-hover {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  transition: opacity 0.4s ease;
}

.modal-content {
  animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scroll-smooth {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.scroll-smooth::-webkit-scrollbar {
  height: 4px;
}

.scroll-smooth::-webkit-scrollbar-track {
  background: var(--color-ivory);
}

.scroll-smooth::-webkit-scrollbar-thumb {
  background: var(--color-gray);
  border-radius: 2px;
}

.scroll-smooth::-webkit-scrollbar-thumb:hover {
  background: var(--color-charcoal);
}

.masonry-grid {
  column-count: 3;
  column-gap: 2rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

@media (max-width: 1024px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .masonry-grid {
    column-count: 1;
  }
}

.hero-slide {
  animation: slideChange 1.2s ease-in-out;
}

@keyframes slideChange {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.timeline-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.timeline-section.visible {
  opacity: 1;
  transform: translateY(0);
}

nav a {
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-charcoal);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-sand);
  border-top-color: var(--color-charcoal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.object-cover {
  object-fit: cover;
  object-position: center;
}

.aspect-portrait {
  aspect-ratio: 3/4;
}

.aspect-landscape {
  aspect-ratio: 16/9;
}

.aspect-square {
  aspect-ratio: 1/1;
}