/* === FONTS === */
@font-face {
  font-family: 'Fondamento';
  src: url('../fonts/fondamento-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fondamento';
  src: url('../fonts/fondamento-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* === VARIABLES === */
:root {
  --sand: #beb2a2;
  --ink: #191916;
  --ember: #e6542d;
  --white: #ffffff;
  --nav-height: 48px;
  --font-display: 'Fondamento', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1320px;
  --pad-x: clamp(24px, 5vw, 80px);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background-color: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

/* === NAV === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav {
  height: var(--nav-height);
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad-x);
  position: relative;
}
.site-header.menu-open .nav {
  border-bottom-color: transparent;
}

.nav-links {
  display: flex;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

.nav-link {
  position: relative;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.55vw, 21px);
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.68;
  text-shadow: none;
  transition: opacity 0.25s ease;
}
.nav-link::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -0.35em -0.55em;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.34) 46%, rgba(255,255,255,0) 72%);
  filter: blur(7px);
  opacity: 0;
  transform: scaleX(0.75);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.nav-link:hover::before,
.nav-link:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}
.nav-link:hover { opacity: 1; }
.nav-link--active { opacity: 1; }

/* hamburger */
.hamburger {
  display: none;
  position: absolute;
  right: var(--pad-x);
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 18px;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--ink);
  box-shadow: none;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(8.25px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8.25px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink);
  padding: 32px var(--pad-x);
  gap: 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding-top: 0;
  padding-bottom: 0;
}
.mobile-menu.open {
  max-height: 300px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.mobile-link {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-shadow: none;
}

/* === MAIN === */
.main {
  flex: 1;
  padding-top: var(--nav-height);
}
.page-work .main {
  padding-top: 0;
}

/* === WORK PAGE === */
.work-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--sand);
  min-height: clamp(440px, 62vh, 620px);
  justify-content: center;
  padding: clamp(54px, 7vw, 88px) var(--pad-x) clamp(28px, 4vw, 54px);
  text-align: center;
  overflow: hidden;
}

.work-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.work-hero-bg-layer {
  position: absolute;
  inset: 0;
  background-image: url('../images/background.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: saturate(0.62) sepia(0.18) brightness(0.98) contrast(0.95);
}

.work-hero-bg-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #8b837b;
  mix-blend-mode: color;
  opacity: 0.8;
  will-change: background-color, opacity;
  animation: hero-color-wash 12s ease-in-out infinite alternate;
}

.work-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes hero-color-wash {
  0% {
    background-color: #8b837b;
    opacity: 0.82;
  }
  50% {
    background-color: #b4917d;
    opacity: 0.68;
  }
  100% {
    background-color: #ce967d;
    opacity: 0.52;
  }
}

.work-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 58px);
  font-weight: 400;
  line-height: 0.95;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: clamp(18px, 3vw, 34px);
  text-shadow: 0 2px 12px rgba(25,25,22,0.2);
}

.site-mark {
  display: block;
  width: clamp(80px, 10vw, 140px);
  height: auto;
  margin-bottom: clamp(22px, 2.6vw, 34px);
  opacity: 0.9;
}

.work-intro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 1.65vw, 24px);
  font-weight: 700;
  color: var(--white);
  max-width: 820px;
  line-height: 1.24;
  text-shadow: 0 2px 10px rgba(25,25,22,0.26);
}

/* === PROJECT GRID === */
.projects {
  padding: 0 0 clamp(64px, 8vw, 120px);
  background-color: var(--sand);
}

.projects-loading {
  text-align: center;
  padding: 80px;
  font-family: var(--font-display);
  font-size: 14px;
  opacity: 0.4;
}

.project-card {
  cursor: pointer;
  display: block;
  border-top: 1px solid var(--ink);
}
.project-card:last-child { border-bottom: 1px solid var(--ink); }

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: color-mix(in srgb, var(--sand) 70%, var(--ink));
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

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

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 56px);
  background: linear-gradient(to top, rgba(25,25,22,0.82) 0%, rgba(25,25,22,0.3) 60%, transparent 100%);
  color: var(--white);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 6px;
}

.project-client {
  font-family: var(--font-body);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* no-thumbnail fallback */
.project-thumb--empty {
  background-color: color-mix(in srgb, var(--sand) 60%, var(--ink) 40%);
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(25, 25, 22, 0.97);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lightbox[hidden] { display: none; }

.lightbox-inner {
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px);
  position: relative;
  color: var(--white);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  font-size: 32px;
  line-height: 1;
  color: var(--white);
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 201;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-header {
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: clamp(32px, 4vw, 56px);
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 12px;
}

.lightbox-client {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: clamp(20px, 2.5vw, 32px);
}

.lightbox-description {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  max-width: 640px;
}
.lightbox-description p + p { margin-top: 1em; }

.lightbox-media {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 56px);
}

.lb-media-item { width: 100%; }

.lb-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.lb-video-wrap iframe,
.lb-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

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

.lb-caption {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.15vw, 17px);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.88);
}

/* === ABOUT PAGE === */
.about-columns {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(48px, 7vw, 96px) var(--pad-x) clamp(64px, 8vw, 120px);
  max-width: var(--max-w);
  margin: 0 auto;
  align-items: start;
  background-color: var(--sand);
}

.about-headshot-wrap {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.about-headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-text {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
}
.about-text p + p { margin-top: 1.4em; }

/* === PRACTICE PAGE === */
.practice-wrap {
  padding: clamp(48px, 7vw, 96px) var(--pad-x) clamp(64px, 8vw, 120px);
  max-width: 760px;
  margin: 0 auto;
  background-color: var(--sand);
}

.practice-body {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
}
.practice-body p + p { margin-top: 1.4em; }

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--ink);
  padding: 40px var(--pad-x);
  margin-top: auto;
  background-color: color-mix(in srgb, var(--sand) 85%, var(--ink));
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-mark {
  font-size: 20px;
  line-height: 1;
  color: var(--white);
}

.footer-est {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.footer-email {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.footer-email:hover { opacity: 1; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }

  .about-columns {
    grid-template-columns: 1fr;
  }
  .about-headshot-wrap {
    position: static;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .project-title { font-size: 18px; }
  .lightbox-title { font-size: 24px; }
}
