/* ================================
  Experience Page Styles - Card Gallery
================================ */

/* Hero Section */
.experience-hero {
  background-image: url('/static/images/backgrounds/experience-hero.jpg');
}

/* Summary Section */
.experience-summary {
  padding: 0 0 var(--space-3xl);
}

/* Icon wraps for stat cards and highlight cards */
.summary-card:hover .icon-wrap,
.highlight-card:hover .icon-wrap {
  transform: scale(1.1);
  box-shadow: 0 0 24px rgb(234 88 12 / 30%);
}

.exp-icon {
  font-size: var(--text-2xl);
}

/* Lead subtitle */
.lead-sub {
  font-size: var(--text-base);
  color: var(--fg-muted);
  margin-top: var(--space-sm);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.summary-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  background: var(--accent-primary-gradient);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
}

.summary-label {
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

/* Career Section Wrapper */
.career-section-wrapper {
  margin-bottom: var(--space-2xl);
}

/* ================================
   Career Highlights Section
================================ */

.career-highlights {
  padding: 0 0 var(--space-2xl);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.highlight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  animation: card-fade-in var(--duration-slow) var(--ease-out) both;
}

.highlight-card:nth-child(1) { animation-delay: 0.1s; }
.highlight-card:nth-child(2) { animation-delay: 0.2s; }
.highlight-card:nth-child(3) { animation-delay: 0.3s; }
.highlight-card:nth-child(4) { animation-delay: 0.4s; }

.highlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(234 88 12 / 8%) 0%,
    transparent 50%,
    rgb(13 148 136 / 8%) 100%
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: 0;
  pointer-events: none;
}

.highlight-card:hover::before {
  opacity: 1;
}

.highlight-card > * {
  position: relative;
  z-index: 1;
}

.highlight-card:hover {
  transform: translateY(-6px);
  border-color: rgb(234 88 12 / 30%);
  box-shadow:
    var(--shadow-lg),
    0 0 32px rgb(234 88 12 / 15%);
}

.highlight-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--fg-primary);
  margin-bottom: var(--space-xs);
}

.highlight-desc {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
}

/* Filter intro text */
.filter-intro {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-lg);
}

/* ================================
   Interactive Filters Section
================================ */

.experience-filters {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2xl);
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

.filter-section {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-md);
}

.filter-section:last-of-type {
  margin-bottom: var(--space-md);
  border-bottom: none;
  padding-bottom: 0;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--fg-primary);
  margin-bottom: 0;
}

.collapsible-button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
  padding: var(--space-sm) 0;
  transition: color var(--duration-fast);
}

.collapsible-button:hover {
  color: var(--accent-primary);
}

.collapsible-button:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Only hide outline for mouse users in browsers that support :focus-visible */
@supports selector(:focus-visible) {
  .collapsible-button:focus:not(:focus-visible) {
    outline: none;
  }
}

.filter-section:not(.collapsed) .filter-title {
  margin-bottom: var(--space-sm);
}

.collapse-icon {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--fg-muted);
  transition: transform var(--duration-fast) var(--ease-out);
}

.filter-count {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--accent-primary);
  margin-left: var(--space-xs);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Collapsible filter sections */
.filter-section.collapsed .filter-pills {
  display: none;
}

.filter-section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.filter-pill {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  background: var(--bg-tertiary);
  color: var(--fg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--bg-primary);
  border-color: var(--accent-primary);
  color: var(--fg-primary);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgb(var(--accent-primary-rgb), 0.3);
}

.filter-pill.active:hover {
  background: var(--accent-secondary);
  color: white;
  border-color: var(--accent-secondary);
}

/* Active Filters Display */
.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  min-height: 40px;
}

.active-filters-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--fg-muted);
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent-primary-gradient);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  animation: tag-pop 0.2s var(--ease-out);
}

@keyframes tag-pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.remove-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgb(255 255 255 / 20%);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.remove-filter:hover {
  background: rgb(255 255 255 / 40%);
}

