/* --- Projects Archive (Elegant & Minimalist) --- */

.lc-projects-archive {
  max-width: var(--lc-max);
  margin: 0 auto;
  padding: calc(var(--lc-hero-min-height) + 20px) var(--lc-space) 80px;
}

.lc-projects-archive__header {
  margin-bottom: 48px;
  text-align: center;
}

.lc-projects-archive__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.lc-projects-archive__title {
  font-family: var(--lc-font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--lc-on-surface);
  letter-spacing: -0.02em;
  margin: 0;
}

.lc-projects-archive__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  padding: 0 10px;
  background: var(--lc-glass);
  border-radius: 14px;
  font-family: var(--lc-font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lc-neutral);
}

.lc-projects-archive__subtitle {
  font-size: 1rem;
  color: var(--lc-neutral);
  margin: 0;
}

/* Project List - Minimalist Cards */
.lc-projects-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .lc-projects-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .lc-projects-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Project Item */
.lc-project-item {
  position: relative;
  background: var(--lc-glass);
  border-radius: var(--lc-radius-xl);
  border: 1px solid var(--lc-border-divider);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lc-project-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--lc-shadow);
  border-color: var(--lc-input-border);
}

.lc-project-item__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.lc-project-item__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--lc-surface-low), var(--lc-surface));
  overflow: hidden;
}

.lc-project-item__thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.lc-project-item:hover .lc-project-item__thumb {
  transform: scale(1.05);
}

.lc-project-item__thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lc-font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--lc-primary);
  background: linear-gradient(135deg, var(--lc-glass), var(--lc-glass-soft));
}

.lc-project-item__status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-family: var(--lc-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.lc-project-item__status--running {
  color: #16a34a;
}

.lc-project-item__status--developing {
  color: #ea580c;
}

.lc-project-item__status--paused,
.lc-project-item__status--maintenance {
  color: #64748b;
}

html[data-lc-color-scheme="dark"] .lc-project-item__status {
  background: rgba(0, 0, 0, 0.6);
}

.lc-project-item__content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lc-project-item__name {
  font-family: var(--lc-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--lc-on-surface);
  margin: 0;
  line-height: 1.3;
}

.lc-project-item__desc {
  font-size: 0.875rem;
  color: var(--lc-neutral);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lc-project-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}

.lc-project-item__platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--lc-neutral);
  background: var(--lc-glass);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.lc-project-item__platform:hover {
  color: var(--lc-primary);
  background: var(--lc-chip-bg);
}

.lc-project-item__platform svg {
  width: 16px;
  height: 16px;
}

.lc-project-item__more {
  font-family: var(--lc-font-mono);
  font-size: 0.6875rem;
  color: var(--lc-neutral);
  padding: 3px 8px;
}

.lc-project-item__external {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--lc-surface);
  color: var(--lc-neutral);
  border: 1px solid var(--lc-border-divider);
  transition: all 0.2s ease;
  z-index: 2;
}

.lc-project-item__external:hover {
  background: var(--lc-primary);
  color: white;
  border-color: var(--lc-primary);
}

.lc-projects-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--lc-neutral);
}

/* --- Legacy Project Grid (Keep for compatibility) --- */

.lc-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lc-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow: hidden;
}

.lc-project-card--featured {
  grid-column: 1 / -1;
  padding: 28px 32px;
  gap: 20px;
}

.lc-project-card--featured .lc-project-card__head {
  align-items: center;
  gap: 20px;
}

.lc-project-card--featured .lc-project-card__logo {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border-radius: 20px;
}

.lc-project-card--featured .lc-project-card__heading h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.lc-project-card--featured .lc-project-card__intro {
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-size: 1rem;
}

.lc-project-card--featured .lc-project-card__coverlink {
  border-radius: 1.5rem;
}

@media (max-width: 768px) {
  .lc-project-card--featured {
    grid-column: 1;
    padding: 20px;
    gap: 16px;
  }

  .lc-project-card--featured .lc-project-card__logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 16px;
  }

  .lc-project-card--featured .lc-project-card__heading h2 {
    font-size: 1.5rem;
  }
}

