/* ============================================
   SARAH MICHALSKA - PORTFOLIO
   style.css
   ============================================ */

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

:root {
  --cream: #F0EDE8;
  --ink: #1a1917;
  --ink-light: #6b6860;
  --accent: #c8c4bd;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  overflow-x: hidden;
}

/* ============================================
   CURSOR
   ============================================ */

.cursor {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, background 0.15s, border 0.15s;
}

.cursor.big {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
}

.cursor.dark {
  background: var(--ink);
}

.cursor.dark.big {
  background: transparent;
  border-color: var(--ink-light);
}

/* ============================================
   NAV
   ============================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2.5rem;
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: #fff;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 1px;
}

/* Nav dark mode - all pages except home */
nav.dark {
  background: var(--cream);
  border-bottom: 0.5px solid var(--accent);
}

nav.dark .nav-logo {
  color: var(--ink);
}

nav.dark .nav-links a {
  color: var(--ink-light);
}

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

nav.dark .nav-links a.active {
  border-bottom-color: var(--ink);
}

/* ============================================
   SECTIONS
   Each page now has exactly one section - no
   show/hide toggling needed, it's just visible
   ============================================ */

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 0.55s ease forwards;
}

.d1 { animation-delay: 0.06s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.3s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   HOME
   ============================================ */

#home {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #1c1a18;
}

.hero-bg picture {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* Stack + text row, both vertically centred */
.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-left: 6vw;
  gap: 7rem;
}

/* Vertical rolodex stack */
.rolodex {
  position: relative;
  width: 40vw;
  max-width: 620px;
  height: 78vh;
  flex-shrink: 0;
  overflow: visible;
}

/* All cards identical size - only transform changes between states.
   No height animation = no open/close effect */
.rolodex-card {
  position: absolute;
  left: 0;
  top: 19%;
  width: 100%;
  height: 62%;
  background: #2a2825;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  opacity: 1;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  will-change: transform;
}

.rolodex-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* serif number beside the active image */
.card-num {
  position: absolute;
  top: 0;
  right: -3.8rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.4s;
}

.rolodex-card.active .card-num {
  opacity: 1;
  transition: opacity 0.4s 0.3s;
}

/* main image - full size, centred */
.rolodex-card.active {
  transform: translateY(0) scale(1);
  z-index: 10;
  pointer-events: auto;
}

/* above - 20% smaller, slides up, stays horizontally centred */
.rolodex-card.stack-prev {
  transform: translateY(-92%) scale(0.8);
  z-index: 5;
}

/* below - 20% smaller, slides down, stays horizontally centred */
.rolodex-card.stack-next {
  transform: translateY(92%) scale(0.8);
  z-index: 5;
}

/* parked cards - continue off-screen in their direction so they
   scroll in/out smoothly rather than popping */
.rolodex-card.park-prev {
  transform: translateY(-184%) scale(0.8);
  z-index: 1;
}

.rolodex-card.park-next {
  transform: translateY(184%) scale(0.8);
  z-index: 1;
}

/* Hero name + tagline */
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-text .tagline {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  line-height: 2;
}

