/* ============================================
   Oded Bengigi — Portfolio Styles
   ============================================ */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --text-dim: #666666;
  --accent: #e0a040;
  --accent-bright: #f0b860;
  --accent-glow: rgba(224, 160, 64, 0.2);
  --surface-border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --nav-height: 72px;
  --container: 1100px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ─────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-border);
}
.nav__container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__logo-img {
  height: 36px;
  width: auto;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__link:hover { color: var(--text); }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(224, 160, 64, 0.06) 0%, transparent 70%);
}
.hero__logo {
  height: 80px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 24px rgba(224, 160, 64, 0.3));
}
.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.hero__tags {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.hero__tag {
  padding: 6px 16px;
  background: rgba(224, 160, 64, 0.1);
  border: 1px solid rgba(224, 160, 64, 0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero__email {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.hero__email:hover { color: var(--accent-bright); }

/* ── Section Header ─────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header__tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(224, 160, 64, 0.1);
  border: 1px solid rgba(224, 160, 64, 0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-header__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Gallery ────────────────────────────── */
.gallery {
  padding: 24px 0 80px;
}

/* Filter tabs */
.gallery__filters {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.gallery__filter {
  padding: 7px 18px;
  border: none;
  background: none;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.gallery__filter:hover { color: var(--text); }
.gallery__filter.active {
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid rgba(224, 160, 64, 0.2);
}

/* Grid */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Gallery card */
.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  aspect-ratio: 4 / 3;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}
.gallery__item:hover img {
  transform: scale(1.06);
}
/* Overlay */
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery__item:hover::after {
  opacity: 1;
}
.gallery__item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 2;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.3s ease;
}
.gallery__item:hover .gallery__item-info {
  transform: translateY(0);
  opacity: 1;
}
.gallery__item-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.gallery__item-cat {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Video play indicator */
.gallery__item--video::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(224, 160, 64, 0.9);
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpolygon points='9.5,7.5 16.5,12 9.5,16.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  transition: transform 0.3s, background-color 0.3s;
}
.gallery__item--video:hover::before {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: rgba(224, 160, 64, 1);
}

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.gallery__item {
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Lightbox ───────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}
.lightbox.active {
  visibility: visible;
  pointer-events: auto;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
}
.lightbox.active .lightbox__backdrop {
  opacity: 1;
}
.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.active .lightbox__content {
  opacity: 1;
  transform: scale(1);
}
.lightbox__content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lightbox__content iframe {
  width: 80vw;
  height: 45vw;
  max-height: 75vh;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox__title {
  text-align: center;
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--surface-border);
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.footer__link {
  color: var(--accent);
  font-size: 0.8rem;
  transition: color 0.2s;
}
.footer__link:hover { color: var(--accent-bright); }

/* ── Responsive ─────────────────────────── */
@media (max-width: 700px) {
  .nav__links { display: none; }
  .nav__links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--surface-border);
  }
  .nav__toggle { display: flex; }
  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery__item { aspect-ratio: 1; }
  .lightbox__content iframe {
    width: 95vw;
    height: 54vw;
  }
}
@media (max-width: 400px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }
}
