/* ==========================================================================
   SYSTEM DESIGN & STYLING TOKENS
   ========================================================================== */
:root {
  --bg-color: #0a0a0a;
  --bg-grid-color: rgba(255, 255, 255, 0.06);
  --text-color: #f5f5f7;
  --text-muted: #86868b;
  --text-dimmed: #515154;
  --accent-color: #ffffff;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-slow: 0.8s cubic-bezier(0.76, 0, 0.24, 1);
  --transition-medium: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: 1.6;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Prevent native scroll on the slider view */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
}

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

/* Background grid overlay */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image: 
    linear-gradient(to right, var(--bg-grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-grid-color) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center center;
  opacity: 0.85;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
  z-index: 95;
  pointer-events: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  pointer-events: auto;
}

.nav-link {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding: 10px 0;
  position: relative;
  transition: color var(--transition-fast);
}

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

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-color);
}

/* ==========================================================================
   GALLERY / CAROUSEL VIEW
   ========================================================================== */
.view-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 5;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--transition-medium);
}

/* Intro Text styling */
.intro-text-container {
  max-width: 750px;
  text-align: center;
  padding: 0 20px;
  margin-bottom: 45px;
  z-index: 10;
}

.intro-text {
  font-family: var(--font-primary);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
}

.intro-text.second-line {
  margin-top: 12px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* Outer wrapper keeping slider centered */
.slider-outer-container {
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: center;
  cursor: grab;
  user-select: none;
}

.slider-outer-container:active {
  cursor: grabbing;
}

/* Absolute or relative track containing slides */
.slider-track {
  display: flex;
  flex-shrink: 0;
  width: max-content;
  gap: 30px; /* Space between slides */
  padding: 0 50vw; /* Padding so active slide can align centered */
  height: 100%;
  align-items: center;
  will-change: transform;
}

/* Project Card layout */
.project-card {
  width: 320px;
  height: 480px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #111111;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform-origin: center center;
}

/* Non-active cards are slightly translucent */
.project-card:not(.active-card) {
  opacity: 1;
  filter: brightness(0.3);
  transform: scale(0.9);
  cursor: pointer;
}

/* Active card full visibility */
.project-card.active-card {
  opacity: 1;
  filter: brightness(1);
  transform: scale(1.1);
}

.card-img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  transform: scale(1);
}

/* Subtle overlay shading for readability */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.6) 100%);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.project-card:hover .card-overlay {
  opacity: 0.8;
}

/* Card details shown overlayed */
.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

/* Show info when card is active */
.project-card.active-card .card-info {
  opacity: 1;
  transform: translateY(0);
}

.card-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-accent);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

/* Footer elements for Gallery slider */
.gallery-footer {
  position: absolute;
  bottom: 60px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.counter-wrapper {
  font-family: var(--font-accent);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ==========================================================================
   PROJECT DETAIL VIEW (EXPANDED CONTAINER)
   ========================================================================== */
.detail-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 100;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.detail-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Detail close button */
.detail-close-btn {
  position: fixed;
  top: 30px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 150;
  color: var(--text-muted);
  mix-blend-mode: difference; /* Ensures visibility on both light and dark backgrounds */
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.detail-close-btn:hover {
  color: var(--text-color);
  transform: translateX(-3px);
}

.close-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.close-icon {
  width: 18px;
  height: 18px;
}

/* Detail Hero Area (Main cover) */
.detail-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.detail-hero-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  will-change: transform, width, height, top, left;
}

.detail-hero-bg-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.detail-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.75) 100%);
}

/* Central Titles inside Hero */
.detail-title-wrapper {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.title-animation-mask, .subtitle-animation-mask {
  overflow: hidden;
  margin-bottom: 10px;
}

#detail-title {
  font-family: var(--font-accent);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-transform: none;
  opacity: 1;
  transform: translateY(0);
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

#detail-subtitle {
  font-family: var(--font-primary);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  opacity: 1;
  transform: translateY(0);
  transition: transform var(--transition-slow) 0.1s, opacity var(--transition-slow) 0.1s;
}

/* Side navigation arrows (+) */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15;
  color: rgba(255, 255, 255, 0.3);
  transition: color var(--transition-fast), transform var(--transition-bounce);
}

.nav-arrow:hover {
  color: var(--text-color);
  transform: translateY(-50%) scale(1.15);
}

.prev-arrow {
  left: 40px;
}

.next-arrow {
  right: 40px;
}

.plus-icon {
  font-family: var(--font-accent);
  font-size: 28px;
  font-weight: 300;
}

/* Bottom details of Hero area */
.detail-hero-footer {
  position: absolute;
  bottom: 50px;
  width: 100%;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 10;
}

