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

*, *::before, *::after {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><circle cx="7" cy="7" r="7" fill="black"/></svg>') 7 7, auto;
}

html, body {
  background: #fff;
  color: #000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: calc(-0.03em + 0.4px);
  min-height: 100vh;
}

.topbar {
  position: fixed;
  top: 15px;
  left: 0;
  right: 0;
  padding: 0 20px;
  transform: translateY(calc(50vh - 50% - 20px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
  z-index: 3000;
  animation: navIntro 0.9s cubic-bezier(0.65, 0, 0.35, 1) 1.4s forwards;
}

@keyframes navIntro {
  to { transform: translateY(0); }
}

@keyframes navIntroMobile {
  to { transform: translateY(0); }
}

@keyframes navFadeIn {
  to { opacity: 1; }
}

.topbar .logo,
.topbar .controls > .view-btn,
.topbar .tagline {
  opacity: 0;
  animation: navFadeIn 0.4s ease forwards;
}

/* Staggered fade-in at each item's final position */
.topbar .logo { animation-delay: 0.1s; }
.topbar .controls > .view-btn:nth-child(1) { animation-delay: 0.4s; }
.topbar .controls > .view-btn:nth-child(2) { animation-delay: 0.7s; }
.topbar .controls > .view-btn:nth-child(3) { animation-delay: 1.0s; }

.logo {
  font-family: "Helvetica Neue Condensed", "HelveticaNeue-CondensedBold", "Helvetica Condensed", "Arial Narrow", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 70px;
  line-height: 1;
  color: #000;
  letter-spacing: calc(-0.03em + 0.4px);
  user-select: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.5s ease;
}

body.nav-settled .logo {
  color: rgba(0, 0, 0, 0.1);
  -webkit-mask-image: linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000);
  -webkit-mask-clip: text;
  mask-clip: text;
  backdrop-filter: blur(15px) saturate(1.6);
  -webkit-backdrop-filter: blur(15px) saturate(1.6);
}


.controls {
  display: contents;
}

.tagline {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #000;
  margin-left: 0;
  white-space: nowrap;
  transform: translateY(0);
}

.view-btn, .upload-btn {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(218, 218, 220, 0.65);
  color: #000;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  backdrop-filter: blur(20px) saturate(300%);
  -webkit-backdrop-filter: blur(20px) saturate(300%);
}

.view-btn svg, .upload-btn svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  display: block;
}

.view-btn:hover, .upload-btn:hover { background: rgba(218, 218, 220, 0.65); }
.view-btn.active, .view-btn:active, .upload-btn:active {
  background: #000;
  color: #fff;
}

/* Topbar nav buttons styled like SB.S — large bold black caps, no pill, no icons */
.controls .view-btn {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: "Helvetica Neue Condensed", "HelveticaNeue-CondensedBold", "Helvetica Condensed", "Arial Narrow", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 70px;
  line-height: 1;
  color: #000;
  letter-spacing: calc(-0.03em + 0.4px);
  text-transform: uppercase;
  height: auto;
  padding: 0;
  gap: 0;
  border: none;
  border-radius: 0;
  white-space: nowrap;
  cursor: pointer;
}

.controls .view-btn:hover {
  background: transparent;
  color: #000;
}

.controls .view-btn.active,
.controls .view-btn:active {
  background: transparent;
  color: #000;
}

.controls .view-btn {
  transition: color 0.5s ease;
}

/* After the nav slide-up settles (~2.3s), tint inactive items to 10% gray and
   blur the content scrolling behind each glyph (via mask-clip: text). The
   selected item keeps its orange tint but blurs the same way. */
body.nav-settled .controls .view-btn {
  color: rgba(0, 0, 0, 0.1);
  -webkit-mask-image: linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000);
  -webkit-mask-clip: text;
  mask-clip: text;
  backdrop-filter: blur(15px) saturate(1.6);
  -webkit-backdrop-filter: blur(15px) saturate(1.6);
}

