:root {
  --bg: #0d0d0d;
  --bg-elevated: #121212;
  --text: #f5f5f5;
  --text-muted: rgba(245, 245, 245, 0.55);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ffffff;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.4));
  z-index: 200;
  pointer-events: none;
  transition: width 0.05s linear;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(10, 10, 10, 0.88);
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.brand__logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.brand__logo img {
  display: block;
  height: clamp(2.75rem, 6.5vw, 3.75rem);
  width: auto;
  max-width: min(280px, 55vw);
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.nav a {
  position: relative;
  padding: 0.25rem 0;
  color: inherit;
  transition: color 0.25s ease;
}

.nav a::before {
  content: "— ";
  opacity: 0.5;
}

.nav a:hover {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-actions__primary {
  font-weight: 700;
}

.header-actions a {
  transition: opacity 0.25s ease;
}

.header-actions a:hover {
  opacity: 0.65;
}

.icon-ig {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.85;
}

/* —— Mobile hamburger & drawer —— */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.nav-toggle:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle__bars {
  position: relative;
  width: 1.25rem;
  height: 0.875rem;
  display: block;
}

.nav-toggle__bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), opacity 0.25s, top 0.35s var(--ease-out);
}

.nav-toggle__bar:nth-child(1) {
  top: 0;
}

.nav-toggle__bar:nth-child(2) {
  top: 7px;
}

.nav-toggle__bar:nth-child(3) {
  top: 14px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.nav-mobile.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nav-mobile__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.nav-mobile.is-open .nav-mobile__backdrop {
  opacity: 1;
}

.nav-mobile__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(20rem, 100% - 2.5rem);
  max-width: 100%;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 0.5rem) 1.5rem 2rem;
  overflow-y: auto;
}

.nav-mobile.is-open .nav-mobile__panel {
  transform: translateX(0);
}

.nav-mobile__links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile__links a {
  display: block;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding-left 0.25s var(--ease-out);
}

.nav-mobile__links a:hover {
  color: var(--text-muted);
  padding-left: 0.35rem;
}

