/* Skills Catalog Page Styles */
/* Matches the design system from main.css */

/* Simple nav links for skill pages */
.nav-link-simple {
  padding: 0.5rem 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link-simple:hover {
  color: #fff;
}

.nav-link-simple--active {
  color: #c4b5fd;
}

/* Skills Page Layout */
.skills-page {
  min-height: 100vh;
  background: #0a0a0f;
}

/* Hero Section */
.skills-hero {
  position: relative;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.skills-hero__background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.skills-hero__grid {
  display: none;
}

.skills-hero__glow {
  display: none;
}

.skills-hero__content {
  position: relative;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.skills-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  color: #c4b5fd;
  margin-bottom: 1.5rem;
}

.skills-hero__badge-icon {
  font-size: 1.1rem;
}

.skills-hero__title {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.1;
}

.skills-hero__subtitle {
  font-size: 1.25rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.6;
}

/* Filters Section */
.skills-filters {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.skills-filters__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.skills-filters__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 400px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.skills-filters__search:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.skills-filters__search-icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.skills-filters__search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
}

.skills-filters__search-input::placeholder {
  color: #6b7280;
}

.skills-filters__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-filters__category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.skills-filters__category:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.skills-filters__category--active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.skills-filters__category--active:hover {
  background: rgba(139, 92, 246, 0.2);
}

.skills-filters__category-count {
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.skills-filters__category--active .skills-filters__category-count {
  background: rgba(139, 92, 246, 0.3);
}

/* Skills Catalog Grid */
.skills-catalog {
  padding: 3rem 0;
}

.skills-catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.skills-catalog__empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.skills-catalog__empty svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.skills-catalog__empty h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #9ca3af;
}

.skills-catalog__empty p {
  margin: 0;
}

/* Skill Card */
.skill-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.skill-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 0.5rem;
  color: #c4b5fd;
  flex-shrink: 0;
}

.skill-card--transform .skill-card__icon {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

.skill-card--extract .skill-card__icon {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.skill-card--analyze .skill-card__icon {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.skill-card--generate .skill-card__icon {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

.skill-card__title-group {
  flex: 1;
  min-width: 0;
}

.skill-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.skill-card__version {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'DM Mono', 'Fira Code', monospace;
  color: #9ca3af;
}

.skill-card__body {
  flex: 1;
  padding: 1.25rem;
}

.skill-card__description {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.6;
}

.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-card__tag {
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

.skill-card__tag--backend {
  background: rgba(34, 211, 238, 0.1);
  color: #22d3ee;
}

.skill-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card__author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s ease;
}

.skill-card__author:hover {
  color: #c4b5fd;
}

.skill-card__author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #c4b5fd;
  font-weight: 600;
}

.skill-card__actions {
  display: flex;
  gap: 0.5rem;
}

.skill-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.15s ease;
}

.skill-card__action:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.skill-card__action--primary {
  width: auto;
  padding: 0 0.75rem;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Contribute Section */
.skills-contribute {
  padding: 3rem 0 5rem;
}

.skills-contribute__card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
}

.skills-contribute__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 50%;
  color: #c4b5fd;
  flex-shrink: 0;
}

.skills-contribute__content {
  flex: 1;
}

.skills-contribute__content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: #fff;
}

.skills-contribute__content p {
  margin: 0;
  font-size: 0.95rem;
  color: #9ca3af;
  line-height: 1.6;
}

.skills-contribute__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: #8b5cf6;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.skills-contribute__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Responsive */
@media (max-width: 900px) {
  .skills-contribute__card {
    flex-direction: column;
    text-align: center;
  }

  .skills-filters__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .skills-filters__search {
    max-width: none;
  }

  .skills-filters__categories {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .skills-hero {
    padding: 6rem 0 3rem;
  }

  .skills-hero__title {
    font-size: 2rem;
  }

  .skills-hero__subtitle {
    font-size: 1rem;
  }

  .skills-catalog__grid {
    grid-template-columns: 1fr;
  }

  .skill-card__footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .skill-card__actions {
    justify-content: flex-end;
  }
}

/* ==========================================
   Skill Modal with YAML Syntax Highlighting
   ========================================== */

.skill-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.skill-modal--open {
  display: flex;
}

.skill-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.skill-modal__container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.skill-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.skill-modal__title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-modal__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.skill-modal__version {
  padding: 0.25rem 0.6rem;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: 'DM Mono', 'Fira Code', monospace;
  color: #c4b5fd;
}

.skill-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s ease;
}

.skill-modal__close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.skill-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-modal__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-modal__description {
  margin: 0;
  font-size: 1rem;
  color: #9ca3af;
  line-height: 1.6;
}

.skill-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-modal__tag {
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-size: 0.8rem;
  color: #6b7280;
}

.skill-modal__tag--backend {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

/* YAML Code Block */
.skill-modal__yaml {
  display: flex;
  flex-direction: column;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
  min-height: 300px;  /* Fixed minimum height - prevents jumping */
  max-height: 500px;
}

.skill-modal__yaml-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: #9ca3af;
}

.skill-modal__copy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  color: #9ca3af;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.skill-modal__copy:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.skill-modal__yaml-content {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

.skill-modal__yaml-content pre {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  font-family: 'JetBrains Mono', 'Fira Code', 'DM Mono', monospace;
}

.skill-modal__yaml-content pre code {
  background: transparent !important;
}

/* Prism.js theme overrides for our dark UI */
.skill-modal__yaml-content .token.key,
.skill-modal__yaml-content .token.property {
  color: #22d3ee;
}

.skill-modal__yaml-content .token.string {
  color: #4ade80;
}

.skill-modal__yaml-content .token.number {
  color: #fbbf24;
}

.skill-modal__yaml-content .token.boolean {
  color: #c4b5fd;
}

.skill-modal__yaml-content .token.comment {
  color: #64748b;
}

.skill-modal__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: #6b7280;
}

.skill-modal__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skill-modal__error {
  color: #9ca3af;
  text-align: center;
  padding: 2rem;
}

.skill-modal__error a {
  color: #c4b5fd;
  text-decoration: underline;
}

.skill-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.skill-modal__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #9ca3af;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.skill-modal__action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.skill-modal__action--github:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.skill-modal__action--docs {
  background: #8b5cf6;
  border-color: transparent;
  color: #fff;
}

.skill-modal__action--docs:hover {
  background: #9d7aff;
  color: #fff;
  transform: translateY(-1px);
}

/* YAML button on skill card */
.skill-card__action--yaml {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
}

.skill-card__action--yaml:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.4);
}

/* Clickable card cursor */
.skill-card {
  cursor: pointer;
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
  .skill-modal__container {
    max-height: 95vh;
    border-radius: 0.75rem 0.75rem 0 0;
  }

  .skill-modal__title {
    font-size: 1.25rem;
  }

  .skill-modal__yaml {
    min-height: 250px;
  }

  .skill-modal__footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .skill-modal__action {
    width: 100%;
    justify-content: center;
  }
}
