/* ==========================================================================
   TOLU GENE PORTFOLIO — STYLING ENGINE (PODIUM-INSPIRED)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. ROOT TOKENS & RESET
   -------------------------------------------------------------------------- */
:root {
  --bg-color: #000000; /* Pitch Black */
  --text-color: #ffffff; /* Editorial White */
  --text-muted: #8c8c8c; /* Editorial Grey */
  --accent-color: #ffffff;
  --font-title: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

/* 
   SCROLLING FIX: 
   To enable GSAP ScrollTrigger and Lenis, the html and body heights 
   must NOT be restricted to 100%. They must calculate height dynamically (auto).
*/
html {
  height: auto;
  scroll-behavior: auto;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Lenis Recommended Smooth CSS */
html.lenis, html.lenis body {
  height: auto;
}

.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis-stopped {
  overflow: hidden;
}

/* Hide native scrollbars */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

/* --------------------------------------------------------------------------
   1. FIXED BACKGROUND CANVAS
   -------------------------------------------------------------------------- */
#webgl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. SCROLL SPACER CONTAINER
   -------------------------------------------------------------------------- */
.scroll-container {
  position: relative;
  width: 100%;
  z-index: 2; /* Sits on top of WebGL canvas to capture scroll wheel/trackpad */
}

.scroll-section {
  width: 100%;
  height: 100vh;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. IMMERSIVE FIXED UI OVERLAY
   -------------------------------------------------------------------------- */
.ui-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none; /* Allow interaction to pass to scroll container */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 4rem;
}

/* Interactive elements inside overlay must capture pointer events */
.portfolio-header,
.project-details,
.sidebar-navigation,
.portfolio-footer {
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   4. MINIMAL HEADER
   -------------------------------------------------------------------------- */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  color: var(--text-color);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.status-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-color);
}

/* --------------------------------------------------------------------------
   5. BORDERLESS FLOATING PROJECT DETAILS PANEL
   -------------------------------------------------------------------------- */
.project-details {
  align-self: flex-start;
  margin-top: auto;
  margin-bottom: auto;
  max-width: 460px;
  width: 100%;
}

/* Bare, borderless editorial design like a high-fashion print */
.details-card {
  background: none;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.meta-row {
  margin-bottom: 0.8rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  font-weight: 400;
}

.project-title {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 3rem;
  line-height: 1.05;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  color: var(--text-color);
  font-style: italic;
}

.project-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  font-weight: 300;
  transition: opacity 0.4s ease;
}

.project-footer {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 3px;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   6. SIDEBAR NAVIGATION PROGRESS INDICATOR
   -------------------------------------------------------------------------- */
.sidebar-navigation {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.progress-bar-container {
  width: 1px;
  height: 180px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  width: 100%;
  height: 0%;
  background-color: var(--text-color);
  position: absolute;
  top: 0;
  left: 0;
  transition: height 0.3s ease-out;
}

.indicator-numbers {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 400;
}

.num-current {
  font-size: 1.1rem;
  color: var(--text-color);
}

.num-separator {
  width: 10px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0.4rem 0;
}

.num-total {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. FOOTER BAR
   -------------------------------------------------------------------------- */
.portfolio-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.interaction-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-color);
  letter-spacing: 0.12em;
}

.scroll-indicator-line {
  width: 30px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.scroll-indicator-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--text-color);
  animation: line-slide 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes line-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --------------------------------------------------------------------------
   8. ACTIVE TEXT DYNAMIC FADE ANIMATIONS
   -------------------------------------------------------------------------- */
.fade-out {
  opacity: 0;
  transform: translateY(6px);
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE DESIGN & VIEWPORT ADAPTATIONS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .ui-overlay {
    padding: 2rem;
  }
  
  .sidebar-navigation {
    display: none;
  }
  
  .project-details {
    max-width: 100%;
    align-self: center;
    margin-top: auto;
    margin-bottom: 0;
  }
  
  .details-card {
    margin-bottom: 1rem;
  }
  
  .project-title {
    font-size: 2.2rem;
  }
  
  .interaction-hint {
    display: none;
  }
}

@media (max-height: 600px) {
  .project-details {
    max-width: 100%;
  }
  
  .project-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .project-desc {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .sidebar-navigation {
    display: none;
  }
}
