@charset "utf-8";

.works-page {
  background: #090909;
  color: #fff;
}

.works-page header {
  position: fixed;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.works-page main,
.works-page footer {
  font-family: "Pretendard", "Lexend", sans-serif;
}

.works-main {
  min-height: 100vh;
}

.works-hero {
  padding: 120px 0 40px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)),
    url("../img/studio_b.png") center top / cover no-repeat;
}

.works-hero .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.works-hero .eyebrow {
  letter-spacing: 0.2em;
  font-size: 12px;
  color: #ff9696;
  margin-bottom: 16px;
}

.works-hero h2 {
  font-size: clamp(32px, 6vw, 64px);
  margin-bottom: 12px;
}

.works-hero h2.observer {
  font-size: 40px;
  font-weight: 700;
  color: #ff9696;
  margin-bottom: 30px;
}

.works-hero .lead {
  font-size: 18px;
  color: #d0d0d0;
  line-height: 1.6;
  max-width: 760px;
}

.works-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.works-stats li {
  list-style: none;
  min-width: 160px;
}

.works-stats strong {
  display: block;
  font-size: 32px;
  color: #ff9696;
}

.works-stats span {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}

.works-grid-section {
  padding: 40px 0 100px;
  background: #050505;
}

.works-grid-section .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.works-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.works-filter {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: background 0.2s ease;
}

.works-filter.is-active {
  background: #ff9696;
  color: #050505;
  border-color: #ff9696;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px;
}

.works-card {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.works-card__inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  display: flex;
  flex-direction: column;
  padding: 0;
  cursor: pointer;
}

.works-card__inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.works-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101010;
  overflow: hidden;
  position: relative;
}

.works-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.works-card__inner:hover .works-card__thumb img {
  transform: scale(1.05);
}

.works-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.2em;
  background: rgba(0, 0, 0, 0.6);
  color: #ff9696;
}

.works-card__body {
  padding: 24px;
  color: #fff;
}

.works-card__body h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.5;
  height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.works-card__description {
  font-size: 16px;
  line-height: 1.5;
  color: #bcbcbc;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.works-card__meta {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
}

.works-empty {
  text-align: center;
  color: #999;
  font-size: 16px;
  margin-top: 60px;
}

.works-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.works-modal[hidden] {
  display: none;
}

.works-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.works-modal__dialog {
  position: relative;
  width: min(1280px, 96vw);
  max-height: 96vh;
  background: #050505;
  border-radius: 24px;
  padding: 40px;
  overflow-y: auto;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.works-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.works-modal__close::before,
.works-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1px;
  background: #fff;
}

.works-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.works-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.works-modal__body {
  color: #fff;
  margin-top: 24px;
}

.works-modal__figure {
  margin: 0 0 24px 0;
  display: flex;
  justify-content: center;
}

.works-modal__figure img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
}

.works-modal__video {
  position: relative;
  width: 100%;
  max-width: calc(80vh * 16 / 9);
  /* Limit width to maintain 16:9 ratio within 80vh height */
  aspect-ratio: 16 / 9;
  margin: 0 auto 24px;
}

.works-modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.works-modal__title {
  font-size: 24px;
  margin-bottom: 12px;
}

.works-modal__description {
  font-size: 16px;
  line-height: 1.6;
  color: #dcdcdc;
}

.is-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 1024px) {
  .works-hero {
    padding-top: 100px;
  }
}

@media screen and (max-width: 768px) {
  .works-page header {
    position: sticky;
  }
}

/* Pagination */
.works-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
}

.works-pagination__item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font-size: 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.works-pagination__item:hover {
  border-color: #ff9696;
  color: #ff9696;
}

.works-pagination__item.is-active {
  background: #ff9696;
  color: #050505;
  border-color: #ff9696;
}

/* Load More Button */
.btn-load-more {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin: 40px auto 0;
  padding: 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #050505;
  background: #ff9696;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-load-more:active {
  transform: scale(0.96);
}

@media screen and (max-width: 768px) {
  .works-page header {
    position: sticky;
  }

  .works-main {
    padding-top: 0;
  }

  .works-stats {
    gap: 24px;
  }

  .works-grid {
    gap: 16px;
  }

  .works-modal__dialog {
    width: 96vw;
    max-height: 92vh;
    padding: 24px;
  }

  .works-pagination {
    margin-top: 40px;
  }
}