.detail-counter-container {
  font-family: var(--font-accent);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* Miniature Thumbnail Strip */
.detail-thumbnails {
  display: flex;
  gap: 10px;
}

.detail-thumb {
  width: 45px;
  height: 45px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.3;
  cursor: pointer;
  transition: opacity var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.detail-thumb:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

.detail-thumb.active-thumb {
  opacity: 1;
  border-color: var(--accent-color);
  transform: scale(1.1);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scroll indicator inside Hero */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 10;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
  animation: scrollPulse 2s infinite;
}

.scroll-arrow {
  font-size: 14px;
}

@keyframes scrollPulse {
  0% { transform: translate(-50%, 0); opacity: 0.4; }
  50% { transform: translate(-50%, 8px); opacity: 0.8; }
  100% { transform: translate(-50%, 0); opacity: 0.4; }
}

/* ==========================================================================
   PROJECT DETAILS CONTENT (BELOW THE FOLD)
   ========================================================================== */
.detail-content {
  background-color: var(--bg-color);
  width: 100%;
  position: relative;
  z-index: 20;
}

.detail-content-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 40px;
}

/* Grid metadata & overview */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}

/* Meta Data Left Column */
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.meta-value {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-color);
}

/* Narrative Right Column */
.detail-description {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section-title {
  font-family: var(--font-accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.body-text {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 300;
  color: #d1d1d6;
}

.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-color);
  margin: 80px 0;
}

/* Highlights Lists styling */
.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 60px;
  margin-top: 30px;
}

.features-list li {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  color: #d1d1d6;
  position: relative;
  padding-left: 25px;
}

.features-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-muted);
}

/* Custom Visual Showcase Grid (Vertical layout matching sebasriive.com) */
.detail-gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 60px;
  width: 100%;
}

.gallery-photo-card {
  width: 100%;
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.gallery-photo-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: none;
}

.gallery-photo-card:hover img {
  transform: none;
}

/* Action button at bottom */
.detail-footer-actions {
  display: flex;
  justify-content: center;
  margin-top: 100px;
}

.btn-back {
  padding: 18px 40px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.btn-back:hover {
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   ABOUT PANEL OVERLAY
   ========================================================================== */
.about-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 90;
  background-color: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  transform: translateY(100%);
  will-change: transform, opacity;
}

.about-container:not(.hidden) {
  transform: translateY(0);
}

.about-content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 100px;
  align-items: start;
}

/* Bio Column Left */
.about-bio-column {
  display: flex;
  flex-direction: column;
}

.about-name {
  font-family: var(--font-accent);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.about-tagline {
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

.about-bio-text {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.about-bio-text p {
  font-size: 17px;
  line-height: 1.7;
  font-weight: 300;
  color: #d1d1d6;
}

/* Meta Columns Right */
.about-info-column {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.about-info-section {
  display: flex;
  flex-direction: column;
}

.about-section-heading {
  font-family: var(--font-accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-list li {
  font-size: 15px;
  color: #d1d1d6;
  font-weight: 300;
}

.contact-link {
  transition: color var(--transition-fast);
  display: inline-block;
}

.contact-link:hover {
  color: var(--accent-color);
}

/* Underline effect on hover */
.hover-reveal {
  position: relative;
}

.hover-reveal::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.hover-reveal:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}


/* ==========================================================================
   TRANSITION CONTROLS & UTILITIES
   ========================================================================== */
.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
  .slider-outer-container {
    height: 55vh;
  }
  
  .project-card {
    width: 280px;
    height: 420px;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

@media (max-width: 768px) {
  .slider-outer-container {
    height: 50vh;
  }
  
  .project-card {
    width: 240px;
    height: 360px;
  }
  
  .nav-bar {
    padding: 20px 0;
  }
  
  .nav-links {
    gap: 20px;
  }
  
  .nav-arrow {
    width: 50px;
    height: 50px;
  }
  
  .prev-arrow {
    left: 10px;
  }
  
  .next-arrow {
    right: 10px;
  }
  
  .plus-icon {
    font-size: 20px;
  }
  
  .detail-close-btn {
    top: 20px;
    left: 20px;
  }
  
  .detail-hero-footer {
    padding: 0 20px;
    bottom: 40px;
  }
  
  .detail-thumbnails {
    display: none; /* Hide miniature thumbstrip on mobile for layout breathing room */
  }
  
  .features-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .detail-gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .detail-content-inner {
    padding: 80px 20px;
  }
}

/* Custom card zoom rules */
.project-card[data-id="aka-i"] .card-img,
.project-card[data-id="aka-ii"] .card-img {
  transform: scale(1.85);
}
