/* ============================================================
   Henry Pai — styles.css
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --text: #1A1A1A;
  --text-sec: #6B6B6B;
  --accent: #C9A96E;
  --border: #E8E8E8;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-h: 68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: var(--sans); }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  z-index: 900;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  gap: 3px;
}
.nav-logo img {
  height: 51px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-logo:hover img { opacity: 1; }
.nav-logo-name {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: 260px; height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 1000;
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-drawer.open { right: 0; }
.nav-drawer a {
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color 0.2s;
}
.nav-drawer a:hover { color: var(--accent); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

.drawer-close {
  position: absolute;
  top: 22px; right: 22px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-sec);
  transition: color 0.2s;
  padding: 4px;
}
.drawer-close:hover { color: var(--text); }

/* ---- Layout ---- */
main { padding-top: var(--nav-h); }

/* ---- Home Banner ---- */
.home-banner {
  position: relative;
  width: 100%;
  height: 52vh;
  min-height: 320px;
  overflow: hidden;
}
.home-banner-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.home-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.home-banner-title {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 88px);
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-bottom: 14px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.home-banner-sub {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ---- Home Category Boxes ---- */
.home-cats {
  display: flex;
  height: 48vh;
  min-height: 300px;
}
.home-cat {
  position: relative;
  flex: 1;
  overflow: hidden;
  text-decoration: none;
  display: block;
}
.home-cat img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.home-cat:hover img { transform: scale(1.07); }
.home-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 28px 20px;
  text-align: center;
  transition: background 0.35s;
}
.home-cat:hover .home-cat-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%);
}
.home-cat-name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 6px;
}
.home-cat-sub {
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
}

/* thin vertical dividers between boxes */
.home-cat + .home-cat { border-left: 1px solid rgba(255,255,255,0.15); }

/* ---- Hero ---- */
.hero {
  height: calc(100vh - var(--nav-h));
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.48) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(52px, 9vw, 130px);
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.07em;
  line-height: 1.05;
  margin-bottom: 18px;
  text-shadow: 0 2px 32px rgba(0,0,0,0.18);
}

.hero-sub {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 52px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 13px 36px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.9);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-accent:hover { background: #b8924d; border-color: #b8924d; }

/* ---- Page Header ---- */
.page-header {
  padding: 68px 52px 44px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.page-sub {
  font-size: 13px;
  color: var(--text-sec);
  letter-spacing: 0.03em;
}

/* ---- Gallery Filters ---- */
.gallery-filters {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 52px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-sec);
  white-space: nowrap;
}
.filter-select {
  -webkit-appearance: none;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B6B6B'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  padding: 8px 32px 8px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  min-width: 200px;
  transition: border-color 0.2s;
}
.filter-select:focus { outline: none; border-color: var(--accent); }
.gallery-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-sec);
  white-space: nowrap;
}

/* ---- Grouped Gallery ---- */
.gallery-groups {
  padding: 0 52px 80px;
}

.gallery-group {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}
.gallery-group:last-child { border-bottom: none; }

.gallery-group-heading {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 24px;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-row-item {
  cursor: pointer;
  position: relative;
}
.gallery-row-item .img-wrap {
  overflow: hidden;
  height: 280px;
}
.gallery-row-item .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-row-item:hover .img-wrap img { transform: scale(1.05); }

/* ---- Home Category Cards ---- */
.home-categories {
  padding: 80px 52px;
  border-top: 1px solid var(--border);
}
.home-categories-heading {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 36px;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.category-card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  text-decoration: none;
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card:hover img { transform: scale(1.06); }
.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.05) 55%);
  display: flex;
  align-items: flex-end;
  padding: 22px 24px;
  transition: background 0.3s;
}
.category-card:hover .category-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 55%);
}
.category-card-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.02em;
}

/* ---- Masonry Grid ---- */
.masonry {
  column-count: 3;
  column-gap: 0;
  padding: 16px 40px;
}
.masonry-item {
  break-inside: avoid;
  padding: 10px;
  cursor: pointer;
}
.masonry-item.hidden { display: none; }

.img-wrap {
  overflow: hidden;
  background: var(--border);
  position: relative;
}
.img-num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 8px;
  z-index: 10;
  pointer-events: none;
}
.img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.masonry-item:hover .img-wrap img { transform: scale(1.05); }

.masonry-caption {
  padding: 10px 2px 4px;
}
.cap-series {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}
.cap-medium {
  font-size: 11px;
  color: var(--text-sec);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--text-sec);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lb-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(86vw, 1100px);
  max-height: 90vh;
  padding: 0 64px;
}

#lb-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.lb-caption {
  margin-top: 20px;
  text-align: center;
}
.lb-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  color: #fff;
}
.lb-medium {
  font-size: 11px;
  color: rgba(255,255,255,0.48);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 5px;
}

