/* ==========================================================================
   GONE_DALI — Portfolio Stylesheet
   ========================================================================== */

:root {
  --grad-bg: radial-gradient(ellipse 70% 40% at 30% 8%, rgba(58,127,245,0.55), transparent 65%),
             radial-gradient(ellipse 80% 35% at 75% 22%, rgba(255,45,138,0.45), transparent 65%),
             radial-gradient(ellipse 90% 45% at 20% 42%, rgba(120,180,255,0.45), transparent 65%),
             radial-gradient(ellipse 75% 40% at 80% 58%, rgba(255,105,170,0.50), transparent 65%),
             radial-gradient(ellipse 85% 40% at 35% 78%, rgba(90,150,240,0.42), transparent 65%),
             radial-gradient(ellipse 90% 38% at 70% 94%, rgba(255,80,155,0.45), transparent 65%),
             linear-gradient(180deg,#ffd4e8 0%,#c9b8f0 22%,#7fa8f0 44%,#f78bc4 66%,#c19af0 82%,#ffcfe5 100%);

  --ink: #180a2b;
  --ink-soft: #4a3b5c;
  --ink-faint: #7c6b8c;
  --accent: #ee6c1e;
  --accent-2: #d6217e;
  --purple-1: #7a2ec9;
  --purple-2: #4c1a86;
  --surface: #faf7ef;
  --surface-2: #f1ecdf;
  --white: #ffffff;
  --card-radius: 14px;
  --max-w: 1320px;

  --font-head: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }

.eyebrow {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-body); font-weight: 500; font-size: 12px;
  letter-spacing: 3px; color: var(--accent); text-transform: uppercase;
  margin-bottom: 40px;
}
.eyebrow::after { content: ''; flex: 1; height: 1px; background: rgba(238,108,30,0.28); }
.eyebrow.cat { font-size: 15px; font-weight: 600; letter-spacing: 5px; color: var(--purple-1); }
.eyebrow.cat::after { background: rgba(122,46,201,0.25); }

h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 32px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 24px rgba(60,20,70,0.05);
}
.site-nav .logo {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  letter-spacing: 3px; color: var(--ink);
  cursor: pointer;
}
.site-nav .links { display: flex; gap: 32px; align-items: center; }
.site-nav .links a {
  font-family: var(--font-body); font-weight: 500; font-size: 13px;
  letter-spacing: 0.5px; color: var(--ink-soft);
  text-transform: uppercase; transition: color 0.2s ease;
}
.site-nav .links a:hover { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-bg), #28211a;
  overflow: hidden;
  padding-bottom: 70px;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-bg video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease;
}
.hero-bg video.active { opacity: 0.95; }
.hero .blob {
  position: absolute; border-radius: 50%; filter: blur(55px); pointer-events: none;
}
.blob-1 { width: 520px; height: 520px; top: 8%; left: 20%; background: radial-gradient(ellipse at 40% 40%, rgba(255,255,255,0.30), rgba(255,255,255,0.05), transparent 65%); animation: blobMorph1 22s ease-in-out infinite, blobFloat1 18s ease-in-out infinite; }
.blob-2 { width: 420px; height: 420px; top: -6%; right: 6%; background: radial-gradient(ellipse at 60% 30%, rgba(120,50,200,0.30), rgba(120,50,200,0.05), transparent 70%); animation: blobMorph2 26s ease-in-out infinite, blobFloat2 20s ease-in-out infinite; }
.blob-3 { width: 380px; height: 380px; bottom: 6%; left: 2%; background: radial-gradient(ellipse at 30% 70%, rgba(255,220,120,0.30), rgba(255,220,120,0.08), transparent 65%); animation: blobMorph1 20s ease-in-out infinite, blobFloat3 16s ease-in-out infinite; }
.blob-4 { width: 300px; height: 300px; top: 42%; right: 14%; background: radial-gradient(ellipse at 50% 50%, rgba(255,45,138,0.28), rgba(255,45,138,0.06), transparent 70%); animation: blobMorph2 24s ease-in-out infinite, blobFloat1 19s ease-in-out infinite; }

@keyframes blobMorph1{0%,100%{border-radius:60% 40% 30% 70%/60% 30% 70% 40%}33%{border-radius:30% 60% 70% 40%/50% 60% 30% 60%}66%{border-radius:50% 60% 30% 60%/40% 70% 50% 30%}}
@keyframes blobMorph2{0%,100%{border-radius:40% 60% 50% 30%/30% 50% 60% 40%}33%{border-radius:55% 35% 45% 65%/65% 45% 55% 35%}66%{border-radius:35% 55% 65% 45%/45% 65% 35% 55%}}
@keyframes blobFloat1{0%,100%{transform:translate(0,0)}50%{transform:translate(30px,-40px)}}
@keyframes blobFloat2{0%,100%{transform:translate(0,0)}50%{transform:translate(-25px,30px)}}
@keyframes blobFloat3{0%,100%{transform:translate(0,0)}50%{transform:translate(15px,-20px)}}
@keyframes heroSlideL{0%{transform:translateX(-60px);opacity:0}100%{transform:translateX(0);opacity:1}}
@keyframes heroSlideR{0%{transform:translateX(60px);opacity:0}100%{transform:translateX(0);opacity:1}}
@keyframes heroFadeUp{0%{transform:translateY(24px);opacity:0}100%{transform:translateY(0);opacity:1}}

