:root {
  --bg: #08080b;
  --bg-elev: #131318;
  --bg-elev-2: #1a1a21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e9e9ee;
  --text-dim: #9a9aa3;
  --text-faint: #6b6b75;
  --accent: #6ee7d7;
  --accent-dim: rgba(110, 231, 215, 0.16);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(110, 231, 215, 0.08), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(120, 100, 255, 0.06), transparent 60%);
  z-index: 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

a:hover {
  color: #a7f3e7;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  position: relative;
  z-index: 1;
}

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

.site-header {
  padding: clamp(60px, 12vh, 140px) 0 clamp(48px, 10vh, 100px);
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.site-title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.site-role {
  margin: 12px 0 28px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-bio {
  margin: 0 0 32px;
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--text-dim);
}

.site-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.site-contact a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
  transition: background 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}

.site-contact a:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.site-contact a.contact-cta {
  background: var(--accent);
  color: #06231f;
  border-color: var(--accent);
}

.site-contact a.contact-cta:hover {
  background: #a7f3e7;
  border-color: #a7f3e7;
  color: #06231f;
}

/* ---------- Section heading ---------- */

.section-heading {
  margin: 0 0 36px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ---------- Project grid ---------- */

.projects {
  padding-bottom: clamp(80px, 14vh, 140px);
}

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}

.project-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 250ms var(--ease), transform 250ms var(--ease), box-shadow 250ms var(--ease);
}

.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ---------- Media area ---------- */

.project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.project-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease), filter 250ms var(--ease);
  filter: saturate(1.05);
}

/* For square / vertical clips (e.g. social-media trailers) — show whole frame letterboxed */
.project-video--contain {
  object-fit: contain;
}

.project-card:hover .project-video {
  transform: scale(1.02);
}

.project-card:hover .project-video--contain {
  transform: none;
}

.trailer-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(8, 8, 11, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

.trailer-btn:hover,
.trailer-btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #06231f;
  outline: none;
}

.trailer-btn__icon {
  font-size: 0.7rem;
  line-height: 1;
}

/* ---------- Project body ---------- */

.project-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags li {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
}

.project-description {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.97rem;
}

.project-links {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.project-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

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

.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-dim);
}

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

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}

.lightbox[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-video {
  width: 100%;
  max-width: 1280px;
  max-height: 90vh;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(20, 20, 24, 0.9);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

/* ---------- Focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile tweaks ---------- */

@media (max-width: 600px) {
  .site-header {
    padding-top: 56px;
  }
  .project-body {
    padding: 18px 18px 22px;
  }
  .lightbox-close {
    top: 14px;
    right: 14px;
  }
}
