@font-face {
  font-family: 'Nebulica';
  src: url('assets/Nebulica-ExtraBold.ttf') format('truetype');
  font-weight: 800;
}

@font-face {
  font-family: 'Nebulica';
  src: url('assets/Nebulica-Medium.ttf') format('truetype');
  font-weight: 500;
}

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

:root {
  --accent: transparent;
  --accent-left: #7C2FFF;
  --accent-right: #FF2200;
  --bg: #A749FF;
  --text: #ffffff;
  --transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ─── SCENE ─────────────────────────────────────────────────── */
.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  transition: background var(--transition);
}

/* ─── NOISE TEXTURE ─────────────────────────────────────────── */
.noise {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ─── PORTFOLIO TEXT ─────────────────────────────────────────── */
.portfolio-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  display: flex;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.portfolio-text svg {
  width: 100%;
  height: 100%;
  color: rgba(18, 18, 18, 0.1);
  transition: color var(--transition);
}

.scene.hover-left  .portfolio-text svg { color: #A749FF; }
.scene.hover-right .portfolio-text svg { color: #F71D00; }

/* ─── PHOTO ──────────────────────────────────────────────────── */
.photo-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  z-index: 5;
  pointer-events: none;
}

.photo {
  width: auto;
  height: 100%;
  display: block;
}

.scene.hover-left  .photo { transform: scaleX(-1); }
.scene.hover-right .photo { transform: scaleX(1); }

/* Placeholder when no photo exists */
.photo-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-family: 'Nebulica', sans-serif;
  font-size: 48px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.05);
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* show placeholder if photo fails to load */
.photo.error + .photo-placeholder,
.photo-wrap:not(:has(.photo[src])) .photo-placeholder {
  display: flex;
}

/* ─── GLOW ───────────────────────────────────────────────────── */
.glow {
  position: absolute;
  bottom: 0;
  width: 50%;
  height: 55%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 50%;
  filter: blur(80px);
}

.glow--left {
  left: -10%;
  background: radial-gradient(ellipse at bottom left, var(--accent-left), transparent 70%);
}

.glow--right {
  right: -10%;
  background: radial-gradient(ellipse at bottom right, var(--accent-right), transparent 70%);
}

.scene.hover-left,
.scene.hover-right {
  background: #0a0a0a;
}

.scene.hover-left .glow--left  { opacity: 0.45; }
.scene.hover-right .glow--right { opacity: 0.45; }

/* ─── BOTTOM HALF ────────────────────────────────────────────── */
.bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  display: flex;
  align-items: stretch;
  z-index: 6;
  /* dark overlay on bottom so text is always readable */
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.0) 100%);
}

/* ─── PANELS ─────────────────────────────────────────────────── */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 44px 36px;
  cursor: pointer;
  gap: 10px;
  position: relative;
}

.panel--right {
  align-items: flex-end;
  text-align: right;
}

.panel__arrow {
  font-size: 22px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.3s, transform 0.3s;
  position: absolute;
  top: 28px;
}

.panel--left  .panel__arrow { left: 44px; }
.panel--right .panel__arrow { right: 44px; }

.panel:hover .panel__arrow {
  opacity: 1;
  transform: translate(3px, -3px);
}

.panel__title {
  font-family: 'Nebulica', sans-serif;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0.35;
  transition: opacity var(--transition), color var(--transition);
}

.panel--left:hover  .panel__title { opacity: 1; color: #fff; }
.panel--right:hover .panel__title { opacity: 1; color: #fff; }

/* ─── DOWNLOAD BUTTON ───────────────────────────────────────── */
.btn-pdf {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 22px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.panel--left:hover  .btn-pdf,
.panel--right:hover .btn-pdf {
  border-color: rgba(255,255,255,0.9);
  color: #fff;
}

/* ─── CENTER SOCIAL + DIVIDER ────────────────────────────────── */
.bottom__center {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 36px;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.bottom__center a {
  position: relative;
  z-index: 100;
  pointer-events: auto;
}

.divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}


/* ─── LOGO WRAP ──────────────────────────────────────────────── */
.logo-wrap {
  position: absolute;
  top: 10%;
  right: 10%;
  z-index: 20;
  pointer-events: none;
}

.logo {
  height: 44px;
  width: auto;
}

/* ─── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Dark background by default on mobile */
  .scene {
    background: #0a0a0a;
  }

  /* PORTFOLIO text: always purple, cover full photo area */
  .portfolio-text {
    height: 65%;
    align-items: flex-start;
  }

  .portfolio-text svg {
    color: #A749FF;
    height: auto;
  }

  /* Photo: full width, same height as text area */
  .photo-wrap {
    width: 100%;
    height: 65%;
    top: 20%;
  }

  .photo {
    object-fit: cover;
    object-position: center center;
  }

  /* Logo: centered at top on mobile */
  .logo-wrap {
    top: 20px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Bottom: stacked column, fixed height at bottom */
  .bottom {
    height: 35%;
    flex-direction: column;
    background: rgba(0,0,0,0.88);
  }

  /* Panels: full-width row with title left, button right */
  .panel {
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.15);
    gap: 0;
  }

  .panel--right {
    align-items: center;
    text-align: left;
  }

  /* Fix order: CREATIVE → PHOTOGRAPHY → social */
  .panel--left   { order: 1; }
  .panel--right  { order: 2; }
  .bottom__center { order: 3; }

  .panel__arrow {
    display: none;
  }

  .panel__title {
    font-size: clamp(22px, 7vw, 32px);
    opacity: 1;
  }

  /* Circular ↓ button */
  .btn-pdf {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-pdf::before {
    content: '↓';
    font-size: 18px;
    color: rgba(255,255,255,0.7);
  }

  /* Social row: centered, at bottom */
  .bottom__center {
    flex: 1;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    gap: 16px;
  }

  .divider-line {
    display: none;
  }
}

/* ─── PDF OVERLAY ────────────────────────────────────────────── */
.pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pdf-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.pdf-overlay__close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.pdf-overlay__close:hover { opacity: 1; }

.pdf-overlay__frame {
  width: min(90vw, 960px);
  height: 90vh;
  border: none;
  border-radius: 4px;
}
