/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg:           #0f0f0f;
  --text:         #f0ede8;
  --text-muted:   rgba(240, 237, 232, 0.6);
  --accent:       #c9a070;
  --accent-dim:   rgba(201, 160, 112, 0.12);
  --surface:      rgba(15, 15, 15, 0.88);
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:        72px;
  --max-w:        1200px;
  --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius:       2px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
iframe { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font-sans); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
}
h1 { font-size: clamp(3.5rem, 9vw, 9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.75rem); margin-bottom: 2.5rem; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2.2rem); }
p { max-width: 65ch; }

/* ============================================================
   SHARED UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}
.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.portfolio-grid .fade-in:nth-child(2) { transition-delay: 0.08s; }
.portfolio-grid .fade-in:nth-child(3) { transition-delay: 0.16s; }
.portfolio-grid .fade-in:nth-child(4) { transition-delay: 0.24s; }
.portfolio-grid .fade-in:nth-child(5) { transition-delay: 0.32s; }
.portfolio-grid .fade-in:nth-child(6) { transition-delay: 0.40s; }
.portfolio-grid .fade-in:nth-child(7) { transition-delay: 0.48s; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  transition: background 0.45s var(--ease), backdrop-filter 0.45s;
}
.nav.scrolled {
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 160, 112, 0.12);
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; opacity: 0.8; }
nav { flex: 1; }
.nav-links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
  justify-content: center;
}
.nav-links a {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.65;
  transition: opacity 0.2s, color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}
.nav-social {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}
.nav-social a {
  color: var(--text);
  opacity: 0.55;
  transition: opacity 0.2s;
  line-height: 0;
}
.nav-social a:hover { opacity: 1; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  line-height: 0;
  padding: 4px;
  margin-left: auto;
}

@media (max-width: 700px) {
  .nav-social { display: none; }
  nav { display: contents; }
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(10, 10, 10, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; letter-spacing: 0.2em; }
  .nav-toggle { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(5rem, 10vw, 10rem) clamp(1.5rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
  transition: transform 8s ease-out;
  will-change: transform;
}
.hero-bg.loaded { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15,15,15,0.25) 0%,
    rgba(15,15,15,0.5) 50%,
    rgba(15,15,15,0.85) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.hero-content .section-label {
  animation: fadeUp 1s var(--ease) 0.3s both;
}
.hero-content h1 {
  animation: fadeUp 1s var(--ease) 0.5s both;
  color: var(--text);
}
.hero-rule {
  width: 80px;
  height: 1px;
  background: var(--accent);
  margin: 1.5rem 0;
  animation: fadeUp 1s var(--ease) 0.7s both;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  animation: fadeUp 1s var(--ease) 0.9s both;
  max-width: none;
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text);
  opacity: 0.5;
  animation: bounce 2s ease-in-out 2s infinite, fadeUp 1s var(--ease) 1.2s both;
  line-height: 0;
  transition: opacity 0.2s;
}
.hero-scroll:hover { opacity: 1; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-section {
  padding: clamp(5rem, 8vw, 8rem) 0;
  background: var(--bg);
}
.portfolio-section .container { padding-bottom: 0; }
.portfolio-section h2 { color: var(--text); }

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}
.filter-btn {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: none;
  border: 1px solid rgba(240, 237, 232, 0.2);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  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: var(--bg);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 340px;
  gap: 3px;
}
.portfolio-grid .portfolio-card:nth-child(1) { grid-column: span 7; }
.portfolio-grid .portfolio-card:nth-child(2) { grid-column: span 5; }
.portfolio-grid .portfolio-card:nth-child(3) { grid-column: span 4; }
.portfolio-grid .portfolio-card:nth-child(4) { grid-column: span 4; }
.portfolio-grid .portfolio-card:nth-child(5) { grid-column: span 4; }
.portfolio-grid .portfolio-card:nth-child(6) { grid-column: span 6; }
.portfolio-grid .portfolio-card:nth-child(7) { grid-column: span 6; }

.portfolio-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.portfolio-card[data-hidden] { display: none; }
.card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s var(--ease);
}
.portfolio-card:hover .card-img { transform: scale(1.06); }
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,15,0.9) 0%, rgba(15,15,15,0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.portfolio-card:hover .card-overlay,
.portfolio-card:focus-visible .card-overlay { opacity: 1; }
@media (hover: none) { .card-overlay { opacity: 1; } }
.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.card-tags span {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-overlay h3 {
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  color: var(--text);
  margin-bottom: 0.75rem;
}
.card-btn {
  align-self: flex-start;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.card-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 280px;
  }
  .portfolio-grid .portfolio-card { grid-column: span 1 !important; }
}
@media (max-width: 540px) {
  .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.modal-overlay:not([hidden]) { opacity: 1; }
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  background: #181818;
  border: 1px solid rgba(201, 160, 112, 0.15);
  border-radius: 2px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.35s var(--ease);
}
.modal-overlay:not([hidden]) .modal { transform: translateY(0); }
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  padding: 1rem 1.25rem;
  transition: color 0.2s;
  z-index: 1;
}
.modal-close:hover { color: var(--accent); }
.modal-body {
  padding: 1.5rem 2rem 2rem;
  clear: both;
}
.modal-body h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}
.modal-body .modal-meta {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.modal-body p { color: var(--text-muted); margin-bottom: 1rem; }
.modal-embed {
  margin: 1.5rem 0;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.modal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.modal-embed--audio {
  padding-bottom: 0;
  height: auto;
}
.modal-embed--audio iframe { position: static; height: 450px; }
.modal-audio-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.modal-audio-list li { display: flex; flex-direction: column; gap: 0.25rem; }
.modal-audio-list .track-name {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.modal-audio-list audio { width: 100%; }
.modal-tracks {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.modal-pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.modal-pdf-grid a {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid rgba(201,160,112,0.2);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-pdf-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   WORKS
   ============================================================ */
