@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

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

body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #fff;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 80%;
  font-weight: 500;
  overflow-x: hidden;
}

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

/* ── HEADER ── */
header {
  position: relative;
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ── MARQUEE ── */
.marquee-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.3rem 0 0.6rem;
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 250s linear infinite;
  will-change: transform;
}

.marquee-track span {
  display: inline-block;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 0;
  padding-right: 3rem;
  padding-left: 1.5rem;
}

.marquee-track span:not(:first-child) { padding-left: 0; }

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── NAV ── */
.nav {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.nav-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 0;
  background: #000;
  border-radius: 500px;
  box-shadow: none;
  border-radius: 500px;
  cursor: pointer;
  padding: 0;
  transition: opacity 160ms ease;
}

.nav-arrow { display: flex; align-items: center; justify-content: center; }

/* Clip wrapper animates max-width; keeps overflow hidden */
.nav-bubble-clip {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  max-width: 48px;
  overflow: hidden;
  border-radius: 500px;
  box-shadow: none;
  border-radius: 500px;
  opacity: 0;
  pointer-events: none;
  transition: max-width 950ms cubic-bezier(.2, .9, .2, 1.1), opacity 340ms ease;
}

/* Actual pill: layout like reference (email left, icons right) */
.nav-bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 12px 16px;
  height: 48px;
  background: #000;
  white-space: nowrap;
  width: calc(100vw - 1.5rem);
}



.nav.open .nav-bubble-clip {
  max-width: calc(100vw - 0.75rem);
  opacity: 1;
  pointer-events: auto;
}

.nav.open .nav-shell { opacity: 0; pointer-events: none; }

