/* ============================================
   Portfolio — stile minimale fashion, ispirato al mockup
   ============================================ */

@font-face {
  font-family: 'Penna Swashes';
  src: url('../font/penna-swashes.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: #ffffff;
  color: #1a1a1a;
  font-family: Georgia, 'Times New Roman', serif;
  overflow-x: hidden;
}

/* ---------- Logo ---------- */

.logo-mark {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.logo-mark a {
  font-family: 'Penna Swashes', cursive;
  font-size: 42px;
  font-weight: 200;
  color: #1a1a1a;
  text-decoration: none;
  font-style: italic;
  letter-spacing: 1px;
}

.logo-mark .site-logo {
  display: block;
  width: auto;
  max-width: 90px;
  height: auto;
}


/* ---------- Nav menu ---------- */

.nav-toggle {
  display: none;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(320px, 78vw);
  background: none;
  border: none;
  z-index: 65;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
}

.site-nav.is-open {
  transform: translateX(0);
}

.site-nav ul {
  list-style: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.site-nav li {
  margin-bottom: 28px;
}

.site-nav a {
  font-family: 'Penna Swashes', cursive;
  font-weight: 300;
  font-style: italic;
  font-size: 34px;
  line-height: 1.1;
  color: rgba(26, 26, 26, 0.55);
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover {
  transform: scale(1.03);
  color: rgba(26, 26, 26, 0.75);
}

.site-nav a.active {
  color: #1a1a1a;
  opacity: 1;
}

/* Collection page: negative-contrast menu over images */
.collection .site-nav a {
  color: #ffffff; /* base color white will be inverted by mix-blend-mode */
  mix-blend-mode: difference;
  opacity: 1;
}

.collection .site-nav a:hover {
  color: #ffffff;
}

.collection .site-nav a.active {
  color: #ffffff;
}

/* ---------- Home / Gallery slider ---------- */

.gallery {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery::after {
  content: '';
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: #e0e0e0;
  border-radius: 1px;
}

.gallery-progress {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
  animation: progressBar 22s linear infinite;
  z-index: 10;
}

@keyframes progressBar {
  0% {
    width: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  100% {
    width: 80px;
    left: 50%;
    transform: translateX(-50%);
  }
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: 120px;
  will-change: transform;
}

.gallery-track.vertical {
  flex-direction: column;
}

.gallery-caption {
  position: absolute;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  font-size: clamp(12px, 1.1vw, 15px);
  font-style: italic;
  letter-spacing: 0.4px;
  color: rgba(18, 18, 18, 0.56);
  text-align: center;
  white-space: nowrap;
  z-index: 12;
  pointer-events: none;
}

.gallery-caption a {
  color: inherit;
  pointer-events: auto;
  text-decoration: none;
}

@media (max-width: 640px) {
  .gallery-progress {
    animation-duration: 8s;
  }

  .gallery-track {
    gap: 48px;
  }

  .gallery-caption {
    bottom: 96px;
    font-size: 12px;
    padding: 0 16px;
    white-space: normal;
  }
  
  #gallery .garment-item {
    width: min(220px, 78vw);
  }
}

#gallery .garment-item {
  flex: 0 0 auto;
  width: min(320px, 60vw);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.garment-item:hover {
  transform: scale(1.03);
}

.garment-item img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0%);
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.garment-item:hover img {
  filter: contrast(1.05);
}

.placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px dashed #cfcfcf;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b3b3b3;
  font-size: 18px;
  font-style: italic;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 48px;
  font-family: 'Cormorant Garamond', serif;
  color: #1a1a1a;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
  padding: 12px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.gallery-arrow:hover {
  opacity: 1;
}

.gallery-prev { left: 24px; }
.gallery-next { right: 24px; }

/* ---------- Collection / project pages ---------- */

.project-title {
  position: fixed;
  bottom: 40px;
  left: 40px;
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.5px;
  z-index: 20;
}

/* ---------- About page ---------- */

.about-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 160px 24px 120px;
}

.about-page p {
  font-size: 12px;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 24px;
}

/* ---------- CV / timeline page ---------- */

.cv-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 160px 24px 120px;
}

.cv-entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #eaeaea;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 300;
}

.cv-entry .cv-role {
  font-style: italic;
}

.cv-entry .cv-dates {
  color: #777;
  font-size: 15px;
  white-space: nowrap;
  margin-left: 24px;
}

/* ---------- Development and CV status pages ---------- */

.coming-soon-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 48px;
}

.coming-soon-page p {
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.2;
  color: #222;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .logo-mark {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  .logo-mark a { font-size: 34px; }

  .nav-toggle {
    display: flex;
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 70;
    width: 36px;
    height: 26px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
  }

  .nav-toggle span {
    display: block;
    height: 1px;
    width: 100%;
    background: #1a1a1a;
  }

  .site-nav {
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    border: none;
    padding: 0 24px;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .site-nav li {
    margin-bottom: 24px;
  }

  .site-nav a {
    font-size: 38px;
  }

  /* On mobile, ensure collection page nav text remains dark like index */
  .collection .site-nav a {
    color: rgba(26,26,26,0.95);
    mix-blend-mode: normal;
  }

  .gallery {
    padding: 92px 0 40px;
  }

  .gallery-track {
    flex-direction: column;
    gap: 48px;
  }

  .garment-item {
    width: min(320px, 82vw);
  }

  .about-page, .cv-page { padding-top: 120px; }
}

/* Desktop-only: subtle separation for open nav */
@media (min-width: 641px) {
  .site-nav.is-open {
    border-right: none;
  }

  .home .site-nav a {
    color: #ffffff;
    mix-blend-mode: difference;
    opacity: 1;
  }

  .home .site-nav a:hover,
  .home .site-nav a.active {
    color: #ffffff;
  }
}

/* ---------- Intro overlay (opening animation) ---------- */
.intro-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1), transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-logo {
  width: min(78vw, 520px);
  max-height: 70vh;
  height: auto;
  display: block;
  transform-origin: center center;
  object-fit: contain;
  opacity: 1;
  transform: scale(1);
  transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1), transform 850ms cubic-bezier(0.22, 1, 0.36, 1), filter 850ms ease;
}

.intro-overlay.is-fading {
  opacity: 0;
  transform: scale(0.992);
}

.intro-logo.is-fading {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(0.4px);
}

.intro-logo-fallback {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes intro-fade {
  0% {
    opacity: 1;
    transform: none;
  }
  60% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(0.96);
    visibility: hidden;
  }
}

@media (max-width: 640px) {
  .intro-logo {
    width: min(86vw, 360px);
    max-height: 52vh;
  }
}