.works-section {
  padding: clamp(5rem, 8vw, 8rem) 0;
  background: #0a0a0a;
}
.works-section h2 { margin-bottom: 3.5rem; }
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.works-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  border-top: 1px solid rgba(240,237,232,0.06);
}
.works-card--flip {
  direction: rtl;
}
.works-card--flip > * { direction: ltr; }
.works-media {
  overflow: hidden;
  background: #111;
  position: relative;
}
.works-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.works-card:hover .works-media img { transform: scale(1.04); }
.works-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.works-embed iframe,
.works-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.works-embed--stacked {
  margin-top: 0.5rem;
}
.works-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.works-text {
  padding: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.works-date {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.works-text h3 { margin-bottom: 0.25rem; }
.works-subtitle {
  font-style: italic;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 1rem;
  max-width: none;
}
.works-text p { color: var(--text-muted); }

.audio-pair {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(240,237,232,0.08);
}
.audio-pair-title {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  max-width: none;
  margin-bottom: 0.25rem;
}
.audio-track { display: flex; flex-direction: column; gap: 0.2rem; }
.audio-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.audio-track audio { width: 100%; }

/* Gallery hint overlay on works card */
.works-card--gallery { cursor: pointer; }
.gallery-hint {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(15,15,15,0.75);
  border: 1px solid rgba(201,160,112,0.4);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.works-card--gallery:hover .gallery-hint { opacity: 1; }
@media (hover: none) { .gallery-hint { opacity: 1; } }

/* Modal image gallery */
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px;
  margin-top: 1.5rem;
}
.modal-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.modal-gallery img:hover { opacity: 0.85; }
/* Lightbox for gallery full-size view */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

@media (max-width: 768px) {
  .works-card {
    grid-template-columns: 1fr;
    min-height: auto;
    direction: ltr;
  }
  .works-media { min-height: 260px; }
  .works-embed { padding-bottom: 56.25%; height: 0; }
  .works-card--flip { direction: ltr; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: clamp(5rem, 8vw, 8rem) 0;
  overflow: hidden;
}
.about-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: grayscale(30%);
}
.about-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(15,15,15,0.97) 0%,
    rgba(15,15,15,0.8) 55%,
    rgba(15,15,15,0.4) 100%
  );
}
.about-section .container { position: relative; z-index: 1; }
.about-panel {
  max-width: 620px;
}
.about-panel h2 { margin-bottom: 1.5rem; }
.about-bio {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.about-bio p { color: rgba(240,237,232,0.82); }
.about-closing {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text) !important;
  margin-top: 0.5rem;
}

/* ============================================================
   CONNECT (replaces contact form)
   ============================================================ */
.connect-section {
  padding: clamp(5rem, 8vw, 8rem) 0;
  background: #080808;
  border-top: 1px solid rgba(240,237,232,0.06);
}
.connect-inner { max-width: 520px; }
.connect-inner h2 { margin-bottom: 2rem; }
.connect-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.connect-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  border: 1px solid rgba(240, 237, 232, 0.1);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.connect-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.connect-item svg { flex-shrink: 0; opacity: 0.7; }
.connect-item:hover svg { opacity: 1; }
.connect-item--email { font-family: var(--font-sans); }
.connect-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(240,237,232,0.08);
  background: #080808;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  max-width: none;
}
.footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  max-width: none;
}
.footer-social { display: flex; gap: 1.5rem; }
.footer-social a {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--accent);
  text-decoration: none;
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
