/* Design tokens */
:root {
  --bg-primary: #0a0a0a;
  --bg-elevated: #141414;
  --gold-primary: #c9a227;
  --gold-soft: #e8d48b;
  --gold-muted: #8a7340;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --divider: rgba(201, 162, 39, 0.25);
  --font-display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --font-body: "DM Sans", "Noto Sans SC", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
  --max-width: 1200px;
  --nav-h: 4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.07), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 60%, rgba(138, 115, 64, 0.04), transparent 50%);
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid var(--gold-primary);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Nav —— */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-nav.is-scrolled {
  border-bottom-color: var(--divider);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover {
  color: var(--gold-soft);
}

/* —— Hero —— */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) clamp(1.25rem, 4vw, 3rem) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.1s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.5vw, 4.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero-name span {
  color: var(--gold-primary);
}

.hero-intro {
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.35s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.5s forwards;
}

.hero-portrait {
  margin: 0;
  justify-self: end;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.3s forwards;
}

.hero-portrait img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(22rem, 38vw);
  max-height: min(78vh, 42rem);
  object-fit: contain;
  object-position: center top;
  border: 1px solid var(--divider);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn-primary {
  background: var(--gold-primary);
  color: var(--bg-primary);
  border: 1px solid var(--gold-primary);
}

.btn-primary:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--divider);
}

.btn-ghost:hover {
  border-color: var(--gold-primary);
  color: var(--gold-soft);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 1s forwards;
}

/* —— Section shared —— */
.section {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) clamp(1.25rem, 4vw, 3rem);
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto var(--space-xl);
}

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--gold-primary);
  margin-top: var(--space-md);
}

/* —— Works —— */
.works-list {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.work-item {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.work-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.work-item--reverse {
  grid-template-columns: 0.85fr 1.15fr;
}

.work-item--reverse .work-media {
  order: 2;
}

.work-item--reverse .work-content {
  order: 1;
}

.work-media {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  transition: border-color 0.35s var(--ease), filter 0.35s var(--ease);
}

.work-media--pair {
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
  border: none;
}

.work-media--pair:hover,
.work-media--pair:focus-within {
  border-color: transparent;
  filter: none;
}

.work-video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
}

.work-video-cell {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: min(68vh, 34rem);
  transition: border-color 0.35s var(--ease), filter 0.35s var(--ease);
}

.work-video-cell:hover {
  border-color: var(--gold-primary);
  filter: brightness(1.06);
}

.work-media:hover,
.work-media:focus-within {
  border-color: var(--gold-primary);
  filter: brightness(1.06);
}

.work-media video,
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s var(--ease);
}

.work-video-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.work-media .work-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.work-media.is-hover-video > img {
  opacity: 0;
  position: absolute;
  inset: 0;
}

.work-media-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  background: transparent;
}

.work-play-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 3;
  pointer-events: none;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(10, 10, 10, 0.65);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--divider);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.work-media:hover .work-play-hint {
  opacity: 1;
}

.work-tag {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 0.25rem;
  max-width: 100%;
  line-height: 1.5;
}

.work-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.work-summary {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  max-width: 32rem;
  line-height: 1.8;
}

.work-detail-btn {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: none;
  word-break: break-all;
  color: var(--gold-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.work-detail-btn:hover {
  border-bottom-color: var(--gold-primary);
  color: var(--gold-soft);
}

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  transform: translateY(16px);
  transition: transform 0.35s var(--ease);
}

.modal.is-open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--gold-soft);
}

.modal-tag {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.modal-media {
  margin-bottom: 1.25rem;
  border: 1px solid var(--divider);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 10;
}

.modal-media video,
.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.modal-link {
  display: inline-flex;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 0.15rem;
}

.modal-link:hover {
  color: var(--gold-soft);
  border-bottom-color: var(--gold-soft);
}

body.modal-open {
  overflow: hidden;
}

/* —— Footer —— */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--divider);
  padding: var(--space-xl) clamp(1.25rem, 4vw, 3rem) var(--space-lg);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-lg);
}

.footer-label {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--space-sm);
}

.footer-email {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  transition: color 0.25s;
}

.footer-email:hover {
  color: var(--gold-soft);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-top: var(--space-md);
}

.footer-social a {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color 0.25s;
}

.footer-social a:hover {
  color: var(--gold-soft);
}

.footer-copy {
  align-self: flex-end;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* —— Cursor wake canvas —— */
#cursor-wake {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* —— Animations —— */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-label,
  .hero-name,
  .hero-intro,
  .hero-actions,
  .hero-portrait,
  .hero-scroll-hint {
    opacity: 1;
    animation: none;
  }

  .work-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-portrait {
    order: -1;
    justify-self: start;
  }

  .hero-portrait img {
    max-width: min(14rem, 55vw);
    max-height: none;
  }

  .work-item,
  .work-item--reverse {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .work-item--reverse .work-media,
  .work-item--reverse .work-content {
    order: unset;
  }

  .work-video-cell {
    max-height: min(52vh, 26rem);
  }

  .nav-links {
    gap: 1.25rem;
  }

  .section {
    padding: var(--space-xl) clamp(1.25rem, 4vw, 2rem);
  }

  .works-list {
    gap: var(--space-xl);
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 2rem);
    min-height: auto;
    padding-bottom: var(--space-xl);
  }

  .hero-scroll-hint {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-copy {
    align-self: flex-start;
  }
}
