/*Copyright © 2026 Braxon's Stuff. All rights reserved.*/

.projects_container {
  width: min(1050px, calc(100% - 30px));
  margin: 15px auto 0;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(235px, 320px)
  );

  justify-content: center;
  align-items: start;
  gap: 8px;
}

.project_label {
  width: 100%;
  max-width: 320px;
  height: auto;
  min-height: 0;

  box-sizing: border-box;

  margin: 0;
  padding: 10px;

  align-self: start;

  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;

  color: #c9d1d9;
  text-align: center;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.35s ease,
    color 0.35s ease;
}

.project_label:hover {
  transform: translateY(-2px);
  border-color: #58a6ff;
}

html[data-theme="light"] .project_label {
  background: #ffffff;
  border-color: #dddddd;
  color: #000000;
}

.project_image {
  width: 100%;
  margin: 0 auto 9px;

  overflow: hidden;

  border-radius: 8px;
}

.project_image a {
  display: block;
  width: 100%;
}

.project_image img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 200px;

  margin: 0 auto;

  object-fit: contain;

  border-radius: 8px;
}

.project_label header {
  margin: 0 0 6px;

  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.project_label p {
  margin: 0 0 9px;

  color: #8b949e;

  font-size: 13px;
  line-height: 1.4;
}

html[data-theme="light"] .project_label p {
  color: #666666;
}

.project_progress_tag {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 6px;

  margin: 2px;
  padding: 4px 10px;

  border: 1px solid;
  border-radius: 999px;

  font-size: 12px;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.project_progress_tag[data-status="not-started"] {
  color: #8b949e;

  border-color: rgba(139, 148, 158, 0.4);
  background: rgba(139, 148, 158, 0.08);
}

.project_progress_tag[data-status="wip"] {
  color: #d29922;

  border-color: rgba(210, 153, 34, 0.4);
  background: rgba(210, 153, 34, 0.08);
}

.project_progress_tag[data-status="success"] {
  color: #3fb950;

  border-color: rgba(63, 185, 80, 0.4);
  background: rgba(63, 185, 80, 0.08);
}

.dot {
  display: inline-block;

  width: 8px;
  height: 8px;

  flex: 0 0 auto;

  background: currentColor;

  border-radius: 50%;
}

.icon {
  display: inline-flex;

  align-items: center;
  justify-content: center;
}

.icon svg {
  display: block;

  width: 12px;
  height: 12px;
}

.spinner {
  stroke: currentColor;
  opacity: 0.5;
}

.spinner circle {
  stroke-dasharray: 30;
  stroke-dashoffset: 10;

  transform-origin: center;

  animation: spin 1s linear infinite;
}

.check {
  stroke: currentColor;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.project_tags {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;
  align-items: center;

  gap: 4px;

  margin-top: 5px;
}

.project_tag {
  display: inline-block;

  margin: 0;
  padding: 3px 8px;

  border: 1px solid #30363d;
  border-radius: 999px;

  background: rgba(139, 148, 158, 0.08);
  color: #8b949e;

  font-size: 11px;
  line-height: 1.3;

  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.35s ease;
}

.project_tag:hover {
  border-color: #58a6ff;
  color: #58a6ff;
}

html[data-theme="light"] .project_tag {
  border-color: #dddddd;

  background: rgba(0, 0, 0, 0.03);

  color: #666666;
}

.project_link {
  display: inline-block;

  margin-top: 8px;

  color: inherit;

  font-size: 13px;
  font-weight: 600;
}

.project_link:hover {
  text-decoration: underline;
}

.projects-controls {
  width: min(850px, calc(100% - 30px));

  margin: 14px auto 10px;

  display: flex;
  flex-direction: column;

  align-items: center;

  gap: 7px;
}

.projects-search {
  width: min(100%, 420px);
}

.projects-search input,
.tag-search-area input {
  width: 100%;

  box-sizing: border-box;

  padding: 8px 11px;

  border: 1px solid var(--border-color);
  border-radius: 8px;

  background: var(--bg-color);
  color: var(--text-color);

  font: inherit;
  font-size: 13px;

  outline: none;

  transition:
    border-color 0.2s ease,
    background-color 0.35s ease,
    color 0.35s ease;
}

.projects-search input:focus,
.tag-search-area input:focus {
  border-color: #58a6ff;
}

.status-filter-area {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;
}

.projects-filters {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 4px;
}

.project_filter {
  margin: 0;
  padding: 4px 9px;

  border: 1px solid var(--border-color);
  border-radius: 999px;

  background: var(--bg-color);
  color: var(--text-color);

  font: inherit;
  font-size: 11px;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.project_filter:hover {
  border-color: #58a6ff;
}

.project_filter.is-active {
  border-color: #58a6ff;
}

.tag-search-area {
  position: relative;

  width: min(100%, 420px);
}

.tag-search-results {
  position: absolute;

  z-index: 20;

  top: calc(100% + 4px);
  left: 0;
  right: 0;

  max-height: 220px;

  overflow-y: auto;

  padding: 4px;

  border: 1px solid var(--border-color);
  border-radius: 8px;

  background: var(--bg-color);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project_tag_search_option {
  display: block;

  width: 100%;

  box-sizing: border-box;

  padding: 7px 9px;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: var(--text-color);

  text-align: left;

  font: inherit;
  font-size: 12px;

  cursor: pointer;
}

.project_tag_search_option:hover {
  background: rgba(88, 166, 255, 0.12);
}

.projects-empty,
.projects-error {
  margin: 15px auto;

  font-size: 13px;

  opacity: 0.7;

  text-align: center;
}

.project_label[hidden] {
  display: none;
}

.sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 850px) {
  .projects_container {
    grid-template-columns: repeat(
      auto-fill,
      minmax(220px, 300px)
    );
  }
}

@media (max-width: 560px) {
  .projects_container {
    width: min(100% - 20px, 360px);

    grid-template-columns: 1fr;

    gap: 8px;
  }

  .project_label {
    max-width: 100%;
  }

  .projects-controls {
    width: min(100% - 20px, 420px);
  }

  .project_image img {
    max-height: 190px;
  }
}