@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

* { 
  box-sizing: border-box; 
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: #1a1a1a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.hero {
  padding: 60px 20px 40px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #e8e8e8;
}

.hero-card {
  background: white;
  border-radius: 16px;
  padding: 50px;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  animation: slideDown 0.6s ease-out;
}

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

.hero-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  margin: 0 0 12px 0;
  letter-spacing: -1.5px;
  color: #000;
}

.tagline {
  font-size: 15px;
  color: #555;
  margin: 0 0 20px 0;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.about {
  font-size: 16px;
  color: #666;
  margin: 0 0 28px 0;
  line-height: 1.8;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.linkedin {
  display: inline-block;
  padding: 12px 28px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #000;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.linkedin:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Gallery */
#gallery {
  padding: 40px 16px;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  grid-auto-rows: auto;
}

@media (min-width: 480px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    padding: 30px 12px;
  }
}

@media (min-width: 768px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 40px 16px;
  }
}

@media (min-width: 1024px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    padding: 40px 20px;
  }
}

@media (min-width: 1280px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 40px 24px;
  }
}

/* Photo Card */
.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  background: #f5f5f5;
  aspect-ratio: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInScale 0.5s ease-out backwards;
}

.photo-card:nth-child(1) { animation-delay: 0.05s; }
.photo-card:nth-child(2) { animation-delay: 0.1s; }
.photo-card:nth-child(3) { animation-delay: 0.15s; }
.photo-card:nth-child(4) { animation-delay: 0.2s; }
.photo-card:nth-child(n+5) { animation-delay: 0.25s; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.photo-card:active {
  transform: translateY(-2px);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-card:hover img {
  transform: scale(1.03);
}

/* Loader */
#loader {
  text-align: center;
  padding: 50px 24px;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Viewer Modal */
.viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.viewer-modal.active {
  display: flex;
  opacity: 1;
}

.viewer-content {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoomInModal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 40px 20px;
}

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

#viewer-image {
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Desktop - Large screens */
@media (min-width: 1920px) {
  #viewer-image {
    max-width: 90vw;
    max-height: 85vh;
  }

  .viewer-content {
    padding: 60px 40px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  #viewer-image {
    max-width: 95vw;
    max-height: 80vh;
  }

  .viewer-content {
    padding: 30px 15px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  #viewer-image {
    max-width: 96vw;
    max-height: 75vh;
  }

  .viewer-content {
    padding: 20px 10px;
  }

  .viewer-close {
    width: 44px;
    height: 44px;
    font-size: 24px;
    top: 16px;
    right: 16px;
  }
}

/* Small Mobile */
@media (max-width: 600px) {
  #viewer-image {
    max-width: 98vw;
    max-height: 70vh;
  }

  .viewer-content {
    padding: 15px 8px;
  }

  .viewer-close {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 12px;
    right: 12px;
  }

  .viewer-close {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 12px;
    right: 12px;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  #viewer-image {
    max-width: 99vw;
    max-height: 65vh;
  }

  .viewer-content {
    padding: 12px 6px;
  }

  .viewer-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
    top: 10px;
    right: 10px;
  }
}

.viewer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 300;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.viewer-close:active {
  transform: rotate(90deg) scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 40px 16px 30px;
  }

  .hero-card {
    padding: 35px 28px;
    border-radius: 14px;
  }

  .hero-card h1 {
    font-size: 40px;
  }

  .tagline {
    font-size: 14px;
  }

  .about {
    font-size: 15px;
  }

  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 30px 12px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 30px 12px 20px;
  }

  .hero-card {
    padding: 25px 20px;
    border-radius: 12px;
  }

  .hero-card h1 {
    font-size: 32px;
  }

  .tagline {
    font-size: 12px;
  }

  .about {
    font-size: 14px;
  }

  .linkedin {
    font-size: 12px;
    padding: 10px 20px;
  }

  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 20px 10px;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 4px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}