.experience-section {
  background: var(--bg-page);
  padding-bottom: var(--section-space);
}

.experience-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.experience-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

.exp-tab {
  width: 100%;
  text-align: left;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.exp-tab:hover,
.exp-tab.active {
  border-color: var(--surface-inverse);
  background: var(--surface-inverse);
  color: var(--surface-inverse-text);
}

.exp-tab__company {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}

.exp-tab__role {
  display: none;
}

.experience-panel {
  width: 100%;
  min-width: 0;
}

.exp-card {
  width: 100%;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  animation: fadeInUp 0.35s ease both;
}

.exp-card--current {
  border-color: var(--border-strong);
}

.exp-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.exp-card__company {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.exp-card__company a {
  color: var(--text-primary);
}

.exp-card__company a:hover {
  color: var(--accent);
}

.exp-card__date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}

.exp-card__position {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

.exp-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.exp-card__meta span {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.exp-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 900px;
}

.exp-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.exp-card__stat {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
}

.exp-card__stat:nth-child(3):last-child {
  grid-column: 1 / -1;
}

.exp-card__stat strong {
  display: block;
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.exp-card__stat span {
  font-size: 12px;
  color: var(--text-secondary);
}

.exp-card__section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.35rem;
  min-width: 0;
}

.exp-card__section-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 700;
}

.exp-card__detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.exp-card__detail-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.exp-card__detail-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.exp-card__project-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.exp-project {
  min-width: 0;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
}

.exp-project strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.exp-project span {
  display: block;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.exp-project p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.exp-card__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.exp-card__skills span {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

@media (max-width: 769px) {
  .experience-section,
  .section-inner,
  .section-header,
  .section-title,
  .section-subtitle,
  .experience-layout,
  .experience-tabs,
  .experience-panel {
    width: 100%;
    max-width: 100%;
  }

  .experience-section {
    padding-bottom: 3.5rem;
  }

  .experience-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .experience-tabs {
    flex-direction: row;
    position: static;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .experience-tabs::-webkit-scrollbar {
    display: none;
  }

  .exp-tab {
    flex: 0 0 calc(50% - 4px);
    min-width: 0;
    text-align: center;
  }

  .exp-card {
    border-radius: 18px;
    padding: 1.15rem;
    overflow: hidden;
  }

  .exp-card__header {
    flex-direction: column;
  }

  .exp-card__company {
    font-size: 20px;
  }

  .exp-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exp-card__stat:nth-child(3):last-child {
    grid-column: 1 / -1;
  }

  .exp-card__project-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .exp-card__project-grid::-webkit-scrollbar {
    display: none;
  }

  .exp-project {
    flex: 0 0 86%;
    max-width: 86%;
    scroll-snap-align: start;
  }
}

@media (max-width: 420px) {
  .exp-card__stats {
    grid-template-columns: 1fr;
  }

  .exp-card__stat:nth-child(3):last-child {
    grid-column: auto;
  }

  .exp-project {
    flex-basis: 92%;
    max-width: 92%;
  }
}