.nav-mobile__extra {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-mobile__extra a[href^="#"] {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-mobile__extra a[href^="#"]:hover {
  color: var(--text);
}

.nav-mobile__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav--desktop {
    display: none !important;
  }

  .header-actions--desktop {
    display: none !important;
  }

  .brand {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
    gap: 0.65rem;
  }

  .brand__logo img {
    height: clamp(2.25rem, 12vw, 2.85rem);
    max-width: min(220px, calc(100vw - 5.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-mobile__panel,
  .nav-mobile__backdrop,
  .nav-toggle__bar {
    transition: none !important;
  }
}

main {
  padding-top: var(--header-h);
}

/* —— Hero slider —— */
.hero {
  position: relative;
  min-height: min(calc(92vh - 20px), 880px);
  overflow: hidden;
}

.hero__slides {
  position: relative;
  height: min(calc(78vh - 20px), 740px);
}

@media (min-width: 1024px) {
  .hero {
    max-width: calc(100% - 30px);
    margin: 0 auto;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease-out), visibility 0.9s;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slide__inner {
  position: absolute;
  inset: -8%;
  will-change: transform;
}

.hero-slide__media {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transform: scale(1.08);
  transition: transform 8s ease-out;
}

.hero-slide__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide.is-active .hero-slide__media {
  transform: scale(1);
}

.hero-slide--1 .hero-slide__media {
  background-image:
    linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.55) 100%),
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(180, 120, 80, 0.35), transparent),
    linear-gradient(160deg, #1a1510 0%, #0d0d0d 45%, #121820 100%);
}

.hero-slide--2 .hero-slide__media {
  background-image:
    linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(circle at 30% 60%, rgba(100, 140, 200, 0.25), transparent 55%),
    linear-gradient(200deg, #0a0e18 0%, #0a0a0a 50%, #151018 100%);
}

.hero-slide--3 .hero-slide__media {
  background-image:
    linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.55) 100%),
    radial-gradient(ellipse at 80% 30%, rgba(200, 90, 70, 0.2), transparent 50%),
    linear-gradient(180deg, #100808 0%, #0a0a0a 40%, #081008 100%);
}

/* .hero-slide__grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
} */

.hero__meta {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding: clamp(1.5rem, 4vw, 1.5rem) clamp(1.25rem, 4vw, 3rem) 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero__titles h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.hero__titles .sub {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s;
}

.btn-ghost:hover {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.hero__controls {
  position: absolute;
  bottom: clamp(1.25rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero__arrow {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.5);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.25s, background 0.25s;
}

.hero__arrow:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.hero__dots {
  display: flex;
  gap: 0.5rem;
}

.hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}

.hero__dot[aria-current="true"] {
  background: #fff;
  transform: scale(1.25);
}

/* —— Sections —— */
.section {
  padding: clamp(4rem, 12vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section__head--left {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.section__label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.section__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Portfolio grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero__meta {
    grid-template-columns: 1fr;
  }
}

.card {
  display: block;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease-out), border-color 0.35s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1200 / 560;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.7s var(--ease-out);
}

.card__thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.7s var(--ease-out);
}

.card:hover .card__thumb:not(:has(> img)) {
  transform: scale(1.06);
}

.card:hover .card__thumb:has(> img) {
  transform: none;
}

.card:hover .card__thumb:has(> img) > img {
  transform: scale(1.06);
}

.card__thumb--a {
  background-image: linear-gradient(145deg, #1c1814, #0d0d0d);
}

.card__thumb--b {
  background-image: linear-gradient(145deg, #141820, #0a0a0a);
}

.card__thumb--c {
  background-image: linear-gradient(145deg, #181010, #0a0a0a);
}

.card__thumb--d {
  background-image: linear-gradient(145deg, #101820, #0d0d0d);
}

.card__thumb--e {
  background-image: linear-gradient(145deg, #1a1418, #0a0a0a);
}

.card__thumb--f {
  background-image: linear-gradient(145deg, #121610, #0a0a0a);
}

.card__body {
  padding: 1rem 1.1rem 1.25rem;
}

.card__body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card__body p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.section-cta {
  text-align: center;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

/* About */
.about {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.about h2 {
  margin: 0 0 1.25rem;
  font-weight: 600;
}

.about__logo img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: inline-block;
}

.about p {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.about__rule {
  height: 1px;
  background: var(--line);
  margin: 0 auto 2rem;
  max-width: 200px;
}

.about ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 2;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-slide__inner {
    transform: none !important;
  }

  .hero-slide__media {
    transition: none;
  }
}

.site-footer {
  padding: 3rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-footer .brand__logo img {
  height: clamp(1.75rem, 4vw, 2.25rem);
  max-width: 200px;
}

/* —— Work detail (portfolio) pages —— */
.work-page {
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.work-page__hero {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 5vw, 3rem);
}

.work-page__back {
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.work-page__back a {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.work-page__back a:hover {
  color: var(--text);
}

.work-page__label {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.work-page__subtitle {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.work-page__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.work-page__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.work-embed-section {
  padding-top: 0;
}

.work-embed-section--hidden {
  display: none !important;
}

.work-embed {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
}

.work-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.work-embed__caption {
  max-width: 1100px;
  margin: 0.75rem auto 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.work-credits {
  max-width: 640px;
  margin: 0 auto;
}

.work-credits__title {
  margin: 0 0 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.work-credits__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-muted);
  white-space: pre-line;
}

.work-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.65rem, 2vw, 1rem);
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

@media (min-width: 768px) {
  .work-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.work-gallery__item {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.work-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.work-gallery__placeholder {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #1a1816, #0d0d0d);
}

.section.work-page__gallery-section {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.section.work-page__credits {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
}
