/* ============================================================
   ed3nCS Portfolio — styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@400;600;700&display=swap');

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

:root {
  --bg:        #0e0e0e;
  --surface:   #1a1a1a;
  --border:    #2a2a2a;
  --text:      #f0f0f0;
  --muted:     #888;
  --accent:    #7ecfcf;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

/* ── Page fade transition ─────────────────────────────────── */
body {
  animation: pageFadeIn 0.5s ease both;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ── Hide scrollbar, keep functionality ──────────────────── */
html, body {
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

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

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-signature {
  height: 38px;
  width: auto;
  display: block;
  /* PNG is white strokes — render correctly on dark bg */
  mix-blend-mode: screen;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: 220px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 28px;
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.nav-mobile a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--text); }

/* ── Page wrapper ─────────────────────────────────────────── */
.page {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
  min-height: 100vh;
}

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 40px 40px;
  justify-content: center;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--text); color: var(--text); }
.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ── Gallery — up to 3 columns, natural aspect ratios ─────── */
.gallery {
  columns: 3;
  column-gap: 12px;
  padding: 0 40px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background: var(--surface);

}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
}


/* Featured: spans all columns, explicit spacing top+bottom */
.gallery-item.featured {
  column-span: all;
  margin-top: 12px;
  margin-bottom: 12px;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.03);
  filter: brightness(1.08);
}

.gallery-item .item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.gallery-item:hover .item-overlay { opacity: 1; }

.item-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.3;
}

.item-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.65);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(6px);
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-media {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 4px;
  object-fit: contain;
}

.lightbox-info {
  text-align: center;
}
.lightbox-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.lightbox-info p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
  z-index: 201;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 3px;
  transition: background 0.2s;
  z-index: 201;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.16); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── Contact Page ─────────────────────────────────────────── */
.contact-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 40px;
  text-align: center;
}

.contact-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.1;
}

.contact-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 56px;
  max-width: 360px;
}

.contact-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: all 0.25s;
  min-width: 180px;
  justify-content: center;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(126,207,207,0.1);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Featured item — spans 2 columns */
.gallery-item.featured {
  column-span: all;
  width: 100%;
  break-inside: avoid;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery { columns: 2; }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile { display: block; }

  .gallery { columns: 2; padding: 0 16px; }
  .filter-bar { padding: 0 16px 32px; }
  .page { padding-top: calc(var(--nav-h) + 32px); }
}

@media (max-width: 480px) {
  .gallery { columns: 1; }
  .contact-links { flex-direction: column; align-items: stretch; }
  footer { flex-direction: column; gap: 8px; text-align: center; }
}