.hero-inner { position: relative; z-index: 5; padding: 110px 32px 0; max-width: var(--max-w); margin: 0 auto; }
.hero-title {
  font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(38px, 8vw, 88px); line-height: 0.95;
}
.hero-title .l1 { color: rgba(255,255,255,0.94); animation: heroSlideL 1.1s cubic-bezier(.45,0,.2,1) both; text-shadow: 0 4px 30px rgba(70,20,90,0.25); }
.hero-title .l2 { color: #ffffff; text-align: right; margin-top: -4px; animation: heroSlideR 1.1s cubic-bezier(.45,0,.2,1) both; text-shadow: 0 4px 30px rgba(70,20,90,0.35); }
.hero-sub {
  display: flex; justify-content: flex-end; padding: 30px 0 0;
  font-family: var(--font-body); font-weight: 400; font-size: clamp(12px,2vw,16px);
  letter-spacing: 3px; color: rgba(255,255,255,0.92); text-transform: uppercase;
  animation: heroFadeUp 1.3s ease-in-out 0.5s both; text-align: right;
}
.hero-scroll {
  display: flex; justify-content: center; margin-top: 60px;
  font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,0.75); text-transform: uppercase;
  animation: heroFadeUp 1.3s ease-in-out 0.9s both;
}

/* ---------- Works bento grid ---------- */
.works {
  padding: 88px 0; background: rgba(250,247,239,0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: relative; border-top: 1px solid rgba(255,255,255,0.5);
}
.bento {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.bento-card {
  position: relative; min-width: 0; border-radius: var(--card-radius); overflow: hidden;
  cursor: pointer; transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 6px 24px rgba(60,20,70,0.08);
}
.bento-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 16px 36px rgba(60,20,70,0.18); }
.bento-card.wide { grid-column: span 2; }
.bento-card .media { width: 100%; height: 100%; aspect-ratio: 16/10; object-fit: cover; }
.bento-card.square .media { aspect-ratio: 1/1; }
.bento-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,4,20,0.82) 0%, rgba(10,4,20,0.15) 50%, transparent 75%);
}
.bento-card .caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 26px; }
.bento-card .caption h3 { font-size: clamp(17px,2.4vw,22px); color: #fff; margin-bottom: 4px; }
.bento-card .caption span { font-family: var(--font-body); font-size: 12px; letter-spacing: 1px; color: rgba(255,255,255,0.78); text-transform: uppercase; }

/* ---------- Project sections ---------- */
.project {
  padding: 96px 0; border-top: 1px solid rgba(60,20,70,0.08);
}
.project-head { margin-bottom: 56px; }
.project-head > * { min-width: 0; }
.project-head > div { max-width: 800px; }
.project-head h2 { font-size: clamp(30px,5vw,52px); line-height: 1.02; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 22px; }
.project-head .desc { font-size: 15px; line-height: 1.8; color: var(--ink-soft); }
.project-head .desc + .desc { margin-top: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 12px; border-radius: 20px; background: rgba(122,46,201,0.1); color: var(--purple-1); border: 1px solid rgba(122,46,201,0.18); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.gallery.g3 { grid-template-columns: repeat(3, 1fr); }
.gallery.g2 { grid-template-columns: repeat(2, 1fr); }
.gallery-item { position: relative; min-width: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 4px 18px rgba(60,20,70,0.08); }
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform 0.5s ease; }
.gallery-item.portrait img, .gallery-item.portrait video { aspect-ratio: 3/4; }
.gallery-item.wide img, .gallery-item.wide video { aspect-ratio: 16/9; }
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.06); }
.gallery-item .label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  font-size: 11px; letter-spacing: 0.5px; color: #fff; opacity: 0; transition: opacity 0.25s ease;
}
.gallery-item:hover .label { opacity: 1; }
.gallery-item.span2 { grid-column: span 2; }
.gallery-item.full { grid-column: 1 / -1; }
.gallery-item.full img { aspect-ratio: auto; height: auto; }
.gallery-item.figure img { aspect-ratio: auto; height: auto; }
.gallery-item.figure:hover img { transform: none; }

/* Dynamic World-Building collage — asymmetric mosaic with layered depth */
.realm-collage {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  aspect-ratio: 6 / 5;
  gap: 16px;
}
.realm-collage .gallery-item { height: 100%; box-shadow: 0 14px 36px rgba(60,20,70,0.18); }
.realm-collage .gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
@media (max-width: 900px) {
  .realm-collage { aspect-ratio: auto; grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .realm-collage .gallery-item { grid-area: auto !important; height: auto; }
  .realm-collage .gallery-item img { aspect-ratio: 4 / 3; height: auto; }
}
@media (max-width: 640px) {
  .realm-collage { grid-template-columns: 1fr; }
}
.timeline-figure {
  margin: 0 0 48px; background: #000;
  display: flex; justify-content: center; align-items: center;
  padding: 32px 24px;
}
.timeline-figure img { max-width: 100%; }
.gallery-item .play-badge {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.85); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink);
}

