/* ── EXPERTISE PAGE ── */

.expertise-main {
  background: var(--clr-bg);
}

.expertise-track {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  align-items: start;
  padding-bottom: var(--space-12);
}

/* ── Sidebar ── */
.expertise-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: none;
}
.expertise-sidebar::-webkit-scrollbar { display: none; }

.exp-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
  line-height: 1.3;
}

.exp-nav__item:hover {
  color: var(--clr-sage);
  background: var(--clr-sage-muted);
}

.exp-nav__item.active {
  color: var(--clr-sage-dark);
  background: var(--clr-sage-muted);
  font-weight: 600;
}

.exp-nav__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--clr-border-strong);
  flex-shrink: 0;
  transition: all var(--dur-fast);
}

.exp-nav__item.active .exp-nav__dot {
  background: var(--clr-sage);
  border-color: var(--clr-sage);
  box-shadow: 0 0 0 3px var(--clr-sage-muted);
}

/* ── Expertise sections ── */
.expertise-content {
  display: flex;
  flex-direction: column;
}

.exp-section {
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--clr-border);
}

.exp-section:last-child {
  border-bottom: none;
}

.exp-section__inner {
  max-width: 720px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.exp-section__inner.visible {
  opacity: 1;
  transform: translateX(0);
}

.exp-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.exp-section__num {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--clr-text-faint);
}

.exp-section__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  background: var(--clr-sage-muted);
  border: 1px solid rgba(122,154,110,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-sage);
  flex-shrink: 0;
}

.exp-section__title {
  color: var(--clr-text);
  margin-bottom: var(--space-3);
}

.exp-section__desc {
  font-size: var(--text-base);
  color: var(--clr-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.exp-section__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.exp-section__list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

.exp-section__list li::before {
  content: '–';
  color: var(--clr-sage-light);
  flex-shrink: 0;
}

.exp-section__tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--clr-border-strong);
  color: var(--clr-text-muted);
  background: var(--clr-surface);
  transition: all var(--dur-fast);
}

.tech-pill:hover {
  border-color: var(--clr-sage);
  color: var(--clr-sage-dark);
  background: var(--clr-sage-muted);
}

/* ── CTA ── */
.expertise-cta {
  max-width: 600px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .expertise-track {
    grid-template-columns: 220px 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .expertise-track {
    grid-template-columns: 1fr;
    padding-inline: var(--space-3);
    /* Remove the gap between sidebar and content on mobile —
       the sidebar is sticky at the top, content flows under it */
    gap: 0;
  }

  /* Sticky horizontal nav — flush with the top of the viewport */
  .expertise-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    max-height: none;
    /* Solid background so section content scrolls cleanly underneath */
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    /* Bleed edge-to-edge on mobile */
    margin-inline: calc(-1 * var(--space-3));
    padding-inline: var(--space-3);
    padding-block: var(--space-1);
    /* Smooth appearance as page scrolls up behind it */
    box-shadow: 0 4px 16px rgba(30, 50, 20, 0.06);
  }

  /* Horizontal scrolling pill row */
  .exp-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: var(--space-1);
    padding-bottom: 4px;
    /* Snap each item so swiping is precise */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .exp-nav::-webkit-scrollbar { display: none; }
  .exp-nav__item {
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  /* Give the active item a slight padding-top so the dot ring
     isn't clipped by the sticky bar shadow */
  .exp-nav__item.active { background: var(--clr-sage-muted); }

  .exp-section { top: 130px; } /* nav(72) + sticky-sidebar(~58) */
  .exp-section__inner { transform: translateY(16px); }
}

/* shared page-hero css applied from projects.css included via projects
   Actually defined in projects.css — re-declare here just the ambient variable */
.page-hero { padding-top: 160px; padding-bottom: var(--space-10); background: var(--clr-bg); position: relative; overflow: hidden; border-bottom: 1px solid var(--clr-border); }
.page-hero__ambient { position: absolute; inset: 0; background: radial-gradient(ellipse 50% 80% at var(--ax, 20%) var(--ay, 40%), var(--clr-sage-muted) 0%, transparent 70%); pointer-events: none; }
.page-hero__content { max-width: 640px; }
.page-hero__sub { font-size: var(--text-lg); color: var(--clr-text-muted); line-height: 1.65; margin-top: var(--space-3); max-width: 520px; }

