/* Scoped styles for #about section */
#about {
  /* Graphite UI Theme Variables */
  --about-bg: #070707;
  --about-panel: #121212;
  --about-panel2: #1a1a1a;
  --about-text: #eaeaea;
  --about-muted: #999;
  --about-border: rgba(255, 255, 255, 0.1);
  --about-accent: #cdff05; /* Acid yellow-green */
  --about-accent-glow: rgba(205, 255, 5, 0.15);

  scroll-margin-top: 20px;
}

/* Base Layout */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  height: 600px; /* Fixed height for scrolling effect */
  overflow: hidden;
  position: relative;
}

/* --- Left Column: Content --- */
.about-content {
  overflow-y: auto;
  padding-right: 1.5rem;
  padding-bottom: 300px; /* Allow last section to scroll to top */
  scrollbar-width: thin;
  scrollbar-color: var(--about-accent) transparent;
  scroll-behavior: smooth;
  position: relative;
}

/* Custom Scrollbar */
.about-content::-webkit-scrollbar {
  width: 4px;
}
.about-content::-webkit-scrollbar-track {
  background: transparent;
}
.about-content::-webkit-scrollbar-thumb {
  background-color: var(--about-muted);
  border-radius: 4px;
}
.about-content:hover::-webkit-scrollbar-thumb {
  background-color: var(--about-accent);
}

/* Sticky Mini-Nav */
.about-nav {
  position: sticky;
  top: 0;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--about-border);
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-nav a {
  color: var(--about-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.about-nav a:hover,
.about-nav a.active {
  color: var(--about-accent);
}

.about-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -17px; /* Align with border-bottom */
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--about-accent);
  box-shadow: 0 0 8px var(--about-accent-glow);
}

/* Section Styling */
.about-section {
  margin-bottom: 4rem;
  scroll-margin-top: 80px; /* offset for sticky nav */
}

.about-section h3 {
  color: var(--about-text);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--about-accent);
  padding-left: 1rem;
}

.about-text p {
  color: var(--about-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.highlight {
  color: var(--about-accent);
  font-weight: 500;
}

/* Values Cards */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.value-card {
  background: var(--about-panel2);
  border: 1px solid var(--about-border);
  padding: 1.25rem;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.value-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-color: rgba(205, 255, 5, 0.3);
}

.value-card h4 {
  color: var(--about-text);
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.value-card p {
  font-size: 0.85rem;
  margin: 0;
}

/* Tech Stack Tags */
.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--about-muted);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.tech-tag:hover {
  background: rgba(205, 255, 5, 0.1);
  color: var(--about-accent);
  border-color: var(--about-accent);
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--about-panel2);
  border-radius: 12px;
  border: 1px solid var(--about-border);
}

.stat-item strong {
  display: block;
  font-size: 1.2rem;
  color: var(--about-accent);
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--about-muted);
  text-transform: uppercase;
}

/* --- Right Column: Visuals --- */
.about-visual {
  position: relative;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--about-border);
}

.slideshow-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.7) contrast(1.1);
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: white;
  z-index: 3;
}

.slide-caption h4 {
  margin: 0;
  color: var(--about-accent);
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.slide-caption p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #eee;
}

/* Slideshow Controls */
.slide-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.dot.active {
  background: var(--about-accent);
  transform: scale(1.2);
  box-shadow: 0 0 5px var(--about-accent-glow);
}

/* Scroll Progress Bar for Text Panel */
.scroll-progress-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: rgba(255,255,255,0.05);
  z-index: 5;
}

.scroll-progress-bar {
  width: 100%;
  background: var(--about-accent);
  height: 0%;
  transition: height 0.1s linear;
  box-shadow: 0 0 10px var(--about-accent-glow);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    height: auto;
    display: flex;
    flex-direction: column-reverse; /* Text below, image on top */
  }

  .about-visual {
    height: 300px; /* Carousel height on mobile */
    width: 100%;
  }

  .about-content {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .about-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: none;
  }
  .about-content {
    scroll-behavior: auto;
  }
}