.video-frame { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(60,20,70,0.14); background:#000; }
.video-frame video { width: 100%; display: block; }
.video-frame iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 48px 0; }
.timeline .age { min-width: 0; padding: 22px; border-radius: 12px; background: var(--surface-2); border: 1px solid rgba(60,20,70,0.06); }
.timeline .age .yrs { font-size: 11px; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }
.timeline .age h4 { font-size: 18px; margin: 8px 0 8px; color: var(--ink); }
.timeline .age p { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

blockquote.pull {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(20px,3vw,30px);
  line-height: 1.4; color: var(--purple-2); border-left: 3px solid var(--accent);
  padding-left: 24px; margin: 48px 0;
}

/* ---------- About ---------- */
.about {
  padding: 100px 0;
  background: var(--surface-2);
}
.about .wrap { display: grid; grid-template-columns: 1fr 0.85fr; gap: 64px; align-items: center; }
.about-text, .about-portrait { min-width: 0; }
.about-text span.label { font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 22px; }
.about-text h2 { font-size: clamp(26px,4vw,34px); line-height: 1.5; color: var(--ink); font-weight: 500; text-transform: uppercase; margin-bottom: 22px; }
.about-text p { font-size: 15px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 16px; }
.about-portrait { border-radius: 16px; overflow: hidden; box-shadow: 0 14px 44px rgba(60,20,70,0.16); }
.about-portrait img { width: 100%; }

/* ---------- Contact ---------- */
.contact { padding: 90px 0 40px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 40px; border-top: 1px solid rgba(122,46,201,0.15); }
.contact > div { min-width: 0; }
.contact .label { font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 14px; display: block; }
.contact-links { display: flex; flex-direction: column; gap: 8px; }
.contact-links a { font-size: 15px; color: var(--ink-soft); transition: color 0.2s ease; overflow-wrap: anywhere; }
.contact-links a:hover { color: var(--accent); }
.contact h2 { font-size: clamp(40px,7vw,72px); line-height: 0.95; letter-spacing: -0.02em; color: var(--ink); text-align: right; }
.contact-logo { width: clamp(150px, 18vw, 240px); height: auto; }

.footer-bar { text-align: right; padding: 18px 0 34px; }
.footer-bar span { font-size: 11px; color: var(--ink-faint); }
.wrap.footer-bar { display: block; }

/* ---------- Carousel ---------- */
.carousel { position: relative; padding: 0 72px; }
.carousel-viewport { overflow: hidden; padding: 24px 0; margin: -24px 0; }
.carousel-track { display: flex; gap: 48px; transition: transform 0.55s cubic-bezier(.4,0,.2,1); }
.carousel-page { flex: 0 0 100%; min-width: 100%; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--accent-2);
  color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0 0 4px;
  box-shadow: 0 0 22px rgba(214,33,126,0.55), 0 6px 18px rgba(60,20,70,0.18);
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.carousel-arrow:hover { background: #ef3f97; box-shadow: 0 0 32px rgba(239,63,151,0.8), 0 6px 18px rgba(60,20,70,0.2); }
.carousel-arrow.prev { left: 0; }
.carousel-arrow.next { right: 0; }
.carousel-arrow[disabled] { opacity: 0.3; cursor: default; pointer-events: none; box-shadow: none; }
@media (max-width: 640px) {
  .carousel { padding: 0 48px; }
  .carousel-arrow { width: 38px; height: 38px; font-size: 22px; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; left: 24px; bottom: 24px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--accent-2); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 22px rgba(214,33,126,0.55), 0 6px 18px rgba(60,20,70,0.25);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: #ef3f97; box-shadow: 0 0 32px rgba(239,63,151,0.8), 0 6px 18px rgba(60,20,70,0.25); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,4,20,0.92); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 24px; right: 32px; font-size: 32px; color: #fff; cursor: pointer;
  background: none; border: none; line-height: 1;
}
.lightbox-caption { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.8); font-size: 13px; letter-spacing: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bento-card.wide { grid-column: span 3; }
  .bento { grid-template-columns: repeat(1, 1fr); }
  .project-head { grid-template-columns: 1fr; gap: 24px; }
  .about .wrap { grid-template-columns: 1fr; }
  .about-portrait { order: -1; max-width: 320px; margin: 0 auto; }
  .timeline { grid-template-columns: 1fr; }
  .gallery.g3, .gallery.g2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-nav .links { position: absolute; top: 100%; left: 0; right: 0; background: rgba(255,255,255,0.96); flex-direction: column; gap: 0; padding: 8px 0; display: none; }
  .site-nav .links.open { display: flex; }
  .site-nav .links a { padding: 14px 32px; width: 100%; border-top: 1px solid rgba(0,0,0,0.06); }
  .nav-toggle { display: flex; }
  .gallery.g3, .gallery.g2 { grid-template-columns: 1fr; }
  .gallery-item.span2 { grid-column: auto; }
  .contact { flex-direction: column; align-items: flex-start; }
  .contact h2 { text-align: left; }
}
