/* Real-Screen Interactive Works Showcase (#works) */
#works {
  position: relative;
  z-index: 2;
  background: #171816;
  color: #f5f2eb;
  padding: clamp(68px, 8vw, 112px) 0;
}

.portfolio-shell {
  max-width: 1340px;
  margin-inline: auto;
  padding-inline: clamp(20px, 3.6vw, 48px);
}

.portfolio-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(245, 242, 235, 0.1);
}

.portfolio-heading-main {
  max-width: 620px;
}

.portfolio-title {
  margin: 0 0 8px;
  font-family: "Noto Serif TC", "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.95rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #f8f5ee;
}

.portfolio-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(245, 242, 235, 0.62);
}

/* Soft Pill Filter Tabs */
.portfolio-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.portfolio-filter {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 242, 235, 0.62);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.portfolio-filter span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.portfolio-filter:hover {
  color: #f8f5ee;
}

.portfolio-filter.is-active {
  background: #f3efe6;
  color: #171816;
  font-weight: 600;
}

/* Split Layout: Sticky Live Product Viewport (46%) + 13-Row Index (54%) */
.portfolio-split {
  display: grid;
  grid-template-columns: minmax(360px, 0.46fr) minmax(0, 0.54fr);
  gap: clamp(28px, 3.8vw, 52px);
  align-items: start;
}

.portfolio-spotlight {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-radius: 20px;
  background: #21221f;
  border: 1px solid rgba(245, 242, 235, 0.09);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
}

.spotlight-stage {
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.spotlight-stage.is-switching {
  opacity: 0.42;
  transform: translateY(3px);
}

/* Frameless Key Visual Artwork Stage */
.spotlight-browser {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #121311;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  text-decoration: none;
}

.spotlight-address {
  font-size: 12px;
  color: rgba(245, 242, 235, 0.45);
}

.spotlight-screen-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #121311;
}

.spotlight-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.spotlight-browser:hover .spotlight-screen {
  transform: scale(1.025);
}

.spotlight-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding-inline: 4px;
}

.spotlight-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  background: #161715;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.spotlight-head-copy {
  min-width: 0;
}

.spotlight-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.spotlight-title {
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.spotlight-kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 242, 235, 0.09);
  color: rgba(245, 242, 235, 0.78);
  font-size: 11px;
  font-weight: 500;
}

.spotlight-tagline {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(245, 242, 235, 0.88);
}

.spotlight-body {
  margin: 0;
  padding-inline: 4px;
  font-size: 14px;
  line-height: 1.78;
  color: rgba(245, 242, 235, 0.66);
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 4px 4px;
  border-top: 1px solid rgba(245, 242, 235, 0.09);
}

.spotlight-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 9px;
  border: 1px solid rgba(245, 242, 235, 0.18);
  background: transparent;
  color: #f5f2eb;
  font-size: 12.8px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.spotlight-btn svg {
  width: 13px;
  height: 13px;
}

.spotlight-btn:hover {
  background: rgba(245, 242, 235, 0.12);
  border-color: rgba(245, 242, 235, 0.34);
}

.spotlight-btn-primary {
  background: #f3efe6;
  color: #171816;
  border-color: #f3efe6;
  font-weight: 600;
}

.spotlight-btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #111210;
}

/* Right Column: 13 Clean Product Rows */
.portfolio-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(245, 242, 235, 0.09);
}

.product-card {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(245, 242, 235, 0.09);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.product-card:hover,
.product-card.is-selected {
  background: rgba(245, 242, 235, 0.06);
}

.portfolio-grid[data-active-filter="app"] .product-card:not([data-kind="app"]),
.portfolio-grid[data-active-filter="game"] .product-card:not([data-kind="game"]),
.portfolio-grid[data-active-filter="web"] .product-card:not([data-kind="web"]) {
  display: none;
}

.product-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.product-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #141513;
  flex-shrink: 0;
}

.product-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-main {
  min-width: 0;
}

.product-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.product-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f8f5ee;
}

.product-kind {
  font-size: 11px;
  color: rgba(245, 242, 235, 0.44);
}

.product-tagline {
  margin: 0;
  font-size: 13.2px;
  line-height: 1.45;
  color: rgba(245, 242, 235, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(245, 242, 235, 0.15);
  background: transparent;
  color: rgba(245, 242, 235, 0.88);
  font-size: 11.8px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.product-link svg {
  width: 11px;
  height: 11px;
}

.product-link:hover:not(.product-unavailable) {
  background: #f3efe6;
  color: #171816;
  border-color: #f3efe6;
}

.product-link-primary {
  background: rgba(245, 242, 235, 0.08);
  border-color: rgba(245, 242, 235, 0.22);
}

.product-unavailable {
  display: none;
}

.product-drawer {
  display: none;
  padding: 12px 0 2px 60px;
}

.product-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(245, 242, 235, 0.72);
}

.blog-project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 1060px) {
  .portfolio-split {
    grid-template-columns: 1fr;
  }
  .portfolio-spotlight {
    display: none;
  }
  .product-card {
    padding-inline: 10px;
  }
  .product-card.is-selected .product-drawer {
    display: block;
  }
  .product-tagline {
    white-space: normal;
  }
}

@media (max-width: 680px) {
  .product-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }
  .product-footer {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 6px;
  }
  .product-drawer {
    padding-left: 0;
  }
}
