/* ============================================================
   Olivia Gazdag — Portfolio
   Step 1: 3D Glass Photo Panels in a circular ring
   Step 2: Continuous rotation + parallax + minimal white scene
   Step 3: Hover interaction (scale, glow, blur background)
   ============================================================ */

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
  /* Minimal white environment with very subtle warmth */
  background:
    radial-gradient(ellipse at 50% 30%, #ffffff 0%, #f6f5f2 55%, #ececea 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* -------------------- Header -------------------- */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 56px;
}
.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: #1a1a1a;
}
.nav {
  display: flex;
  gap: 32px;
}
.nav a {
  color: rgba(26, 26, 26, 0.7);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.nav a:hover {
  color: #000;
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 32px 60px;
  z-index: 1;
}

.hero-copy {
  text-align: center;
  max-width: 720px;
  margin-bottom: 8px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.45);
  margin: 0 0 18px;
}
.hero-copy h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
  color: #1a1a1a;
}
.lede {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.6);
  max-width: 520px;
  margin: 0 auto;
}

.hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.35);
  margin: 0;
}

/* -------------------- 3D Stage -------------------- */
.stage {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 620px;
  margin-top: 10px;
  /* Stronger perspective => more pronounced parallax/size differences */
  perspective: 1200px;
  perspective-origin: 50% 45%;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(-6deg) rotateY(0deg);
  animation: ring-spin 38s linear infinite;
  will-change: transform;
}

@keyframes ring-spin {
  from {
    transform: translate(-50%, -50%) rotateX(-6deg) rotateY(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotateX(-6deg) rotateY(360deg);
  }
}

.stage.dragging .ring {
  animation-play-state: paused;
}

/* Pause carousel rotation while hovering a panel — feels responsive */
.stage:has(.panel:hover) .ring {
  animation-play-state: paused;
}

/* soft floor reflection / light pool under the ring */
.floor-glow {
  position: absolute;
  left: 50%;
  bottom: 60px;
  width: 70%;
  height: 70px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(120, 130, 160, 0.22) 0%,
    rgba(120, 130, 160, 0.08) 40%,
    transparent 75%
  );
  filter: blur(22px);
  pointer-events: none;
}

/* -------------------- Photo Panels (frameless) -------------------- */
.panel {
  --h: 170px;
  --maxw: 90px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--maxw);
  height: var(--h);
  margin-top: calc(var(--h) / -2);
  margin-left: calc(var(--maxw) / -2);
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transform: rotateY(var(--angle)) translateZ(var(--radius))
    rotateX(var(--tilt, 0deg));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.45s ease;
  cursor: pointer;
}

.panel .photo {
  display: block;
  max-height: var(--h);
  max-width: var(--maxw);
  width: auto;
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(40, 50, 80, 0.22))
    drop-shadow(0 4px 8px rgba(40, 50, 80, 0.18));
  -webkit-user-drag: none;
  user-select: none;
}

/* -------------------- Hover Interaction -------------------- */
.panel:hover {
  transform: rotateY(var(--angle)) translateZ(var(--radius))
    rotateX(var(--tilt, 0deg)) translateZ(70px) scale(1.3);
  z-index: 10;
}

.panel:hover .photo {
  filter: drop-shadow(0 25px 35px rgba(40, 50, 80, 0.35))
    drop-shadow(0 8px 14px rgba(40, 50, 80, 0.25))
    drop-shadow(0 0 25px rgba(180, 200, 240, 0.55));
}

.stage:has(.panel:hover) .panel:not(:hover) {
  filter: blur(3px) brightness(0.95) saturate(0.92);
  opacity: 0.7;
}

/* -------------------- Lightbox -------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open {
  display: flex;
  animation: cv-fade 0.3s ease;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 18, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-img {
  position: relative;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  animation: cv-rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  z-index: 1;
  transition: background 0.2s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* -------------------- CV Modal -------------------- */
.cv-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.cv-modal.open {
  display: flex;
  animation: cv-fade 0.35s ease;
}
@keyframes cv-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 244, 240, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cv-sheet {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 56px 64px;
  box-shadow:
    0 30px 80px -20px rgba(40, 50, 80, 0.25),
    0 10px 30px -10px rgba(40, 50, 80, 0.15);
  animation: cv-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes cv-rise {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cv-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #777;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.cv-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
}

.cv-header {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cv-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 40px;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  color: #1a1a1a;
}
.cv-role {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6a6a6a;
  margin: 0;
}

.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 48px;
}

.cv-side .cv-block,
.cv-main .cv-block {
  margin-bottom: 28px;
}

.cv-block h3 {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0 0 12px;
  font-weight: 600;
}
.cv-block p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 10px;
  color: #2a2a2a;
}
.cv-block a {
  color: #2a2a2a;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.cv-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cv-block li {
  font-size: 14px;
  line-height: 1.55;
  color: #2a2a2a;
  position: relative;
  padding-left: 14px;
  margin-bottom: 6px;
}
.cv-block li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #999;
}

.cv-job {
  margin-bottom: 22px;
}
.cv-job h4 {
  font-size: 14px;
  margin: 0 0 2px;
  color: #1a1a1a;
  font-weight: 600;
}
.cv-date {
  font-size: 12px;
  color: #888;
  margin: 0 0 8px !important;
  letter-spacing: 0.04em;
}

body.cv-open {
  overflow: hidden;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 720px) {
  .site-header {
    padding: 20px 24px;
  }
  .nav {
    gap: 18px;
  }
  .stage {
    height: 460px;
  }
  .panel {
    --h: 150px;
  }
  .cv-sheet {
    padding: 48px 24px 36px;
    border-radius: 14px;
  }
  .cv-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cv-header h2 {
    font-size: 30px;
  }
}
