/* ============================================
   EMI PORTFOLIO — style.css
   Based on Figma design: emilija ziverte
   Font: Inter (loaded in index.html)
   ============================================ */

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

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: #f5f5f5;
  overflow: hidden;
}

/* ============================================
   PAGE ROUTING
   ============================================ */
.page {
  display: none;
  position: relative;
  width: 1440px;
  height: 900px;
  background-color: #ffffff;
  overflow: hidden;
}

.page.active {
  display: block;
}

/* ============================================
   NAVIGATION BAR  (shared across all pages)
   ============================================ */
nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background-color: rgba(30, 30, 30, 0.88);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}

.nav-logo {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  font-style: normal;
  line-height: normal;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-links a,
.nav-links .nav-current {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  cursor: pointer;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.92);
}

/* Active/current page label in nav */
.nav-current {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* "back" link — same style, sits at end of nav */
.nav-back {
  color: rgba(255, 255, 255, 0.52) !important;
}

.nav-back:hover {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* ============================================
   MAIN SCREEN
   ============================================ */

/* Hero background photo — full bleed, B&W */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  z-index: 0;
}

/* ── Floating Project Cards ── */
.project-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  cursor: pointer;
  z-index: 5;
}

.project-card img {
  display: block;
  object-fit: cover;
}

.project-card:hover img {
  opacity: 0.85;
}

.card-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

/* Individual card positions (from Figma) */
.card-aframe  { left: 68px;  top: 192px; width: 90px;  }
.card-aframe img  { width: 90px;  height: 90px;  }

.card-photos  { left: 865px; top: 130px; width: 84px;  }
.card-photos img  { width: 84px;  height: 84px;  }

.card-p5      { left: 958px; top: 210px; width: 88px;  }
.card-p5 img      { width: 88px;  height: 88px;  }

.card-gif     { left: 456px; top: 450px; width: 84px;  }
.card-gif img     { width: 84px;  height: 84px;  }

.card-graphic { left: 878px; top: 466px; width: 88px;  }
.card-graphic img { width: 88px;  height: 88px;  }

.card-glitch  { left: 180px; top: 530px; width: 84px;  }
.card-glitch img  { width: 84px;  height: 84px;  }

/* emi.ziverte signature */
.signature {
  position: absolute;
  left: 50%;
  top: 395px;
  transform: translateX(-50%);
  width: 148px;
  height: 48px;
  z-index: 5;
  pointer-events: none;
}

.signature img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Social Icons ── */
.social-icons {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 148px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 10;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.social-icons a:hover {
  opacity: 0.6;
}

.social-icons svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ============================================
   INNER PAGE SHARED STYLES
   ============================================ */
.page-content {
  position: absolute;
  top: 28px;      /* below nav bar */
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 32px 48px;
  background-color: #ffffff;
}

/* Scrollable modifier — already handled by overflow-y: auto */
.scrollable {
  overflow-y: auto;
}

/* Shared clickable image cursor */
.clickable-img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.clickable-img:hover {
  opacity: 0.85;
}

/* ── Generic inner image grid (a-frame, uni, personal, gif, glitch) ── */
.inner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: start;
}

.inner-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Full original image — no crop, no square forcing */
.full-images img {
  aspect-ratio: unset;
  object-fit: unset;
  height: auto;
}

/* ============================================
   GRAPHIC DESIGN MAIN
   ============================================ */
.graphic-content {
  display: flex;
  flex-direction: row;
  gap: 48px;
  align-items: flex-start;
  padding-top: 60px;
}

.project-folder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  width: fit-content;
}

.project-folder:hover .folder-thumb-grid img {
  opacity: 0.85;
}

.folder-thumb-grid {
  width: 620px;
}

.folder-thumb-grid img {
  width: 620px;
  height: 620px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.folder-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #111111;
  letter-spacing: 0.01em;
}

/* ============================================
   PHOTOS PAGE  (scrollable 2-column grid)
   ============================================ */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-content: start;
}

.photos-grid img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   ABOUT ME PAGE
   ============================================ */
.about-content {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  height: 100%;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
  min-width: 0;
  background: #e6e6e6;
  padding: 56px 64px;
  justify-content: center;
}

.about-greeting {
  font-family: 'Caveat', cursive;
  font-size: 78px;
  font-weight: 700;
  color: #e52b2b;
  line-height: 1;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  line-height: 1.75;
  text-align: right;
}

.about-photo-wrap {
  position: relative;
  width: 420px;
  flex-shrink: 0;
}

.about-name-overlay {
  position: absolute;
  left: -16px;
  top: 36%;
  font-family: 'Caveat', cursive;
  font-size: 72px;
  font-weight: 700;
  color: #e52b2b;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  cursor: default;
}

/* ============================================
   P5.JS PAGE
   ============================================ */
.p5js-content {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  padding-top: 40px;
}

.p5-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.p5-link:hover {
  opacity: 0.8;
}

.p5-thumb {
  width: 500px;
  height: 500px;
  object-fit: cover;
  display: block;
}

.p5-caption {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.38);
  letter-spacing: 0.01em;
}

/* ============================================
   A-FRAME PAGE
   ============================================ */
.aframe-page-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 48px;
  overflow-y: auto;
}

.aframe-project-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aframe-title {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #111111;
}

.aframe-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #444444;
  line-height: 1.6;
  max-width: 560px;
}

.aframe-open-btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  background-color: rgba(30, 30, 30, 0.88);
  padding: 6px 14px;
  text-decoration: none;
  letter-spacing: 0.02em;
  width: fit-content;
  transition: opacity 0.2s ease;
}

.aframe-open-btn:hover {
  opacity: 0.7;
}

.aframe-video-wrap {
  width: 100%;
  max-width: 860px;
}

.aframe-video {
  width: 100%;
  display: block;
  background: #000;
}

/* ============================================
   EDITORIAL GALLERY  (uni / personal)
   ============================================ */
.gallery-editorial {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

.gallery-editorial .gallery-main {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-side img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   GIF GRID  (gif-series page)
   ============================================ */
.gif-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-content: start;
}

.gif-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gif-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.gif-item figcaption {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.38);
  letter-spacing: 0.01em;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: default;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  cursor: default;
}

.lightbox-caption {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 1em;
}