.lb-close {
  position: fixed;
  top: 20px; right: 28px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
  padding: 8px;
}
.lb-close:hover { color: #fff; }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.04);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 36px;
  cursor: pointer;
  padding: 24px 18px;
  transition: all 0.2s;
  line-height: 1;
}
.lb-nav:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.lb-prev { left: 0; }
.lb-next { right: 0; }

/* ---- About ---- */
.about-bio-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 40px 64px;
  text-align: center;
}

.about-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 32px;
}

.about-intro {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 36px;
}

.about-body {
  font-size: 15px;
  line-height: 1.88;
  color: var(--text);
  text-align: left;
}
.about-body p { margin-bottom: 22px; }
.about-body p:last-child { margin-bottom: 0; }

.about-divider {
  width: 36px;
  height: 1px;
  background: var(--accent);
  margin: 44px auto;
}

.about-commission {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.7;
}
.about-commission a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,169,110,0.4);
  transition: border-color 0.2s;
}
.about-commission a:hover { border-color: var(--accent); }

.sig-wrap { margin-top: 40px; display: flex; justify-content: center; }
.sig-img { height: 38px; width: auto; opacity: 0.65; }

.about-portrait-section {
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 600px;
}
.about-portrait-section img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ---- About Works Grid ---- */
.about-works {
  border-top: 1px solid var(--border);
  padding: 72px 52px 80px;
}
.about-works-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.about-works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.about-work-item {
  overflow: hidden;
  background: var(--border);
}
.about-work-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.about-work-item:hover img { transform: scale(1.04); }

@media (max-width: 960px) {
  .about-works { padding: 52px 28px 60px; }
  .about-works-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .about-works-grid { grid-template-columns: repeat(2, 1fr); }
  .about-work-item img { height: 160px; }
}

/* ---- Contact ---- */
.contact-section {
  padding: 80px 52px;
  max-width: 760px;
  margin: 0 auto;
}
.contact-head {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.contact-desc {
  font-size: 14px;
  color: var(--text-sec);
  margin-bottom: 52px;
  line-height: 1.75;
  max-width: 480px;
}

.form-row { margin-bottom: 28px; }
.form-lbl {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-sec);
  margin-bottom: 10px;
}
.form-field {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}
.form-field::placeholder { color: var(--text-sec); opacity: 0.6; }
.form-field:focus { outline: none; border-bottom-color: var(--text); }
textarea.form-field { resize: none; height: 130px; line-height: 1.65; }
select.form-field { cursor: pointer; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-submit-row { margin-top: 44px; }
.form-submit {
  padding: 14px 52px;
  background: var(--text);
  color: #fff;
  border: none;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.25s ease;
}
.form-submit:hover { background: var(--accent); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-success { display: none; text-align: center; padding: 60px 0; }
.form-success.visible { display: block; }
.form-success-title {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 300;
  margin-bottom: 12px;
}
.form-success-msg { font-size: 14px; color: var(--text-sec); line-height: 1.7; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-sec);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .masonry { column-count: 2; }
}

@media (max-width: 960px) {
  .nav { padding: 0 28px; }
  .page-header { padding: 52px 28px 36px; }
  .gallery-filters { padding: 18px 28px; }
  .masonry { column-count: 2; padding: 12px 18px; }
  .gallery-groups { padding: 0 28px 60px; }
  .gallery-row { grid-template-columns: repeat(2, 1fr); }
  .gallery-row-item .img-wrap { height: 220px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .home-categories { padding: 60px 28px; }
  .about-bio-section { padding: 52px 28px 48px; }
  .about-portrait-section img { height: 440px; }
  .contact-section { padding: 60px 28px; }
  .footer { padding: 28px; }
}

@media (max-width: 680px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .home-banner { height: 44vh; }
  .home-cats { flex-direction: column; height: auto; }
  .home-cat { height: 44vw; min-height: 180px; }
  .home-cat + .home-cat { border-left: none; border-top: 1px solid rgba(255,255,255,0.15); }
  .hero-name { font-size: clamp(42px, 12vw, 80px); }
  .hero-sub { letter-spacing: 0.2em; }
  .masonry { column-count: 1; padding: 8px 14px; }
  .gallery-groups { padding: 0 16px 48px; }
  .gallery-row { grid-template-columns: repeat(2, 1fr); }
  .gallery-row-item .img-wrap { height: 160px; }
  .gallery-group-heading { font-size: 26px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-categories { padding: 48px 20px; }
  .home-categories-heading { font-size: 30px; }
  .form-row-2 { grid-template-columns: 1fr; gap: 28px; }
  .about-bio-section { padding: 40px 20px 48px; }
  .about-intro { font-size: 22px; }
  .about-portrait-section img { height: 360px; }
  .contact-section { padding: 48px 20px; }
  .lb-inner { padding: 0 48px; }
  .footer { flex-direction: column; gap: 10px; text-align: center; padding: 28px 20px; }
}

@media (max-width: 420px) {
  .lb-inner { padding: 0 36px; }
  .lb-nav { font-size: 28px; padding: 18px 12px; }
}
