/* Custom CSS for davidbuchas.com - Exact Layout Match */

/* ========== CSS VARIABLES ========== */
:root {
  --color-bg: #000000;
  --color-text: #ffffff;
  --animation-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html.light-mode {
  --color-bg: #fdfdfb;
  --color-text: #000000;
}

/* ========== RESET & BASE ========== */
* {
  box-sizing: border-box;
}

body *, html * {
  color: var(--color-text) !important;
}

a {
  color: var(--color-text) !important;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  color: var(--color-text) !important;
  cursor: pointer;
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-weight: 500;
}

svg {
  color: var(--color-text) !important;
  fill: currentColor !important;
}

svg path {
  fill: currentColor !important;
}

/* ========== SCROLL STRUCTURE ========== */
html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding: 0;
  height: 200vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: scroll;
  background-color: var(--color-bg) !important;
  color: var(--color-text) !important;
  font-family: "Ppneuemontreal Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  scroll-padding: 10vh;
  overscroll-behavior: none;
}

body.loaded {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.scroll-snap-point {
  position: absolute;
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  pointer-events: none;
}

#snap-top {
  top: 0;
}

#snap-bottom {
  top: 100vh;
}

#second-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-bg);
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.second_page_column {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.second_page_list {
  display: flex;
  flex-direction: column;
}

.second_page_item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  margin-bottom: 1rem;
}

.second_page_item.visible {
  opacity: 1;
  transform: translateY(0);
}

.second_page_image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  display: block;
  background-color: transparent;
}

.second_page_item_title {
  display: none;
}

/* Lightbox for full-screen images */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
}

/* ========== LAYOUT STRUCTURE ========== */
.page_wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 10;
  will-change: transform;
  background-color: var(--color-bg) !important;
}

body.loaded .page_wrap {
  transition: background-color 0.3s ease;
}

.page_main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ========== NAVBAR ========== */
.navbar_wrap {
  padding: 1.25rem 2rem;
  flex-shrink: 0;
}

.navbar_contain {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

/* Left side */
.navbar_left_contain {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.navbar_home {
  display: none !important;
}

.navbar_home svg {
  display: none !important;
}

.g_eyebrow,
.u-time {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.navbar_left_eyebrow {
  display: none;
}

/* Center */
.navbar_contain_p {
  display: none;
}

/* Center nav links */
.navbar_links {
  display: none;
}

.navbar_links_ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.navbar_links_li {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.navbar_links_li a {
  position: relative;
  display: inline-block;
  transition: opacity 0.2s;
}

.navbar_links_li a:hover {
  opacity: 0.6;
}

.footer_nav_text {
  position: relative;
}

.footer_nav_span {
  display: block;
}

[data-stagger-link-duplicate] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Right side */
.navbar_cta_wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.navbar_cta_contain {
  display: flex;
  gap: 0.5rem;
}

/* ========== BUTTONS ========== */
.mode_toggle_btn,
.g_btn_main {
  border: 0.5px solid var(--color-text) !important;
  background: transparent !important;
  color: var(--color-text) !important;
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  font-weight: 500;
}

.mode_toggle_btn:hover,
.g_btn_main:hover {
  background-color: var(--color-text) !important;
  color: var(--color-bg) !important;
}

.g_btn_text {
  color: inherit !important;
}

.navbar_menu_btn {
  display: none;
}

/* ========== HERO SECTION (TWO COLUMNS) ========== */
.hero_home_wrap {
  flex: 1;
  overflow: hidden;
}

.hero_home_contain {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

/* LEFT COLUMN */
.hero_home_left {
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
}

.hero_home_left_p {
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  line-height: 1.3;
  /* push the quote into the vertical middle; stats/footer stay at the bottom corner */
  margin: auto 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero_home_left_p p {
  margin: 0;
  padding: 0;
}

.hero_home_left_p p + p {
  margin-top: 0.6em;
}

.hero_home_left_inline-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: opacity 0.2s;
}

.hero_home_left_inline-link:hover {
  opacity: 0.6;
}

.hero_home_stats {
  margin-top: 1rem;
}

.hero_home_stats_p {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero_home_footer_links {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.footer_link {
  color: var(--color-text) !important;
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: opacity 0.2s;
}

.footer_link:hover {
  text-decoration: underline;
}

.text-span {
  color: inherit !important;
}

/* RIGHT COLUMN */
.hero_home_aside {
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
}

.hero_home_h1 {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: auto 0 0.5rem 0;
}

.hero_home_collection {
  margin-top: 0;
}

.hero_home_list {
  display: flex;
  flex-direction: column;
}

.hero_home_item {
  border-top: 0.5px solid var(--color-text);
}

.hero_home_item:last-child {
  border-bottom: 0.5px solid var(--color-text);
}

.hero_collection_link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.hero_collection_link:hover {
  background-color: var(--color-text) !important;
}

.hero_collection_link:hover .hero_collection_title {
  color: var(--color-bg) !important;
}

.hero_collection_link:hover .hero_collection_arrow {
  color: var(--color-bg) !important;
}

.hero_collection_title {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
  transition: color 0.2s;
  flex: 1;
  text-align: left;
}

.hero_collection_arrow {
  font-size: clamp(0.7rem, 1.2vw, 0.8rem);
  transition: color 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
  white-space: nowrap;
}

.hero_collection_bg {
  display: none !important;
}

/* ========== UTILITY CLASSES ========== */
.w-inline-block {
  display: inline-block;
}

.w-dyn-list,
.w-dyn-items {
  display: block;
}

.w-dyn-item {
  display: block;
}

.u-text-style-xsmall {
  font-size: 0.6875rem;
}

.u-text-style-small {
  font-size: 0.875rem;
}

.u-text-style-h4 {
  font-size: clamp(1.25rem, 2.8vw, 1.7rem) !important;
}

.u-text-transform-uppercase {
  text-transform: uppercase;
}

.u-container-full {
  width: 100%;
}

.u-position-fixed {
  position: fixed;
}

.guide_wrap {
  display: none;
}

.w-embed,
.code-embed {
  display: none;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-text);
}

/* ========== SKELETON LOADING ========== */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.skeleton {
  background: var(--color-text);
  border-radius: 2px;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
  display: block;
}

.hero_home_left_p .skeleton-bio {
  height: 1em;
  width: 72%;
  margin-bottom: 0.5em;
}

.hero_home_left_p .skeleton-bio:last-child {
  width: 48%;
}

.hero_home_list .skeleton-project {
  height: 1.1em;
  width: 60%;
  margin-bottom: 0.75em;
}

.hero_home_list .skeleton-project:nth-child(2) { width: 45%; }
.hero_home_list .skeleton-project:nth-child(3) { width: 52%; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero_home_contain {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .navbar_links {
    display: none;
  }

  .navbar_contain {
    grid-template-columns: 1fr auto;
  }

  /* Second page: 2 columns on mobile */
  #second-page {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hide columns 3, 4, 5 on mobile */
  .second_page_column:nth-child(n+3) {
    display: none;
  }
}