.lc-project-card__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.lc-project-card__logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 72px;
  box-shadow: 0 2px 6px rgba(30, 40, 60, 0.06), 0 6px 16px rgba(30, 40, 60, 0.05);
  background: var(--lc-elevated);
}

.lc-project-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lc-project-card__logo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--lc-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg,
      var(--lc-primary),
      var(--lc-primary-soft));
  color: #fff;
}

.lc-project-card__heading h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.lc-project-card__title {
  color: var(--lc-on-surface);
  text-decoration: none;
}

.lc-project-card__intro {
  margin: 0;
  color: var(--lc-meta);
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lc-chips--stack {
  margin-bottom: 0;
}

.lc-project-platforms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.7rem 0.34rem 0.62rem;
  border-radius: 999px;
  font-family: var(--lc-font-mono);
  font-size: 0.76rem;
  color: var(--lc-on-surface);
  background: var(--lc-chip-bg);
  border: 1px solid var(--lc-input-border);
  box-shadow: var(--lc-inner-light);
}

.lc-platform-chip__icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
}

.lc-platform-chip__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lc-platform-chip__label {
  line-height: 1;
}

.lc-platform-chip--android {
  color: #2b7a41;
}

.lc-platform-chip--ios,
.lc-platform-chip--macos {
  color: #5d6372;
}

.lc-platform-chip--web {
  color: #3650c7;
}

.lc-platform-chip--linux {
  color: #7a5a17;
}

.lc-platform-chip--windows {
  color: #2b67b8;
}

.lc-project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
}

.lc-project-card__coverlink {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.lc-project-card__coverlink:focus-visible {
  outline: 2px solid var(--lc-focus-ring);
  outline-offset: 2px;
}

.lc-project-card:hover {
  box-shadow:
    0 4px 14px rgba(30, 40, 60, 0.07),
    0 12px 28px rgba(30, 40, 60, 0.08),
    var(--lc-inner-light);
  transform: none;
}

.lc-project-single {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lc-project-single__head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.lc-project-single__logo-wrap {
  flex: 0 0 128px;
}

.lc-project-single__logo,
.lc-project-single__logo-fallback {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 24px;
  box-shadow: var(--lc-shadow-lg), var(--lc-inner-light);
  background: var(--lc-elevated);
}

.lc-project-single__logo {
  object-fit: contain;
}

.lc-project-single__logo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--lc-font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(120deg,
      var(--lc-primary),
      var(--lc-primary-soft));
}

.lc-project-single__heading {
  flex: 1 1 360px;
  min-width: 0;
}

.lc-project-single__heading h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.lc-project-single__intro {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--lc-meta);
}

.lc-project-single__actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.lc-project-single__section {
  padding-top: 28px;
  border-top: 1px solid var(--lc-border-divider);
  position: relative;
  padding-left: 20px;
}

.lc-project-single__section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--lc-primary), var(--lc-primary-soft));
  border-radius: 2px;
  opacity: 0.6;
}

.lc-project-single__section:first-of-type {
  border-top: none;
}

.lc-project-single__section:first-of-type::before {
  display: none;
}

.lc-project-single__label {
  margin: 0 0 12px;
  font-family: var(--lc-font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lc-meta);
}

.lc-project-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-family: var(--lc-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.lc-project-status--badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  border-radius: 8px;
  min-width: auto;
  padding: 0.28rem 0.65rem;
  font-size: 0.64rem;
}

.lc-project-status--running {
  color: #0f7a55;
  background: rgba(58, 191, 125, 0.18);
  border-color: rgba(58, 191, 125, 0.3);
}

.lc-project-status--paused {
  color: #9b6a07;
  background: rgba(240, 185, 67, 0.2);
  border-color: rgba(240, 185, 67, 0.35);
}

.lc-project-status--developing {
  color: var(--lc-primary);
  background: rgba(74, 108, 244, 0.15);
  border-color: rgba(74, 108, 244, 0.25);
}