/* static overlay footer - home only, no animation */
.home-overlay-footer {
  position: absolute;
  bottom: 1.6rem;
  right: 2.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.home-overlay-footer span {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.home-overlay-footer a {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
  display: flex;
}

.home-overlay-footer a:hover {
  color: #fff;
}

.home-overlay-footer svg {
  width: 15px;
  height: 15px;
}

/* ============================================
   GALLERY PAGES - SHARED
   ============================================ */

.gallery-page {
  padding: 6.5rem 2.5rem 4rem;
  min-height: 100vh;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 0.5px solid var(--accent);
  padding-bottom: 1rem;
  margin-bottom: 4rem;
}

.page-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.7rem;
  color: var(--ink);
}

.page-header span {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* SEO copy block - short paragraph under the page header */
.page-intro {
  max-width: 560px;
  margin: -2rem 0 4rem;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  line-height: 2.1;
  letter-spacing: 0.02em;
  color: var(--ink-light);
}

.gallery-item {
  position: relative;
  background: #1e1c1a;
  cursor: pointer;
  counter-increment: gal;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* serif number beside each image */
.gallery-item::before {
  content: "(" counter(gal, decimal-leading-zero) ")";
  position: absolute;
  top: 0;
  left: -3.6rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-light);
}

.gallery-item:hover .g-overlay {
  opacity: 1;
}

.g-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 0.8rem;
}

.g-overlay span {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   FASHION GALLERY
   Dense editorial scatter - 2 to 3 images visible
   per viewport, staggered left / centre / right
   ============================================ */

#gallery-fashion {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  padding: 2rem 0 8rem;
  counter-reset: gal;
}

#gallery-fashion .gallery-item:nth-child(6n+1) { width: 48%; align-self: flex-start; margin-left: 8%;  aspect-ratio: 3 / 2; height: auto; }
#gallery-fashion .gallery-item:nth-child(6n+2) { width: 26%; align-self: flex-end;   margin-right: 12%; aspect-ratio: 2 / 3; height: auto; margin-top: -14vh; }
#gallery-fashion .gallery-item:nth-child(6n+3) { width: 44%; align-self: center;     aspect-ratio: 3 / 2; height: auto; }
#gallery-fashion .gallery-item:nth-child(6n+4) { width: 30%; align-self: flex-start; margin-left: 16%; aspect-ratio: 2 / 3; height: auto; margin-top: -10vh; }
#gallery-fashion .gallery-item:nth-child(6n+5) { width: 52%; align-self: flex-end;   margin-right: 6%;  aspect-ratio: 3 / 2; height: auto; }
#gallery-fashion .gallery-item:nth-child(6n+6) { width: 24%; align-self: center;     margin-left: -20%; aspect-ratio: 2 / 3; height: auto; margin-top: -12vh; }

/* ============================================
   TRAVEL GALLERY
   Different rhythm - wide landscape crops
   alternating with tall portraits, more open
   ============================================ */

#gallery-travel {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  padding: 2rem 0 8rem;
  counter-reset: gal;
}

#gallery-travel .gallery-item:nth-child(4n+1) { width: 62%; align-self: flex-start; margin-left: 6%;  aspect-ratio: 16 / 10; height: auto; }
#gallery-travel .gallery-item:nth-child(4n+2) { width: 28%; align-self: flex-end;   margin-right: 10%; aspect-ratio: 2 / 3; height: auto; margin-top: -14vh; }
#gallery-travel .gallery-item:nth-child(4n+3) { width: 56%; align-self: center;     aspect-ratio: 16 / 10; height: auto; }
#gallery-travel .gallery-item:nth-child(4n+4) { width: 32%; align-self: flex-start; margin-left: 14%; aspect-ratio: 2 / 3; height: auto; }

/* ============================================
   ABOUT
   Acne-style: narrow stacked image column,
   copy block to the right
   ============================================ */

#about {
  padding: 8rem 8vw 6rem;
  min-height: 100vh;
}

.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8rem;
  align-items: start;
}

/* stacked centred column of portraits */
.about-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7rem;
}

.about-img {
  width: 68%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  background: #1e1c1a;
  overflow: hidden;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* copy block - sticky so it stays alongside while images scroll */
.about-copy {
  position: sticky;
  top: 9rem;
  padding-top: 1rem;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.8rem;
}

.about-copy h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 2rem;
}

.about-copy p {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  line-height: 2.1;
  color: var(--ink-light);
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
  max-width: 380px;
}

.about-list {
  margin-top: 2.5rem;
  border-top: 0.5px solid var(--accent);
  max-width: 380px;
}

