/* ================== Section Container Styling ================== */
.section-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  border-radius: 20px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: var(--transition);
  transform: scale(0.98);
  opacity: 0.96;
  will-change: transform;
}

.section-container:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  transform: scale(1);
  opacity: 1;
}

/* ================== About Page Interactive Layout ================== */

.about-interactive {
  padding: 4rem 0;
  min-height: 100vh;
}

.about-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ================== Left Column: Control Buttons ================== */

.about-controls {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  height: fit-content;
}

/* Make controls static on mobile */
@media (max-width: 900px) {
  .about-controls {
    position: static;
    top: auto;
  }
}

.about-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: none;
  border-left: 3px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  transform: scale(0.98);
  opacity: 0.85;
  will-change: transform, opacity;
}

.about-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.01);
  opacity: 0.95;
  border-left-color: var(--accent-primary);
  border-left-color: rgba(11, 211, 255, 0.5);
}

.about-btn:active {
  transform: scale(0.97);
}

.about-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-left-color: var(--accent-primary);
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-btn.active .btn-indicator {
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.about-btn:not(.active) .btn-indicator {
  width: 6px;
  height: 6px;
  background: transparent;
  border-radius: 50%;
  flex-shrink: 0;
}

.btn-text {
  flex: 1;
}

/* Focus states for accessibility */
.about-btn:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ================== Right Column: Content Panel ================== */

.about-content-panel {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2.5rem;
  min-height: 400px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.content-section {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.content-section.fade-in {
  animation: fadeInSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.content-section.fade-out {
  animation: fadeOutSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutSlide {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* ================== Content Section Styles ================== */

.content-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.avatar-inline {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 2px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  transform: scale(0.98);
}

.avatar-inline:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.content-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.content-header .lead {
  font-size: 1.2rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin: 0;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.key-highlights {
  margin: 2rem 0;
}

.key-highlights h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlight-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.highlight-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 600;
}

.content-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
}

.content-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  margin: 2rem 0 1rem 0;
  color: var(--text-primary);
}

.content-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.philosophy-quote {
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid var(--accent-primary);
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ================== Timeline Styles ================== */

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-list li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 2rem;
  transition: var(--transition);
  transform: translateX(-4px);
  opacity: 0.92;
}

.timeline-list li:hover {
  transform: translateX(0);
  opacity: 1;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
}

.timeline-list li strong {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.timeline-list li span {
  display: block;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.timeline-list li p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ================== Certifications Grid ================== */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.cert-card {
  background: var(--bg-tertiary);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  transform: scale(0.97) translateY(30px);
  opacity: 0;
  will-change: transform;
  overflow: hidden;
  position: relative;
}

.cert-card.scroll-visible {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Different styles for each cert card on scroll */
.cert-card:nth-child(1).scroll-visible {
  transform: scale(1) translateY(0) rotateZ(-1deg);
  box-shadow: 0 12px 35px rgba(11, 211, 255, 0.15);
}

.cert-card:nth-child(2).scroll-visible {
  transform: scale(1) translateY(0) rotateZ(1deg);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.15);
}

.cert-card:nth-child(3).scroll-visible {
  transform: scale(1) translateY(0) rotateZ(-0.5deg);
  box-shadow: 0 12px 35px rgba(6, 182, 212, 0.15);
}

.cert-card:nth-child(4).scroll-visible {
  transform: scale(1) translateY(0) rotateZ(0.5deg);
  box-shadow: 0 12px 35px rgba(139, 92, 246, 0.15);
}

.cert-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cert-card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-primary);
}

.cert-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.cert-card:hover,
.cert-card:focus-within {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-primary);
  opacity: 1;
}

.cert-card:hover img,
.cert-card:focus-within img {
  transform: scale(1.05);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 20px rgba(11, 211, 255, 0.2);
}

.cert-card:active {
  transform: translateY(-2px) scale(1.01);
}

/* ================== Action Buttons ================== */

.about-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.about-actions .btn {
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.about-actions .btn.primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 211, 255, 0.2);
}

.about-actions .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 211, 255, 0.3);
}

.about-actions .btn.ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.about-actions .btn.ghost:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

/* ================== Responsive Design ================== */