.lc-project-gallery {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.lc-project-gallery__item {
  display: block;
  flex: none;
  height: clamp(320px, 52vw, 560px);
  width: auto;
  min-width: 0;
  max-width: 90vw;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--lc-shadow), var(--lc-inner-light);
  scroll-snap-align: start;
}

.lc-project-gallery__item img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.06);
}

.lc-project-videos {
  display: grid;
  gap: 14px;
}

.lc-project-videos__item {
  padding: 10px;
  border-radius: 18px;
  background: var(--lc-elevated);
  border: 1px solid var(--lc-input-border);
  box-shadow: var(--lc-inner-light);
  overflow: hidden;
}

.lc-project-videos__player {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.lc-project-videos__player .wp-video {
  width: 100% !important;
  max-width: 100% !important;
}

.lc-project-videos__player .wp-video-shortcode {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.lc-project-videos__player .wp-video .mejs-container,
.lc-project-videos__player .wp-video .mejs-overlay,
.lc-project-videos__player .wp-video .mejs-mediaelement {
  max-width: 100% !important;
  width: 100% !important;
}

.lc-project-videos__player iframe,
.lc-project-videos__player video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: clamp(220px, 46vw, 620px);
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.lc-project-videos__player .wp-video-shortcode,
.lc-project-videos__player .mejs-container {
  aspect-ratio: 16 / 9;
  height: auto !important;
}

/* Mixed feed (home / archive / search): align with article list divider rows */
.lc-feed .lc-project-card.lc-glass {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--lc-border-divider);
  padding: 12px 0;
  transition: background-color 0.2s ease;
}

.lc-feed .lc-project-card.lc-glass:last-child {
  border-bottom: none;
}

.lc-feed .lc-project-card:hover {
  box-shadow: none;
  transform: none;
  background: var(--lc-list-row-hover);
}

.lc-feed .lc-project-card {
  overflow: visible;
}

.lc-feed .lc-project-card__logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 14px;
  box-shadow: var(--lc-inner-light);
}

.lc-feed .lc-project-card__head {
  align-items: center;
  gap: 12px;
}

.lc-feed .lc-project-card__heading h2 {
  font-size: clamp(1rem, 1.35vw, 1.12rem);
}

.lc-feed .lc-project-card__intro {
  font-size: 0.8125rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Search results: keep mixed order but render Project as full glass card (match /projects). */
body.search .lc-feed .lc-project-card.lc-glass {
  background: var(--lc-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--lc-shadow), var(--lc-inner-light);
  border-radius: var(--lc-radius-xl);
  border-bottom: none;
  padding: 24px;
  transition:
    color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s ease;
}

body.search .lc-feed .lc-project-card.lc-glass:last-child {
  border-bottom: none;
}

body.search .lc-feed .lc-project-card:hover {
  background: var(--lc-glass);
  box-shadow:
    0 4px 14px rgba(30, 40, 60, 0.07),
    0 12px 28px rgba(30, 40, 60, 0.08),
    var(--lc-inner-light);
}

body.search .lc-feed .lc-project-card {
  overflow: hidden;
}

body.search .lc-feed .lc-project-card__logo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 18px;
  box-shadow: var(--lc-shadow), var(--lc-inner-light);
}

body.search .lc-feed .lc-project-card__head {
  align-items: flex-start;
  gap: 14px;
}

body.search .lc-feed .lc-project-card__heading h2 {
  font-size: 1.35rem;
}

body.search .lc-feed .lc-project-card__intro {
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* ── Lightbox ── */

.lc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lc-lightbox--active {
  opacity: 1;
  visibility: visible;
}

.lc-lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lc-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lc-lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 10;
}

.lc-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lc-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 10;
}

.lc-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lc-lightbox__nav--prev {
  left: 24px;
}

.lc-lightbox__nav--next {
  right: 24px;
}

.lc-lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--lc-font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .lc-lightbox__nav--prev {
    left: 12px;
  }

  .lc-lightbox__nav--next {
    right: 12px;
  }

  .lc-lightbox__close {
    top: 12px;
    right: 12px;
  }

  .lc-lightbox__counter {
    bottom: 12px;
  }
}

