/* ================================================================
   COMPONENTS — Nav, Hero, Buttons, Cards, Gallery, Lightbox, Footer
   ================================================================ */

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), background-color var(--ease), backdrop-filter var(--ease);
}

/* Applied by JS on scroll */
.nav.scrolled {
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: opacity var(--ease);
}

.nav__logo:hover { opacity: 0.6; }

.nav__links {
  display: flex;
  gap: var(--sp-6);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav__links a { transition: color var(--ease); }
.nav__links a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  padding: clamp(7rem, 14vw, 11rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero__content > * {
  animation: heroFadeUp 0.7s ease forwards;
  opacity: 0;
}

.hero__eyebrow  { animation-delay: 0.05s; }
.hero__headline { animation-delay: 0.15s; }
.hero__bio      { animation-delay: 0.25s; }
.hero__actions  { animation-delay: 0.35s; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  letter-spacing: 0.02em;
}

.hero__headline {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--sp-5);
}

.hero__bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: var(--sp-7);
}

.hero__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
}

.btn--primary:hover { background: #ccc; }

.btn--ghost {
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
}

/* ── Project card ───────────────────────────────────────────── */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.project-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Optional image at top of card */
.project-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface-hover);
  margin-bottom: var(--sp-1);
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}

.project-card__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.project-card__links {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.project-card__link {
  color: var(--text-muted);
  transition: color var(--ease);
  display: flex;
  align-items: center;
  padding: 2px;
}

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

.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
}

.tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Gallery item ───────────────────────────────────────────── */
.gallery-item {
  cursor: zoom-in;
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--ease-slow), opacity var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.02);
  opacity: 0.88;
}

/* EXIF overlay — appears on hover */
.gallery-item__exif {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  line-height: 1.5;
  opacity: 0;
  transition: opacity var(--ease);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item:hover .gallery-item__exif {
  opacity: 1;
}

/* Lightbox EXIF bar */
.lightbox__exif {
  position: absolute;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[aria-hidden="true"] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90dvh;
  object-fit: contain;
  border-radius: var(--r-sm);
  user-select: none;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  padding: var(--sp-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); }

.lightbox__close { top: var(--sp-5); right: var(--sp-5); }
.lightbox__prev  { left: var(--sp-5); }
.lightbox__next  { right: var(--sp-5); }

/* Hide prev/next when only one photo */
.lightbox[data-count="1"] .lightbox__prev,
.lightbox[data-count="1"] .lightbox__next { display: none; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-7) 0;
  margin-top: var(--sp-6);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.footer__name { color: var(--text-muted); }

.footer__links {
  display: flex;
  gap: var(--sp-5);
  color: var(--text-muted);
}

.footer__links a { transition: color var(--ease); }
.footer__links a:hover { color: var(--text); }