.about-row {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 0.5px solid var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-row span:first-child { color: var(--ink-light); }
.about-row span:last-child  { color: var(--ink); }

/* ============================================
   CONTACT
   ============================================ */

#contact {
  padding: 6.5rem 2.5rem 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-wrap {
  width: 100%;
  max-width: 640px;
}

.contact-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.8rem;
  display: block;
}

.contact-heading {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 3.5rem;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
  border-bottom: 0.5px solid var(--accent);
  cursor: pointer;
  transition: padding-left 0.2s;
  text-decoration: none;
  color: inherit;
}

.contact-row:first-of-type {
  border-top: 0.5px solid var(--accent);
}

.contact-row:hover {
  padding-left: 0.4rem;
}

.cr-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.cr-val {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--ink);
}

.cr-arrow {
  font-size: 13px;
  color: var(--ink-light);
  transition: transform 0.2s;
}

.contact-row:hover .cr-arrow {
  transform: translateX(4px);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 1.4rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 0.5px solid var(--accent);
}

.footer-left {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  text-transform: uppercase;
}

.ig-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border: 0.5px solid var(--accent);
  padding: 8px 14px;
  transition: border-color 0.2s;
  cursor: pointer;
}

.ig-btn:hover {
  border-color: var(--ink);
}

.ig-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* touch devices - no mouse, so hide the custom cursor */
@media (hover: none) {
  .cursor {
    display: none;
  }
}

@media (max-width: 768px) {
  .about-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-copy {
    position: static;
  }

  /* single image only on mobile */
  .about-images .about-img:nth-child(2),
  .about-images .about-img:nth-child(3) {
    display: none;
  }

  .about-img {
    width: 100%;
    max-width: 420px;
  }

  #gallery-fashion .gallery-item:nth-child(n),
  #gallery-travel .gallery-item:nth-child(n) {
    width: 82%;
    align-self: center;
    margin: 0;
    aspect-ratio: auto;
    height: auto;
  }

  #gallery-fashion,
  #gallery-travel {
    gap: 3.5rem;
  }

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

@media (max-width: 480px) {
  /* NAV - tighter so logo and links don't collide */
  nav {
    padding: 1.1rem 1.2rem;
  }

  .nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.7;
}

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  /* HOME - vertical layout: stack centred, name below */
  #home {
    height: 100svh;
  }

  .hero-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 9rem;
    gap: 2rem;
  }

  .rolodex {
    width: 72vw;
    max-width: none;
    height: 44vh;
    touch-action: none; /* swipe drives the stack, not page scroll */
  }

  /* tighter travel distances so prev/next peek without flying off */
  .rolodex-card.stack-prev {
    transform: translateY(-78%) scale(0.8);
  }

  .rolodex-card.stack-next {
    transform: translateY(78%) scale(0.8);
  }

 .rolodex-card.park-prev {
    transform: translateY(-260%) scale(0.8);
    opacity: 0;
  }

  .rolodex-card.park-next {
    transform: translateY(260%) scale(0.8);
    opacity: 0;
  }

  .card-num {
    right: -2.6rem;
    font-size: 12px;
  }

  .hero-text {
    position: absolute;
    bottom: 3.2rem;
    left: 1.4rem;
    text-align: left;
    align-items: flex-start;
  }

  .hero-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }

  .hero-text .tagline {
    font-size: 8px;
  }

  .home-overlay-footer {
    bottom: 1rem;
    right: 1.2rem;
    gap: 1rem;
  }

  .home-overlay-footer span {
    font-size: 8px;
  }

  /* GALLERIES */
  .gallery-page {
    padding: 5.5rem 1.4rem 3rem;
  }

  #gallery-fashion .gallery-item:nth-child(n),
  #gallery-travel .gallery-item:nth-child(n) {
    width: 100%;
  }

  .page-intro {
    margin: -1.5rem 0 2.5rem;
  }

  /* ABOUT + CONTACT */
  #about {
    padding: 6rem 1.4rem 3rem;
  }

  #contact {
    padding: 6rem 1.4rem 3rem;
  }
}