body, html {
  margin: 0;
  height: 100%;
  overflow: hidden; /* Prevent body scroll */
  font-family: sans-serif;
}

:root {
  --topbar-h: 100px;
}

#overlay {
  position: fixed;
  inset: 0;
  background-image: url('intro-screen.avif');
  background-size: cover;        /* fills screen */
  background-position: center;   /* centers image */
  background-repeat: no-repeat;
  cursor: pointer;
  z-index: 1000;
}
 
.global-top-bar {
  height: var(--topbar-h);
  padding-top: 20px;
  padding-left: 10px;
  box-sizing: border-box;
}

.global-top-bar .logo img {
  height: 100%;
  width: auto;
  display: block;
  cursor: pointer; /* show hand icon to indicate clickability */
  padding: 0px 5px 0px 0px;
}

.projects-wrapper {
  display: flex;
  flex-direction: row;
  height: calc(100vh - var(--topbar-h));
  overflow-x: hidden; /* disable normal scroll */
}

/* Prevent image selection while dragging */
.projects-wrapper img {
  pointer-events: auto;  /* keep clickable */
  user-drag: none;       /* Safari */
  -webkit-user-drag: none; /* Chrome, Safari */
}

/* Prevent text selection while dragging */
.projects-wrapper,
.projects-wrapper * {
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;     /* IE/Edge */
}

/* Scrollable content */
.project-body {
  padding: 10px 10px 50px 10px;
  color: #4b5afd;
}

.proj-text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300; /* 'Light' weight */
  font-size: 14px;
  line-height: 1.6;
  color: #4b5afd; /* you can change to #333 for softer contrast */
  letter-spacing: 0.3px; /* subtle spacing gives it that clean architectural look */
}

.proj-text b,
.proj-text strong {
  font-weight: 600; /* medium-bold — adjust to taste (500–700) */
}

.project-column {
  box-sizing: border-box;
  width: calc(100vw / 4.2);
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid #9cb6ff;
  padding-left: 0px;
  display: flex;
  flex-direction: column;
}

.project-column img {
  max-width: 100%;   /* fits inside the column */
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

/* Default: hide scrollbar */
.project-column::-webkit-scrollbar {
  width: 2px;            /* ultra-thin scrollbar */
  height: 2px;           /* for horizontal bars (if any) */
}

.project-column::-webkit-scrollbar-track {
  background: transparent; /* no track */
}

/* Thumb hidden by default */
.project-column::-webkit-scrollbar-thumb {
  background: transparent; /* hidden by default */
  border-radius: 1px;
}

/* On hover: show black scrollbar */
.project-column:hover::-webkit-scrollbar-thumb {
  background: #9cb6ff;        /* black when hovering */
}

/* Firefox support */
.project-column {
  scrollbar-width: thin;              /* thin scrollbar */
  scrollbar-color: transparent transparent;
}

.project-column:hover {
  scrollbar-color: #9cb6ff transparent;  /* black on hover */
}

.arrow-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  opacity: 0;                /* hidden by default */
  transition: opacity 0.2s;
  pointer-events: none; /* this layer ignores mouse events */
}

.projects-wrapper:hover .arrow-nav,
.arrow-nav:hover {           /* stay visible when hovering arrows */
  opacity: 0.5;
}

.arrow {
  background: none;
  color: #9cb6ff;
  border: none;
  font-size: 152px;
  line-height: 1;
  cursor: pointer;
  padding: 0 5px;
  pointer-events: auto; /* re-enable pointer events for the buttons */
}



/* ########## pop up ########## */

/* Backdrop */
.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 1400; /* below top bar (1500), above content */
}

/* Panel */
.popup-panel {
  position: fixed;
  top: var(--topbar-h, 60px);              /* sit below your global top bar */
  left: 0;
  width: var(--col-w, calc(100vw / 4.2));  /* match column width */
  height: calc(100vh - var(--topbar-h, 60px));
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  transform: translateX(-100%);
  transition: transform 240ms ease;
  z-index: 1600; /* above top bar */
  display: flex;
  flex-direction: column;
}

/* Panel content */
.popup-content {
  padding: 16px 16px 24px;
  overflow: auto;
}

/* Close button */
.popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 28px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Open states */
.popup-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.popup-panel.is-open {
  transform: translateX(0);
}


/* ========================================================= MOBILE ========================================================*/

@media (max-width: 767px) {
    
  :root {
    --topbar-h: 85px;
    --col-w: calc(100vw / 1.5);
  }
  
  /* Mobile intro image overrides */
  #overlay {
    background-image: url('intro-screen-m.avif');
  }
  
  /* Make the RH logo span full device width on mobile */
  .global-top-bar .logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  .global-top-bar .logo {
    padding-top: 20px;
    padding-right: 5px;
  }

  
  /* Mobile: show ~1.2 columns + allow native horizontal swipe */
  .project-column {
    width: calc(100vw / 1.2);
  }

  .projects-wrapper {
    overflow-x: auto;                 /* enable horizontal finger swipe */
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - var(--topbar-h));
  }
  
  .popup-panel {
    width: min(90vw, var(--col-w, 90vw));
  }

  /* Hide arrows completely on mobile */
  .arrow-nav {
    display: none !important;
  }
}
