/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --fg: #f5f5f5;
  --fg-dim: #a3a3a3;
  --accent: #e8e8e8;
  --border: rgba(255, 255, 255, 0.12);
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo span { color: var(--fg-dim); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -8px; left: 0; right: 0;
  height: 2px;
  background: var(--fg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--fg);
}

/* ---------- Hero video (top banner) ---------- */
.hero-video {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
  background: #000;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: auto;
}
.hero-video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 */
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: auto;
}
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}
.hero-video .hero-caption { z-index: 2; }

/* ---------- Hero caption (used over hero-video) ---------- */
.hero-caption {
  position: absolute;
  left: 32px;
  bottom: 64px;
  z-index: 2;
  max-width: 640px;
}
.hero-caption h1 {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.05;
}
.hero-caption p {
  margin-top: 14px;
  color: var(--fg-dim);
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* ---------- Category grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
}

.tile {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
}

.tile-media {
  position: absolute;
  inset: 0;
}
.tile-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease, transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.75);
}
.tile-media img.active { opacity: 1; }
.tile:hover .tile-media img.active {
  transform: scale(1.06);
  filter: brightness(0.5);
}

.tile-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-label span {
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}
.tile:hover .tile-label span { border-color: var(--fg); }

/* ---------- Section heading (used on inner pages) ---------- */
.section {
  padding: calc(var(--nav-h) + 56px) 0 80px;
}
.section-head {
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.section-head p {
  margin-top: 12px;
  color: var(--fg-dim);
  max-width: 640px;
}

/* ---------- Back link (project detail page) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--fg); }

/* ---------- Empty state ---------- */
.empty-state {
  color: var(--fg-dim);
}

/* ---------- Project grid (list of projects in a category) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  display: block;
}
.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  filter: brightness(0.85);
  transition: transform 0.5s ease, filter 0.3s ease;
}
.project-card:hover img {
  transform: scale(1.03);
  filter: brightness(0.65);
}
.project-card-caption {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.project-card-caption span {
  font-weight: 700;
  letter-spacing: 0.5px;
}
.project-card-caption small {
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Project video (detail page, top of content) ---------- */
.project-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  margin-bottom: 40px;
}
.project-video-wrap iframe,
.project-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

/* ---------- Simple photo grid (project/category pages) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.photo-grid figure {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
}
.photo-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s ease;
}
.photo-grid a:hover img,
.photo-grid img:hover { transform: scale(1.05); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
  color: var(--fg);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: rgba(0, 0, 0, 0.7); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
  color: var(--fg);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-nav:hover { background: rgba(0, 0, 0, 0.7); }
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

@media (max-width: 520px) {
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}

/* ---------- About page ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: start;
}
.about-portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-body p { margin-bottom: 18px; color: var(--fg-dim); max-width: 640px; }
.about-body h2 { margin-bottom: 20px; }

.contact-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-list a {
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}
.contact-list a:hover { color: var(--fg-dim); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: 0.5px;
}
.footer a { font-weight: 600; color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 32px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 0; width: 100%; }
  .nav-toggle { display: flex; }

  .grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .photo-grid { grid-template-columns: 1fr; }
  .hero-caption { left: 20px; bottom: 48px; }
  .hero-dots { right: 20px; bottom: 48px; }
}