@media (max-width: 900px) {
  .about-container {
    grid-template-columns: 240px 1fr;
    gap: 2rem;
  }

  .about-controls {
    padding: 1.25rem;
  }

  .about-content-panel {
    padding: 2rem;
  }

  .cert-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-controls {
    position: static;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem;
    gap: 0.5rem;
    scrollbar-width: thin;
  }

  .about-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    min-width: fit-content;
  }

  .about-content-panel {
    padding: 1.5rem;
    min-height: auto;
  }

  .content-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .avatar-inline {
    width: 100px;
    height: 100px;
  }

  .about-actions {
    flex-direction: column;
  }

  .about-actions .btn {
    width: 100%;
    text-align: center;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }
  
  .cert-card img {
    height: 180px;
  }
  
  /* Remove rotation on mobile */
  .cert-card.scroll-visible {
    transform: scale(1) translateY(0) !important;
  }

  .timeline-list li {
    padding-left: 2rem;
  }
}

/* ================== Home Uniform Palette (Scoped) ================== */
.about-interactive {
  --about-bg: #1e293b;
  --about-bg-soft: #23324a;
  --about-panel: #1f2e46;
  --about-border: rgba(148, 163, 184, 0.18);
  --about-text: #f1f5f9;
  --about-text-muted: #cbd5e1;
  --about-accent: #38bdf8;
  --about-accent-soft: rgba(56, 189, 248, 0.16);
}

.about-interactive .about-controls,
.about-interactive .about-content-panel,
.about-interactive .about-btn,
.about-interactive .cert-card,
.about-interactive .philosophy-quote {
  border-color: var(--about-border);
}

.about-interactive .about-controls {
  background: var(--about-bg-soft);
  box-shadow: 0 10px 24px rgba(2, 8, 22, 0.22);
}

.about-interactive .about-btn {
  background: rgba(15, 23, 42, 0.62);
  color: var(--about-text-muted);
  border-left-color: transparent;
  transform: none;
  opacity: 1;
}

.about-interactive .about-btn:hover {
  background: rgba(15, 23, 42, 0.82);
  color: var(--about-text);
  border-left-color: var(--about-accent);
  transform: none;
}

.about-interactive .about-btn.active {
  background: rgba(15, 23, 42, 0.9);
  color: var(--about-text);
  border-left-color: var(--about-accent);
  box-shadow: inset 0 0 0 1px var(--about-accent-soft);
}

.about-interactive .about-btn.active .btn-indicator {
  background: var(--about-accent);
}

.about-interactive .about-content-panel {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.58));
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.26);
}

.about-interactive .content-header h1,
.about-interactive .content-section h2,
.about-interactive .content-section h3,
.about-interactive .timeline-list li strong {
  color: var(--about-text);
}

.about-interactive .content-section p,
.about-interactive .highlight-list,
.about-interactive .timeline-list li p {
  color: var(--about-text-muted);
}

.about-interactive .timeline-list li span,
.about-interactive .content-header .lead {
  color: var(--about-accent);
}

.about-interactive .timeline-list li::before {
  background: var(--about-accent);
}

.about-interactive .philosophy-quote {
  background: rgba(15, 23, 42, 0.62);
  color: var(--about-text);
}

.about-interactive .about-actions .btn.primary {
  background: #0ea5e9;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.28);
}

.about-interactive .about-actions .btn.primary:hover {
  background: #0284c7;
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.3);
}

.about-interactive .about-actions .btn.ghost {
  color: var(--about-text);
}

.about-interactive .about-actions .btn.ghost:hover {
  background: rgba(15, 23, 42, 0.62);
  border-color: var(--about-accent);
}

.about-interactive .cert-card {
  background: rgba(15, 23, 42, 0.62);
  transform: none;
  opacity: 1;
}

.about-interactive .cert-card.scroll-visible,
.about-interactive .cert-card:nth-child(1).scroll-visible,
.about-interactive .cert-card:nth-child(2).scroll-visible,
.about-interactive .cert-card:nth-child(3).scroll-visible,
.about-interactive .cert-card:nth-child(4).scroll-visible {
  transform: none;
  box-shadow: 0 12px 28px rgba(2, 8, 22, 0.24);
}

.about-interactive .cert-card h3 {
  color: var(--about-accent);
}