.clear-filters-btn {
  margin-left: auto;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.clear-filters-btn:hover {
  background: var(--bg-tertiary);
  color: var(--fg-primary);
  border-color: var(--fg-muted);
}

/* Career Section */
.career-section {
  padding-bottom: var(--space-3xl);
}

/* Career Grid - Card Gallery */
.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
}

.career-card {
  background: linear-gradient(
    135deg,
    rgb(234 88 12 / 8%) 0%,
    rgb(255 255 255 / 3%) 50%,
    rgb(234 88 12 / 5%) 100%
  );
  animation: card-fade-in var(--duration-slow) var(--ease-out) both;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.career-card:hover {
  background: linear-gradient(
    135deg,
    rgb(234 88 12 / 12%) 0%,
    rgb(255 255 255 / 6%) 50%,
    rgb(234 88 12 / 8%) 100%
  );
}

/* Highlighted card when filtered */
.career-card.highlighted {
  border-color: var(--accent-primary);
  border-width: 2px;
  box-shadow: 0 0 20px rgb(79 70 229 / 15%);
}

.career-card.highlighted .tech-pill[data-tech] {
  animation: tech-pulse 0.5s ease-out;
}

@keyframes tech-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Current Role Card - special styling */
.career-card.current {
  border-color: rgb(var(--accent-primary-rgb), 0.55);
  border-width: 2px;
  background: linear-gradient(
    135deg,
    rgb(79 70 229 / 10%) 0%,
    rgb(255 255 255 / 4%) 45%,
    rgb(234 88 12 / 8%) 100%
  );
}

/* Card Status Badge */
.card-status {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.card-status.current-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent-primary-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* Card Header */
.career-card .card-header {
  padding-right: 60px; /* space for status badge */
  margin-bottom: var(--space-md);
}

.career-card .position {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--fg-primary);
  margin-bottom: var(--space-xs);
  line-height: var(--leading-snug);
}

.career-card .company {
  display: block;
  font-size: var(--text-base);
  color: var(--fg-accent);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-xs);
}

.career-card .duration {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--fg-muted);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-weight: var(--font-medium);
}

/* Card Body */
.card-body {
  flex: 1;
  margin-bottom: var(--space-md);
}

.responsibilities {
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer - Tech Stack */
.card-footer {
  margin-top: auto;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tech-pill {
  font-size: var(--text-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-tertiary);
  color: var(--fg-secondary);
  border-radius: var(--radius-full);
  font-weight: var(--font-medium);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.tech-pill:hover {
  background: var(--accent-primary);
  color: white;
}

/* Skeleton Loading States */
.career-card.skeleton-card {
  min-height: 280px;
}

.skeleton-card .card-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.skeleton-title {
  height: 20px;
  width: 75%;
  margin-bottom: var(--space-sm);
}

.skeleton-subtitle {
  height: 16px;
  width: 50%;
  margin-bottom: var(--space-lg);
}

.skeleton-text {
  height: 60px;
  width: 100%;
  margin-bottom: var(--space-md);
}

.skeleton-pills {
  display: flex;
  gap: var(--space-xs);
  margin-top: auto;
}

.skeleton-pill {
  height: 22px;
  width: 60px;
  border-radius: var(--radius-full);
}

/* Responsive */
@media (width <= 1200px) {
  .career-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 1024px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-pills {
    gap: var(--space-xs);
  }
}

@media (width <= 768px) {
  .career-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .career-card {
    min-height: auto;
    padding: var(--space-lg);
  }

  .career-card .position {
    font-size: var(--text-base);
  }

  .career-card .company {
    font-size: var(--text-sm);
  }

  .experience-filters {
    padding: var(--space-lg);
  }

  .filter-section {
    margin-bottom: var(--space-md);
  }

  .filter-title {
    font-size: var(--text-sm);
  }

  .filter-pill {
    font-size: var(--text-xs);
    padding: 6px var(--space-sm);
  }

  .active-filters {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .clear-filters-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

@media (width <= 480px) {
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .summary-card {
    padding: var(--space-md);
  }

  .summary-value {
    font-size: var(--text-xl);
  }
}
