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

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

:root {
  --text: rgb(65, 65, 65);
  --footer-text: rgb(152, 158, 144);
  --divider: #e0e0e0;
  --white: #fff;
  --font-brand: 'Josefin Sans', 'Helvetica Neue', Helvetica, sans-serif;
  --font-nav: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-footer: 'Times New Roman', times, serif;
}

html {
  background: var(--white);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { display: block; max-width: 100%; height: auto; }

/* ─── HEADER ─── */
header { width: 100%; }

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 36px 0 28px;
}

.site-name {
  font-family: var(--font-brand);
  font-size: 62px;
  font-weight: 300;
  line-height: 1.1em;
  letter-spacing: 0em;
  color: var(--text);
  flex-shrink: 0;
}

/* ─── NAV (desktop) ─── */
.desktop-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  padding-bottom: 4px;
}

.nav-item { position: relative; }

.nav-item > a,
.nav-item > span {
  font-family: var(--font-nav);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: #000;
  white-space: nowrap;
  display: block;
  padding: 4px 0;
}

.nav-item > a:hover,
.nav-item > span:hover { opacity: 0.5; }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  width: max-content;
  z-index: 100;
  padding: 14px 0 8px;
  border: 1px solid var(--divider);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-item:hover .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-nav);
  font-size: 14px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: #000;
}

.dropdown a:hover { background: #f7f7f7; }

/* ─── MAIN ─── */
main { flex: 1; }

.page-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 0 60px;
}

/* ─── HOME ─── */
.home-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 80px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-hero {
  width: 380px;
  height: auto;
  display: block;
}

.home-credit { display: none; }

/* ─── COMMISSION INDEX ─── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 60px;
  padding-top: 40px;
}

.service-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 14px;
}

.service-item h2 {
  font-family: var(--font-nav);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.service-item .read-more {
  font-size: 13px;
  color: #888;
  text-decoration: underline;
}

/* ─── BACK LINK ─── */
.back-link {
  display: inline-block;
  font-family: var(--font-nav);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
  color: #888;
  padding-top: 32px;
}

.back-link:hover { color: var(--text); }

/* ─── GALLERY ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.gallery-grid img { width: 100%; height: auto; }

/* ─── PROJECT PAGE ─── */
.project-header {
  padding-top: 28px;
  margin-bottom: 0;
}

.project-footer {
  padding-top: 28px;
}

.project-header h1 {
  font-family: var(--font-nav);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.project-header p {
  font-size: 13px;
  line-height: 1.7;
  color: #888;
  max-width: 560px;
  font-family: var(--font-nav);
}

/* ─── BIO ─── */
.bio-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.bio-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 60px;
  align-items: start;
  max-width: 980px;
  width: 100%;
  padding-left: 80px;
}

.bio-photo { width: 100%; height: auto; display: block; align-self: center; }

.bio-text h1 {
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.bio-text h2 {
  font-family: var(--font-nav);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 28px;
  margin-bottom: 12px;
}

.bio-text p {
  font-family: var(--font-nav);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 10px;
}

.cv-link {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--font-nav);
  font-size: 13px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}

/* ─── EVENTS LIST ─── */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.event-item img {
  width: 100%;
  height: auto;
  display: block;
}

.event-caption {
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  margin-top: 14px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* ─── PREV / NEXT ─── */
.prevnext {
  display: flex;
  justify-content: space-between;
  padding: 40px 0 20px;
  border-top: 1px solid var(--divider);
  margin-top: 40px;
}

.prevnext a {
  font-family: var(--font-nav);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.prevnext a:hover { opacity: 0.5; }

.prevnext-prev { flex: 1; }
.prevnext-next { flex: 1; text-align: right; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--divider);
  padding: 28px 0;
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-left p,
.footer-right p {
  font-family: var(--font-footer);
  font-size: 17px;
  line-height: 1.4em;
  color: var(--footer-text);
}

.footer-right { text-align: right; }

/* ─── HAMBURGER ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: fixed;
  top: 30px;
  right: 24px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--text);
}

/* ─── PAIRED IMAGES ─── */
.event-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.event-pair .event-item img {
  height: 100%;
  object-fit: cover;
}

/* ─── PORTRAIT PAGE ─── */
.portrait-list { display: flex; flex-direction: column; gap: 24px; padding-top: 40px; }
.portrait-single img { width: 100%; height: auto; display: block; }
.portrait-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.portrait-pair img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── LIGHTBOX ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
#lightboxImg {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}
#lightboxCaption {
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-nav);
  font-size: 13px;
  margin-top: 16px;
  text-align: center;
  letter-spacing: 0.04em;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 56px;
  line-height: 1;
  cursor: pointer;
  padding: 0 16px;
  user-select: none;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

/* ─── DRAWER OVERLAY ─── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 998;
}

.drawer-overlay.open { display: block; }

/* ─── MOBILE DRAWER ─── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 65%;
  height: 100vh;
  background: #9da899;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 52px 28px 48px;
}

.mobile-drawer.open { transform: translateX(0); }

.drawer-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 48px;
  margin-top: 60px;
}

.drawer-link {
  font-family: var(--font-nav);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #fff;
}

.drawer-link.active { color: #d4bc8a; }

.drawer-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.drawer-cat {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-nav);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.drawer-cat.expanded .chevron { transform: rotate(180deg); }

.drawer-sub {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  margin-top: 18px;
  width: 100%;
}

.drawer-sub.open { display: flex; }

.drawer-sub a {
  font-family: var(--font-nav);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

/* ─── PADDING ON SMALLER VIEWPORTS ─── */
@media (max-width: 1040px) {
  .header-inner,
  .page-inner,
  .home-container,
  .footer-inner,
  .bio-layout {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }
  .desktop-nav { display: none; }

  .site-name { font-size: 52px; }

  .header-inner {
    flex-direction: row;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 20px;
    padding-right: 60px;
  }

  .home-container {
    padding: 80px 0 40px;
    align-items: center;
  }

  .home-hero-link {
    display: block;
    width: 90%;
  }

  .home-hero {
    width: 100%;
    height: auto;
    display: block;
  }

  .home-credit {
    display: block;
    width: 90%;
    text-align: right;
    font-family: var(--font-nav);
    font-size: 18px;
    color: #b0b0b0;
    padding: 20px 0 0 0;
    letter-spacing: 0.03em;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  footer { display: none; }

  .service-grid,
  .gallery-grid { grid-template-columns: 1fr; }

  .bio-page { padding: 40px 24px; min-height: auto; }
  .bio-layout { grid-template-columns: 1fr; gap: 24px; }
  .bio-photo { max-width: 180px; }

  .footer-inner { flex-direction: column; gap: 16px; }
  .footer-right { text-align: left; }
}
