/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --bg:           #faf8f5;
  --surface:      #ffffff;
  --text:         #2a2420;
  --text-muted:   #8a7d78;
  --accent:       #b5846a;
  --accent-hover: #9a6d54;
  --accent-light: #f2e6dc;
  --border:       #e8ddd6;
  --nav-h:        68px;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(42, 36, 32, 0.08);
  --shadow-hover: 0 8px 32px rgba(42, 36, 32, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 200;
  transition: border-color 0.3s, box-shadow 0.3s;
}

nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(42, 36, 32, 0.06);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-deco-1 {
  width: 500px;
  height: 500px;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 40% 40%, var(--accent-light), transparent 70%);
  opacity: 0.7;
}

.hero-deco-2 {
  width: 300px;
  height: 300px;
  left: -80px;
  bottom: 10%;
  background: radial-gradient(circle, var(--accent-light), transparent 65%);
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.hero-sup {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(181, 132, 106, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(181, 132, 106, 0.45);
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  padding: 6rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: center;
}

.about-img-placeholder {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-photo {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
}

.placeholder-svg {
  position: absolute;
  width: 70%;
  height: 70%;
  opacity: 0.6;
}

.placeholder-text {
  position: relative;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

/* ============================================================
   WORKS
   ============================================================ */
#works {
  padding: 6rem 0;
  background: var(--surface);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.works-filter {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

/* Card */
.work-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.work-card.has-images {
  cursor: pointer;
}

.work-card.has-images:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.work-card.has-images:hover .card-img-inner img {
  transform: scale(1.06);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--accent-light);
}

.card-img-inner {
  width: 100%;
  height: 100%;
}

.card-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-light), #e8ddd6);
}

.card-no-image svg {
  opacity: 0.45;
}

.card-no-image span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 36, 32, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.work-card.has-images:hover .card-overlay {
  background: rgba(42, 36, 32, 0.2);
}

.card-overlay-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
}

.work-card.has-images:hover .card-overlay-icon {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

.card-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card photo count badge */
.card-count {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(20, 16, 14, 0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

/* ============================================================
   COMING SOON
   ============================================================ */
.coming-soon {
  padding: 5rem 0;
}

.coming-soon-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   LEVEL 2 NAV (within category)
   ============================================================ */
.works-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.works-nav h2 {
  margin-bottom: 0;
  flex: 1;
}

/* ============================================================
   DETAIL VIEW
   ============================================================ */
.works-detail {
  padding-bottom: 3rem;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.5rem 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-top: 0.5rem;
}

.detail-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.detail-title-wrap {
  flex: 1;
  min-width: 0;
}

.detail-title-wrap h2 {
  margin-bottom: 0;
}

.detail-count {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 0.75rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.detail-photo {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--accent-light);
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  display: block;
}

.detail-photo:hover img {
  transform: scale(1.07);
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .detail-header { gap: 1rem; }
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-light), transparent 65%);
  opacity: 0.4;
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
}

.contact-inner p {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 2.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.92);
  backdrop-filter: blur(4px);
}

.lb-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  width: 90vw;
  max-height: 90vh;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.lightbox.active .lb-content {
  transform: scale(1);
}

.lb-img-wrap {
  width: 100%;
  max-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 8px;
}

.lb-info {
  padding: 1.2rem 1.5rem;
  text-align: center;
  color: #fff;
}

.lb-info h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.lb-info p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  margin: 0 auto;
}

.lb-counter {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lb-close:hover { background: rgba(255,255,255,0.2); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.lb-nav:hover { background: rgba(255,255,255,0.18); }
.lb-prev { left: 1rem; padding-right: 2px; }
.lb-next { right: 1rem; padding-left: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Prevent hero decorations from causing horizontal scroll */
#hero { overflow: hidden; }

@media (max-width: 900px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img-placeholder { max-width: 320px; margin: 0 auto; }
  .about-photo { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 640px) {
  nav { padding: 0 1.25rem; }

  .nav-burger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(250, 248, 245, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 0.85rem 2rem;
    font-size: 0.85rem;
  }

  .nav-links a::after { display: none; }

  /* Filter buttons — smaller text so long labels fit on narrow screens */
  .filter-btn {
    font-size: 0.7rem;
    padding: 0.45rem 0.9rem;
    letter-spacing: 0.04em;
  }

  .works-grid { grid-template-columns: 1fr; }

  .container { padding: 0 1.25rem; }

  #about, #works, #contact { padding: 4rem 0; }

  /* Lightbox on mobile — hide nav arrows (swipe works), shrink image area */
  .lb-nav { display: none; }

  .lb-img-wrap { max-height: 52vh; }

  .lb-info { padding: 0.8rem 1rem; }
  .lb-info h3 { font-size: 1.1rem; }
  .lb-info p { font-size: 0.8rem; }
}

/* ============================================================
   LIKE BUTTON
   ============================================================ */
.detail-photo {
  position: relative;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-radius: 20px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--accent);
  font-weight: 500;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s;
  line-height: 1;
}

.like-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.06);
}

.like-btn .like-icon {
  flex-shrink: 0;
  transition: fill 0.2s, transform 0.2s;
}

.like-btn.liked .like-icon {
  fill: #b5846a;
}

.like-btn.heart-pop .like-icon {
  animation: heartPop 0.35s ease;
}

@keyframes heartPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Position in photo grid */
.detail-photo .like-btn {
  position: absolute;
  bottom: 7px;
  right: 7px;
  z-index: 2;
}

/* Lightbox meta row */
.lb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.lb-like {
  background: rgba(255, 255, 255, 0.12);
  color: #e8ddd6;
}

.lb-like:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}

.lb-like .like-icon {
  stroke: #e8ddd6;
}

.lb-like.liked .like-icon {
  stroke: #b5846a;
  fill: #b5846a;
}

.lb-meta .lb-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* In lightbox context lb-counter is light */
.lb-info .lb-meta .lb-counter {
  color: rgba(232, 221, 214, 0.6);
}
