@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-normal-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-400-italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-variable-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}

:root {
  --black: #0a0a0a;
  --white: #fdfdfc;
  --gray: #8a8a8a;
  --line: #d8d8d6;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 3rem;
  background: rgba(253, 253, 252, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  cursor: pointer;
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--black); }

.filter {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.filter::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--black);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.filter:hover { color: var(--black); }

.filter.active { color: var(--black); }
.filter.active::after { transform: scaleX(1); }

.legal-back {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-back:hover {
  color: var(--black);
  border-color: var(--black);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--black);
  width: 100%;
}

/* ---------- CV page ---------- */

.cv {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.cv h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 3rem;
  text-align: center;
}

.cv-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.cv-entry {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.cv-entry dt {
  flex: 0 0 6.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35rem;
}

.cv-entry dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .cv-entry { flex-direction: column; gap: 0.3rem; }
  .cv-entry dt { flex: 0 0 auto; padding-top: 0; }
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.legal h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.6rem;
}

.legal-intro {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 3rem;
}

.legal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 2.4rem 0 0.8rem;
}

.legal p {
  line-height: 1.7;
  margin: 0 0 1rem;
}

.legal a {
  color: var(--black);
}

/* ---------- Intro ---------- */

.intro {
  padding: 6rem 3rem 3rem;
  text-align: center;
}

.intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0 0 0.8rem;
  letter-spacing: 0.01em;
}

.intro p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

.intro-filters {
  line-height: 2.2;
}

/* ---------- Grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--white);
  padding: 1px 0 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--line);
}

.work {
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.work.hidden { display: none; }

.work-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #111;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transform: scale(1.001);
  transition: transform 0.6s cubic-bezier(.22,.61,.36,1), filter 0.4s ease;
}

.work:hover .work-thumb img {
  transform: scale(1.06);
  filter: grayscale(0%) contrast(1.05);
}

.play-icon {
  position: absolute;
  top: 50%; left: 50%;
  width: 54px; height: 54px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.play-icon::before {
  content: '';
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent rgba(255,255,255,0.9);
  margin-left: 4px;
}

.work:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(255,255,255,0.08);
}

.work-meta {
  padding: 1.1rem 0.2rem 1.6rem;
  text-align: center;
}

.work-meta h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 0.3rem;
}

.work-tags {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 3rem 3rem;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 0.05em;
}

.site-footer a {
  color: var(--gray);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer a:hover {
  color: var(--black);
  border-color: var(--black);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

a.email::before {
  content: attr(data-user);
}

a.email::after {
  content: attr(data-domain);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 6, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox-content {
  max-width: min(90vw, 1100px);
  width: 100%;
  max-height: 85vh;
}

.embed-frame {
  width: 100%;
  height: 78vh;
  background: var(--white);
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.embed-open {
  display: block;
  margin-top: 0.8rem;
  text-align: right;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253, 253, 252, 0.7);
  text-decoration: none;
}

.embed-open:hover { color: var(--white); }

/* ---------- Audio player ---------- */

.audio-list {
  width: min(100%, 620px);
  margin: 0 auto;
  background: var(--white);
  padding: 0.5rem 2rem;
}

.audio-clip {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.audio-clip:last-child { border-bottom: none; }

.audio-play {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--black);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.audio-play:hover { background: rgba(10, 10, 10, 0.06); }

.audio-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--black);
  margin-left: 2px;
}

.audio-clip.playing .audio-icon {
  border-width: 0;
  width: 9px;
  height: 11px;
  margin-left: 0;
  border-left: 3px solid var(--black);
  border-right: 3px solid var(--black);
}

.audio-body {
  flex: 1 1 auto;
  min-width: 0;
}

.audio-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
  color: var(--black);
}

.audio-progress {
  height: 2px;
  background: var(--line);
  cursor: pointer;
  position: relative;
}

.audio-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--black);
}

.audio-time {
  flex: 0 0 auto;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
  min-width: 2.6rem;
  text-align: right;
}

.lightbox-content img,
.lightbox-content video {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-family: var(--sans);
  line-height: 1;
}

.lightbox-close {
  top: 1.6rem;
  right: 2rem;
  font-size: 2.2rem;
  font-weight: 300;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  font-weight: 300;
  padding: 0.5rem 1rem;
}

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  color: var(--gray);
}

.lightbox-prev.hide,
.lightbox-next.hide {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .site-header { padding: 1.2rem 1.5rem; }
  .intro { padding: 4rem 1.5rem 2rem; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }

  .site-header { gap: 1rem; }

  .site-footer {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
  }
}
