/* =============================================
   SABINA VESTEMAN — Portfolio
   Dark Stage Design System
   ============================================= */

/* ---------- Custom Properties ---------- */
:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --accent: #00e5ff;
  --accent-deep: #1a237e;
  --accent-glow: #00fff0;
  --text: #f5f5f5;
  --text-muted: #888888;
  --mono: 'Outfit', 'SF Mono', 'Fira Code', monospace;
  --sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Outfit', sans-serif;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--sans);
  font-weight: 300;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

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

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Firefox */
html {
  scrollbar-color: #333 #111;
  scrollbar-width: thin;
}

/* ---------- Focus Styles ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* ---------- Section ---------- */
.section {
  padding: clamp(4rem, 10vh, 8rem) 0;
}

.section__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: clamp(2rem, 5vh, 4rem);
  color: var(--text);
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-top: 1rem;
}

/* =============================================
   LANGUAGE TOGGLE
   ============================================= */
.lang-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.lang-toggle:hover {
  background: var(--accent);
  color: var(--bg);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10vh;
  padding-bottom: 6vh;
  text-align: center;
  overflow: hidden;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
}

.hero-wrap__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 10, 10, 0.65) 0%, rgba(10, 10, 10, 0.45) 40%, rgba(10, 10, 10, 0.7) 100%),
    url('../img/hero-bg.webp') calc(50% - 15px) 14px / 100% auto no-repeat;
  filter: saturate(0.3);
  transform: scale(1.02) translateY(0);
  will-change: transform;
  pointer-events: none;
}

.hero-wrap__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 10, 10, 0.65) 0%, rgba(10, 10, 10, 0.45) 40%, rgba(10, 10, 10, 0.7) 100%),
    url('../img/hero-bg-blur.webp') calc(50% - 15px) 14px / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 55%);
  mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 55%);
}

.hero-wrap__bubbles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hero-wrap .hero,
.hero-wrap #about {
  position: relative;
  z-index: 2;
}

.hero-wrap #works {
  position: relative;
  z-index: 2;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: 0 1rem;
}

.hero__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 1), 0 0 60px rgba(0, 0, 0, 0.8), 0 0 120px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-family: var(--mono);
  font-size: clamp(0.65rem, 1.5vw, 0.9rem);
  color: var(--accent);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: 0 1px 15px rgba(0, 0, 0, 1), 0 0 50px rgba(0, 0, 0, 0.8), 0 0 100px rgba(0, 0, 0, 0.5);
}

.hero__tagline {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--text);
  font-style: italic;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 15px rgba(0, 0, 0, 1), 0 0 50px rgba(0, 0, 0, 0.8);
  opacity: 0.9;
}

.hero__blurb {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text);
  max-width: 600px;
  margin: 1.5rem auto 2rem;
  line-height: 1.7;
  opacity: 0.85;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 1), 0 0 40px rgba(0, 0, 0, 0.7);
}

.hero__cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.hero__cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

#works {
  background: rgba(10, 10, 10, 0.88);
  padding-top: clamp(2rem, 5vh, 4rem);
}

/* =============================================
   WORKS GRID
   ============================================= */
.works__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ---------- Work Card ---------- */
.work-card {
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  will-change: transform;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0, 229, 255, 0.12), 0 0 0 1px rgba(0, 229, 255, 0.08);
}

.work-card__image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  background: #0d0d0d;
}

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.work-card:hover .work-card__img {
  transform: scale(1.05);
}

.work-card__role {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
}

.work-card__info {
  padding: 1.25rem 1.25rem 1.5rem;
}

.work-card__title {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.work-card__author {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.work-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.work-card__collab {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.35rem;
}

.work-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
  text-transform: uppercase;
  border-radius: 2px;
}

.badge--accent {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent);
}

/* =============================================
   FILM SECTION
   ============================================= */
.film__feature {
  display: flex;
  gap: 3rem;
  align-items: stretch;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
}

.film__visual {
  flex: 0 0 45%;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.film__visual-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d0d0d, var(--accent-deep), #0d0d0d);
  display: flex;
  align-items: center;
  justify-content: center;
}

.film__year {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 8vw, 8rem);
  color: var(--accent);
  opacity: 0.12;
  letter-spacing: 0.1em;
  user-select: none;
}

.film__details {
  flex: 1;
  padding: 2.5rem 2.5rem 2.5rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.film__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.film__genre {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.film__info-list {
  margin-bottom: 2rem;
}

.film__info-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  align-items: baseline;
}

.film__info-row dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 80px;
}

.film__info-row dd {
  font-size: 1rem;
  color: var(--text);
}

.film__status {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  border-radius: 2px;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about__bio {
  max-width: 800px;
  margin-bottom: 3rem;
}

.about__text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  text-shadow: 0 1px 15px rgba(0, 0, 0, 1), 0 0 40px rgba(0, 0, 0, 0.7), 0 0 80px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.25rem;
}

