/* ===== Scroll Fade-in/out Animation ===== */
.work-card, .category-card, .contact-item, .gallery-thumb {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* ===== Topbar Navigation ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brandLogo img {
  height: 50px;
  transition: opacity 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  filter: contrast(1.1) brightness(1.05);
}

.brandLogo:hover img {
  opacity: 0.7;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

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

/* ===== Back Button ===== */
.back-button {
  position: fixed;
  top: 90px;
  left: 40px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.back-button:hover {
  opacity: 1;
  transform: translateX(-5px);
}

.back-button svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
}

@media (max-width: 768px) {
  .back-button {
    left: 20px;
    top: 80px;
  }
}

/* ===== Container ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 40px 60px;
}

/* ===== Page Title ===== */
h1 {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 40px;
  
}

/* ===== Category Selection ===== */
.category-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 60px;
  max-width: 1000px;
}

.category-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.4s ease;
}

.category-card:hover {
  transform: scale(1.02);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-title {
  position: absolute;
  bottom: 40px;
  left: 40px;
  z-index: 2;
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== Works Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Photo grid - narrower columns for vertical photos */
.grid.photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.work-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  border-radius: 6px;
  background: #1a1a1a;
}

.work-card.photo-card {
  aspect-ratio: 9 / 16;
}

.work-card.design-card {
  aspect-ratio: 1 / 1;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
  image-rendering: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.work-card:hover img {
  transform: scale(1.08);
  opacity: 0.4;
}

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(0, 0, 0, 0.3);
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.work-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 8px;
  
}

.work-type {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.7;
  text-transform: uppercase;
}

/* ===== Work Detail Page ===== */
.work-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 40px 60px;
}

.work-header {
  margin-bottom: 40px;
}

.work-header h1 {
  font-size: 42px;
  font-weight: 300;
  margin-bottom: 10px;
}

.work-meta {
  display: flex;
  gap: 30px;
  font-size: 14px;
  opacity: 0.6;
  letter-spacing: 1px;
}

.work-media {
  width: 100%;
  margin-bottom: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.work-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.work-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Instagram Embed */
.instagram-embed {
  max-width: 540px;
  margin: 0 auto;
}

.instagram-embed iframe {
  width: 100%;
  min-height: 800px;
  border: none;
  border-radius: 8px;
  background: #000;
}

@media (max-width: 768px) {
  .instagram-embed {
    max-width: 100%;
  }
  
  .instagram-embed iframe {
    min-height: 700px;
  }
}

.work-photos {
  display: grid;
  gap: 20px;
}

.work-photos img {
  width: 100%;
  border-radius: 6px;
}

/* Photo Gallery Thumbnails */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
  image-rendering: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

}

.work-credits {
  margin: 60px 0;
  padding: 40px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-credits h2 {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.credits-list {
  display: grid;
  gap: 12px;
}

.credit-item {
  font-size: 15px;
  opacity: 0.8;
  line-height: 1.8;
}

/* ===== Work Navigation ===== */
.work-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 80px;
}

.nav-project {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.nav-project:hover {
  transform: translateY(-5px);
}

.nav-project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.nav-project:hover img {
  transform: scale(1.1);
}

.nav-project::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.9) 100%);
  z-index: 1;
}

.nav-label {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.6;
  text-transform: uppercase;
}

.nav-title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 1px;
}

/* ===== Contact Page ===== */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 40px 60px;
}

.contact-intro {
  text-align: center;
  margin-bottom: 40px;
}

.contact-intro h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.contact-intro p {
  font-size: 18px;
  opacity: 0.7;
  line-height: 1.8;
}

.contact-methods {
  display: grid;
  gap: 30px;
  margin-top: 60px;
}

.contact-item {
  padding: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.contact-label {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.5;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.contact-value {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 1px;
}

.contact-value a {
  transition: opacity 0.3s ease;
}

.contact-value a:hover {
  opacity: 0.6;
}

/* Copy Button */
.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.copy-btn:active {
  transform: translateY(0);
}

/* Copy Notification */
.copy-notification {
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%) translateX(20px);
  background: #4CAF50;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.copy-notification.show {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .topbar {
    padding: 15px 20px;
  }
  
  .brandLogo img {
    height: 32px;
  }
  
  .nav {
    gap: 15px;
  }
  
  .nav a {
    font-size: 12px;
  }
  
  .container {
    padding: 100px 20px 40px;
  }
  
  h1 {
    font-size: 32px;
  }
  
  .category-selector {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .category-card {
    height: 300px;
  }
  
  .category-title {
    font-size: 28px;
    bottom: 30px;
    left: 30px;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .work-detail {
    padding: 100px 20px 40px;
  }
  
  .work-header h1 {
    font-size: 28px;
  }
  
  .work-nav {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .nav-project {
    height: 250px;
  }
  
  .contact-container {
    padding: 100px 20px 40px;
  }
  
  .contact-intro h1 {
    font-size: 32px;
  }
  
  .contact-value {
    font-size: 18px;
  }
  
  .copy-btn {
    font-size: 11px;
    padding: 6px 12px;
  }
  
  .copy-notification {
    right: 20px;
    font-size: 11px;
  }
}

/* ===== Loading Animation ===== */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.5;
}

/* ===== Smooth Scroll ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

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

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 10001;
  transition: opacity 0.3s ease;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: white;
  cursor: pointer;
  padding: 20px;
  user-select: none;
  transition: opacity 0.3s ease;
  z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.7;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

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

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 35px;
    padding: 10px;
  }
  
  .lightbox-close {
    font-size: 30px;
    top: 20px;
    right: 20px;
  }
  
  #lightbox-img {
    max-width: 95%;
    max-height: 85vh;
  }
  
  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .gallery-thumb {
    height: 250px;
  }
}