.nav-left{ display:flex; align-items:center; flex:1 1 auto; min-width:0; overflow:hidden; padding-right: 110px; }
.nav-right{ position:absolute; right:16px; top:50%; transform: translateY(-50%); display:flex; align-items:center; gap: 14px; flex-shrink:0; }
.nav-right svg{ width:24px; height:24px; }
.nav-item  { display: flex; align-items: center; color: #fff; flex-shrink: 0; }
.nav-email { display:block; max-width:100%; font-size: 20px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav-close {
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
}

/* ── CATEGORIES ── */
.header-categories {
  font-size: 0.65rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.12em;
  padding: 0 1.5rem;
  text-align: center;
}

/* ── PORTFOLIO INDEX ── */
.portfolio {
  padding: 0 1.5rem 4rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portfolio-shell {
  position: relative;
  min-height: calc(100dvh - 80px);
  display: flex;
  align-items: center;
}

.portfolio-scroll-btn {
  display: none;
}

.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.project-card:hover .bubble-img { opacity: 0.88; }

.bubble-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  --bubble-mask: url("/bubble.avif");
  --bubble-mask-inverted: linear-gradient(#fff 0 0), var(--bubble-mask);
}

.bubble-wrap.send {
  --bubble-mask: url("/bubble_send.avif");
}

.bubble-wrap.landscape-bubble {
  --bubble-mask: url("/assets/masks/bubble_landscape.png");
}

.bubble-wrap.landscape-bubble.send {
  --bubble-mask: url("/assets/masks/bubble_send_landscape.png");
}

.bubble-wrap.ultrawide-bubble {
  --bubble-mask: url("/assets/masks/bubble_ultrawide.png");
}

.bubble-wrap.ultrawide-bubble.send {
  --bubble-mask: url("/assets/masks/bubble_send_ultrawide.png");
}

@media (max-width: 767px) {
  .bubble-wrap.landscape-bubble .bubble-img,
  .bubble-wrap.landscape-bubble .bubble-placeholder,
  .bubble-wrap.ultrawide-bubble .bubble-img,
  .bubble-wrap.ultrawide-bubble .bubble-placeholder {
    -webkit-mask-size: auto 100.5%, auto 100.5%;
    mask-size: auto 100.5%, auto 100.5%;
  }
}

.bubble-img-container {
  position: relative;
  width: 100%;
  filter: none;
}

.bubble-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  -webkit-mask-image: var(--bubble-mask-inverted);
  mask-image: var(--bubble-mask-inverted);
  -webkit-mask-mode: alpha, alpha;
  mask-mode: alpha, alpha;
  -webkit-mask-size: 100.5% 100.5%, 100.5% 100.5%;
  mask-size: 100.5% 100.5%, 100.5% 100.5%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-repeat: no-repeat, no-repeat;
  -webkit-mask-position: center, center;
  mask-position: center, center;
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  transition: opacity 0.2s;
}

.bubble-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #999;
  text-align: center;
  padding: 1rem;
  -webkit-mask-image: var(--bubble-mask-inverted);
  mask-image: var(--bubble-mask-inverted);
  -webkit-mask-mode: alpha, alpha;
  mask-mode: alpha, alpha;
  -webkit-mask-size: 100.5% 100.5%, 100.5% 100.5%;
  mask-size: 100.5% 100.5%, 100.5% 100.5%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-repeat: no-repeat, no-repeat;
  -webkit-mask-position: center, center;
  mask-position: center, center;
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
}

.iphone-crop .bubble-img {
  -webkit-mask: none;
  mask: none;
}

.iphone-crop .bubble-placeholder {
  -webkit-mask: none;
  mask: none;
}

.project-meta {
  margin-top: 18px;
  padding: 0 0 28px;
  text-align: center;
}
.project-title { font-size: 22px; font-weight: 500; letter-spacing: 0; line-height: 1.1; text-align: center; }
.project-category { display: none; }

/* ── PROJECT PAGE ── */
.project-page {
  padding: 1.2rem 1.5rem 4rem;
  width: 100%;
  margin: 0 auto;
}

.project-page.single-media-page {
  --single-media-chrome-height: 12.5rem;
  min-height: calc(100dvh - var(--single-media-chrome-height));
  display: flex;
  flex-direction: column;
  padding-bottom: 1.5rem;
}

.project-page-header {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 2rem;
  text-align: center;
}

.project-page.single-media-page .project-page-header {
  margin-bottom: 1rem;
}
.project-page-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.project-page-category {
  font-size: 0.65rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}
.project-page-desc {
  font-size: 0.7rem;
  color: #555;
  letter-spacing: 0.05em;
  font-weight: 400;
}
.photo-grid {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  margin: 0 auto;
}

.photo-grid.single-media-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-grid img {
  width: 100%;
  display: block;
  object-fit: contain;
  border-radius: 20px;
}

.photo-grid video {
  width: 100%;
  display: block;
  object-fit: contain;
  border-radius: 20px;
  background: #000;
}

.photo-grid.single-media-grid img,
.photo-grid.single-media-grid video {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

/* ── BREAKPOINTS ── */
@media (min-width: 650px){
  .marquee-track span{ font-size:44px; }
}

@media (min-width: 768px) {
  .portfolio-shell {
    padding-left: 4.5rem;
    padding-right: 4.5rem;
  }

  .portfolio {
    padding: 1rem 1.5rem 5rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2rem) / 3);
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    align-items: start;
  }

  .portfolio::-webkit-scrollbar { display: none; }

  .project-card {
    min-width: 0;
    scroll-snap-align: center;
  }

  .bubble-wrap {
    max-width: none;
    margin: 0;
    width: 100%;
  }

  .bubble-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    filter: none;
    background: #fff;
    border-radius: 20px;
    clip-path: inset(0 round 20px);
    overflow: hidden;
  }

  .bubble-img,
  .bubble-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    -webkit-mask: none;
    mask: none;
    border-radius: 20px;
    clip-path: inset(0 round 20px);
  }

  .iphone-crop .bubble-img {
    object-fit: contain;
    background: #fff;
  }

  .project-meta { margin-top: 0.4rem; }

  .project-page { padding: 1.5rem 1.5rem 5rem; }
  .project-page.single-media-page {
    --single-media-chrome-height: 13rem;
    padding-bottom: 1.5rem;
  }
  .project-page-header { margin-bottom: 2.5rem; }
  .photo-grid { width: 33%; gap: 1rem; }
  .header-categories { padding: 0 3rem; }
  .nav { right: 2px; }
  .nav.open .nav-bubble-clip { max-width: min(760px, calc(100vw - 3rem)); }
  .nav-bubble { width: min(760px, calc(100vw - 3rem)); }
}

@media (min-width: 1200px) {
  .portfolio { grid-auto-columns: calc((100% - 2rem) / 3); }

  .portfolio-scroll-btn {
    display: none;
    position: absolute;
    top: calc(50% - 2.2rem);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: #000;
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    transition: opacity 0.2s;
  }

  .portfolio-scroll-prev {
    left: 1.5rem;
  }

  .portfolio-scroll-next {
    right: 1.5rem;
  }

  .portfolio-scroll-btn.is-visible {
    display: inline-flex;
  }

  .portfolio-scroll-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
  }
}

/* ── ABOUT PAGE ── */
.about-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.about-photo {
  width: 100%;
}

.about-photo img {
  width: 100%;
  display: block;
  border-radius: 20px;
  object-fit: cover;
}

.about-bio {
  width: 100%;
}

.about-bio p {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: #000;
  text-transform: none;
}

.nav-plus {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  flex-shrink: 0;
}

.nav-about {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .about-page {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding: 3rem 4.5rem 5rem;
  }

  .about-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
  }

  .about-photo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
  }

  .about-bio {
    flex: 1;
  }

  .about-bio p {
    font-size: 0.9rem;
  }
}