.about__text:last-child {
  margin-bottom: 0;
}

/* Stats */
.about__stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2.5rem 0;
  margin-bottom: 3rem;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat__number {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  line-height: 1;
}

.stat__label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Columns */
.about__columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.about__col-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  color: var(--accent);
}

.about__col-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.about__col-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about__col-list li {
  font-size: 0.9rem;
  color: var(--text);
  padding: 0.25rem 0;
  border-bottom: 1px solid #1a1a1a;
}

.about__col-list li:last-child {
  border-bottom: none;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact__links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.contact__link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 229, 255, 0.04);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.08);
}

.contact__icon {
  flex-shrink: 0;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid #1a1a1a;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.footer__accent {
  color: var(--accent);
}

/* =============================================
   GALLERY (grid with hover-to-enlarge)
   ============================================= */
.gallery {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
  overflow-y: auto;
  padding: 5rem 2rem 2rem;
}

.gallery[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.gallery__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text);
  z-index: 2001;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.gallery__close:hover {
  color: var(--accent);
}

/* Title bar */
.gallery__title-bar {
  position: fixed;
  top: 1.5rem;
  left: 2rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  z-index: 2001;
}

/* Grid */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery__grid[data-count="1"] {
  grid-template-columns: 1fr;
  max-width: 900px;
}

.gallery__grid[data-count="few"] {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Gallery items */
.gallery__item {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  cursor: default;
  transition: transform 0.4s var(--ease-spring), z-index 0s;
}

.gallery__item:hover {
  transform: scale(1.8);
  z-index: 10;
  transition: transform 0.4s var(--ease-spring), z-index 0s;
}

.gallery__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 3px;
  transition: box-shadow 0.3s var(--ease-out);
}

.gallery__item:hover .gallery__thumb {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 229, 255, 0.15);
}

/* Gallery count badge on cards */
.work-card__gallery-count {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent);
  border-radius: 2px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.work-card__gallery-count::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent);
  border-radius: 1px;
  margin-right: 0.35rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* =============================================
   LIGHTBOX (fullscreen single image)
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}

.lightbox--open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 2px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  color: var(--text);
  z-index: 3001;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.lightbox__close:hover {
  color: var(--accent);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--text);
  z-index: 3001;
  width: 60px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  user-select: none;
}

.lightbox__nav:hover {
  color: var(--accent);
}

.lightbox__nav--prev {
  left: 0.5rem;
}

.lightbox__nav--next {
  right: 0.5rem;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* Staggered delays for grid items */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
.reveal[data-delay="6"] { transition-delay: 0.48s; }
.reveal[data-delay="7"] { transition-delay: 0.56s; }
.reveal[data-delay="8"] { transition-delay: 0.64s; }
.reveal[data-delay="9"] { transition-delay: 0.72s; }
.reveal[data-delay="10"] { transition-delay: 0.80s; }
.reveal[data-delay="11"] { transition-delay: 0.88s; }
.reveal[data-delay="12"] { transition-delay: 0.96s; }
.reveal[data-delay="13"] { transition-delay: 1.04s; }
.reveal[data-delay="14"] { transition-delay: 1.12s; }
.reveal[data-delay="15"] { transition-delay: 1.20s; }
.reveal[data-delay="16"] { transition-delay: 1.28s; }

/* =============================================
   BODY SCROLL LOCK (lightbox)
   ============================================= */
body.no-scroll {
  overflow: hidden;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet & below */
@media (max-width: 1024px) {
  .about__columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .about__columns .about__col:last-child {
    grid-column: 1 / -1;
  }

  .film__feature {
    gap: 2rem;
  }

  .film__visual {
    flex: 0 0 40%;
    min-height: 280px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-wrap__bg {
    background-size: 250% auto;
    background-position: 55% top;
  }

  .hero-wrap__bg::after {
    background-size: 250% auto;
    background-position: 55% top;
  }

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

  .film__feature {
    flex-direction: column;
  }

  .film__visual {
    flex: none;
    min-height: 200px;
  }

  .film__details {
    padding: 2rem;
  }

  .about__columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__columns .about__col:last-child {
    grid-column: auto;
  }

  .about__stats {
    gap: 2rem;
  }

  .contact__links {
    flex-direction: column;
  }

  .contact__link {
    justify-content: center;
  }

  .hero__scroll-indicator {
    bottom: 1.5rem;
  }

  .gallery {
    padding: 4rem 1rem 1rem;
  }

  .gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
  }

  .gallery__item:hover {
    transform: scale(1.5);
  }

  /* Reduce stagger on mobile for faster feel */
  .reveal[data-delay] {
    transition-delay: 0s !important;
  }
}

/* Large desktop */
@media (min-width: 1025px) {
  .works__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Between tablet and desktop: 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .works__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
