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

@font-face {
  font-family: 'Suisse';
  src: url('font/SuisseIntl-Regular.woff2') format('woff2');
}

html, body {
  color: whitesmoke;
  height: 100dvh;
  overflow: hidden;
  background: rgb(18, 18, 18);
  font-family: 'Suisse', sans-serif;
  font-size: 12px;
  line-height: 1.1em;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; }
 
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

::selection { background: transparent; color: red; }

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

/* ─── TOP BAR ─── */
.top-bar {
  position: fixed;
  z-index: 999;
  top: 0; left: 0; right: 0;
  background: rgb(18, 18, 18);
  padding: 10px;
}

/* ─── TOP NAV ─── */
.top-nav {
  flex-shrink: 0;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

#btn-name:hover {
  color: rgb(121, 121, 121);
}

/* ─── PANEL ─── */
.panel {
  padding: 10px;
  position: fixed;
  z-index: 980;
  top: 28px; left: 0; right: 0;
  max-height: 90dvh;
  overflow: auto;
  background: rgba(18,18,18);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.7, 0, 0.175, 1), opacity 0.25s cubic-bezier(0.7, 0, 0.175, 1);
}

.panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.panel-inner {
  max-width: 500px;
  color: rgb(121, 121, 121);
}

/* ─── PROJECTS LAYOUT ─── */
.projects {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.project {
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding-top: 28px; /* top-bar height */
}

/* ─── PROJECT INFO (sticky per-section) ─── */
.project-info {
  position: sticky;
  top: 28px; /* aligns flush under the top-bar */
  z-index: 10;
  background: rgb(18, 18, 18);
  padding: 10px 10px 8px;
  flex-shrink: 0;
}

.project-info .info-title {
  color: whitesmoke;
  display: block;
  margin-bottom: 2px;
}

.project-info p {
  color: rgb(121, 121, 121);
  max-width: 600px;
  line-height: 1.1em;
}

/* ─── SCROLL GALLERY ─── */
.scroll-gallery {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 0 10px 40px;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-gallery.dragging {
  cursor: grabbing;
  user-select: none;
}

.scroll-gallery::-webkit-scrollbar { display: none; }

.scroll-gallery img,
.scroll-gallery video {
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: auto;
  margin: 0 5px;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.scroll-gallery img:first-child,
.scroll-gallery video:first-child { margin-left: 0; }
.scroll-gallery img:last-child,
.scroll-gallery video:last-child  { margin-right: 0; }

.scroll-gallery img:only-child,
.scroll-gallery video:only-child {
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .project-info p {
    max-width: 100%;
  }

  .projects {
    scroll-snap-type: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .project {
    height: auto;
    scroll-snap-align: none;
  }

  .scroll-gallery {
    height: 70vw;
    flex: none;
  }
}