body.nav-settled .controls .view-btn.active,
body.nav-settled .controls .view-btn:active {
  color: #000;
  -webkit-mask-image: none;
  mask-image: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.controls .view-btn svg { display: none; }
.controls .view-btn .label { display: inline; }
.controls .view-btn .label .kern { margin-right: 4px; }
.controls .view-btn .label .kern-tight { margin-right: -3px; }

main {
  padding-top: 295px;
  padding-bottom: 0;
  min-height: 100vh;
  transform: translateY(100vh);
  animation: contentSlideUp 0.9s cubic-bezier(0.65, 0, 0.35, 1) 1.4s forwards;
}

@keyframes contentSlideUp {
  to { transform: translateY(0); }
}

/* Grid view */
.grid-view {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 100px;
  padding-left: 20px;
  padding-right: 20px;
}

/* Alternating thumbnail sizes — 1000×567 and 700×397 (same 16:9 aspect) */
.grid-view .item {
  position: relative;
  background: #fff;
  padding: 0;
}

/* Pattern: B S | S B | B S | S B  … (1000-wide vs 700-wide) */
.grid-view .item:nth-child(4n+1),
.grid-view .item:nth-child(4n)   { width: calc((100% - 100px) * 0.58824); } /* 1000 / 1700 — big */
.grid-view .item:nth-child(4n+2),
.grid-view .item:nth-child(4n+3) { width: calc((100% - 100px) * 0.41176); } /* 700  / 1700 — small */

.grid-view .item-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 567;
  overflow: hidden;
}

.grid-view .item img,
.grid-view .item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Index (Research) view — fluid grid, items scale to maintain 100px gap */
.index-view {
  padding-left: 20px;
  padding-right: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: start;
  gap: 100px;
}

.index-view .item {
  position: relative;
  width: 100%;
  background: #fff;
}

.index-view .item-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.index-view .item img,
.index-view .item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Info view */
.info-view {
  padding-left: 20px;
  padding-right: 20px;
}

.info-page {
  width: 100%;
  padding-top: 0;
  padding-bottom: 20px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 36px;
  letter-spacing: calc(-0.03em + 0.4px);
  color: #000;
  line-height: 1.0379;
}

.info-text {
  margin: 0;
}

.info-text + .info-text {
  margin-top: 1lh;
}

.info-text + .info-link {
  margin-top: calc(36px * 1.0379);
}

.info-link {
  display: block;
  font-family: inherit;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: inherit;
  color: #000;
  text-decoration: none;
}

.info-link::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.info-link:hover::before {
  animation: captionBlink 0.9s steps(2, start) infinite;
}

/* Hover: enlarge the cursor (50% bigger) instead of the thumbnail */
.grid-view .item:hover,
.index-view .item:hover {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21"><circle cx="10.5" cy="10.5" r="10.5" fill="black"/></svg>') 10 10, auto;
}

/* Thumbnail captions — sit inside the gap below the image without affecting row spacing */
.item-caption {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: calc(-0.03em + 0.4px);
  line-height: 1.15;
  color: #000;
}

.item-caption::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.item:hover .item-caption::before {
  animation: captionBlink 0.9s steps(2, start) infinite;
}

.footer-email {
  flex-basis: 100%;
  grid-column: 1 / -1;
  margin-top: 120px;
  margin-bottom: 20px;
  font-family: "Helvetica Neue Condensed", "HelveticaNeue-CondensedBold", "Helvetica Condensed", "Arial Narrow", Helvetica, Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  font-size: 70px;
  line-height: 1;
  letter-spacing: calc(-0.03em + 0.4px);
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  white-space: nowrap;
}

@keyframes captionBlink {
  0%, 49.99% { opacity: 1; }
  50%, 100%  { opacity: 0; }
}


/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.18s ease-out;
}

.lightbox[hidden] { display: none; }

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

.lightbox-content img,
.lightbox-content video {
  width: 80vw;
  aspect-ratio: 1000 / 567;
  max-height: 85vh;
  object-fit: cover;
  display: block;
}

/* Play lightbox: keep natural aspect ratio, match the height of the projects lightbox */
.lightbox.lightbox-play .lightbox-content img,
.lightbox.lightbox-play .lightbox-content video {
  width: auto;
  height: calc(80vw * 567 / 1000);
  aspect-ratio: auto;
  max-width: 80vw;
  object-fit: contain;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Empty state */
.empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #999;
  text-align: center;
}

@media (max-width: 1024px) {
  /* Stack the topbar vertically, left-aligned — but keep all spacing identical to desktop */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  /* Tighter line spacing between the stacked nav items below SB.S */
  .topbar .controls .view-btn {
    line-height: 0.85;
  }

  /* Move the nav group up 5px relative to SB.S */
  .topbar .controls .view-btn:first-child {
    margin-top: -5px;
  }

/* Single-column variants of the grid layouts */
  .grid-view .item:nth-child(4n+1),
  .grid-view .item:nth-child(4n),
  .grid-view .item:nth-child(4n+2),
  .grid-view .item:nth-child(4n+3) { width: 100%; }

  .index-view { grid-template-columns: 1fr; }

  /* Info: full width on mobile */
  .info-page {
    width: 100%;
  }
}
