* {
  box-sizing: border-box;
  font-family:
    'SUIT',
    'Pretendard',
    'Noto Sans KR',
    system-ui,
    -apple-system,
    sans-serif;
  list-style: none;
}
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.project-main {
  max-width: 1600px;
  margin: 70px 50px 0;
  padding: 80px 16px 80px;
  min-height: 400px;
  overflow: hidden;
  clear: both;
  position: relative;
}
.aside-form {
  display: flex;
  gap: 0 64px;
}

.project-filter {
  display: block;
  margin: 0;
  position: relative;
  width: 190px;
  flex-shrink: 0;
}
.aside-content {
  max-width: 320px;
  height: auto;
  text-align: left;
}
.aside-content h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
}
.filter-list {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filter-item {
  cursor: pointer;
  color: #777;
  font-size: 0.95rem;
  padding: 6px 0;
  transition:
    color 0.2s ease,
    transform 0.15s ease;
}
.filter-item.active {
  font-weight: 600;
  color: #111;
  transform: translateX(2px);
}
.project-trigger {
  flex: 1;
}

.sub-content {
  width: 100%;
}

.sec1 {
  width: 100%;
}

.content-filter {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding: 0;
  gap: 16px;
}
.total {
  font-size: 0.95rem;
  color: #555;
}
.total strong {
  font-weight: 600;
}

.content-filter-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5f5f7;
  min-width: fit-content;
}
.search-box input[type='search'] {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 0.9rem;
  outline: none;
  min-width: 140px;
}
.search-box button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  background: #111;
  color: #fff;
  font-weight: 500;
  transition: opacity 0.15s ease;
}
.search-box button:hover {
  opacity: 0.85;
}

.sorting {
  position: relative;
}
.sort-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f6f6f8;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-btn::after {
  content: '▾';
  font-size: 0.7rem;
  opacity: 0.7;
}
.sort-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 8px 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  min-width: 140px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 10;
}
.sorting.open .sort-list {
  display: block;
  position: relative;
}
.sort-list li {
  margin: 0;
  padding: 0;
}
.sort-list button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 16px;
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
}
.sort-list button:hover {
  background: rgba(0, 0, 0, 0.04);
}

.grid-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  grid-row-gap: 32px;
  grid-column-gap: 24px;
  padding: 0;
  margin: 0;
  align-items: stretch;
}
[data-project-grid] {
  min-height: 120px;
}
[data-project-grid][data-loading='true'] {
  opacity: 0.6;
  pointer-events: none;
}

.project-item {
  display: flex;
  height: 100%;
}
.project-card-btn {
  border: none;
  background: #fff;
  border-radius: 24px;
  padding: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.2s ease;
}
.project-card-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  background: #f9fafc;
}

.project-item .img {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  aspect-ratio: 4 / 3;
  background: #f3f3f5;
}
.project-item .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.project-card-btn:hover .img img {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: none; /* 검은색 그라데이션 제거 */
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
.project-overlay .overlay-title {
  font-size: 0.9rem;
  font-weight: 700;
}
.project-overlay .overlay-sub {
  font-size: 0.78rem;
  opacity: 0.9;
}

.project-item .project-title {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.project-empty {
  margin: 32px 0 0;
  color: #6b6b6b;
  font-size: 0.95rem;
}

.project-scroll-sentinel {
  width: 100%;
  height: 1px;
  margin-top: 32px;
}

.project-upload {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: clamp(1rem, 3vw, 2rem);
  margin-bottom: 32px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.04);
}
.project-upload h2 {
  margin: 0 0 0.4rem;
}
.project-upload p {
  margin: 0 0 1.2rem;
  color: #6b6b6b;
  font-size: 0.95rem;
}
.project-upload form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}
.project-upload__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}
.project-upload__field input,
.project-upload__field select {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}
.project-upload button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  background: #111;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.project-upload button:hover {
  opacity: 0.85;
}
.project-upload__status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  color: #6b6b6b;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-modal[hidden] {
  display: none;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 17, 0.6);
  backdrop-filter: blur(10px);
}
.project-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 960px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 80px);
  background: #0b0b0c;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.2fr);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.project-modal-image-wrap {
  background: radial-gradient(circle at top, #1f1f23, #050507);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-modal-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
}

.project-modal-body {
  padding: 24px 24px 20px;
  color: #f5f5f7;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.project-modal-meta {
  margin: 0;
  font-size: 0.85rem;
  color: #a1a1aa;
}
.project-modal-link {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #61a4ff;
  text-decoration: none;
}
.project-modal-link:hover {
  text-decoration: underline;
}

.project-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  color: #f5f5f7;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.project-modal-close:hover {
  opacity: 1;
}

body.project-modal-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .aside-form {
    flex-direction: column;
    gap: 32px;
  }
  .project-filter {
    width: 100%;
  }

  .filter-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .filter-item {
    font-size: 0.85rem;
  }
  .grid-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-modal-dialog {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 40px);
  }
  .project-modal-image-wrap {
    padding-bottom: 16px;
  }
}

@media (max-width: 640px) {
  .grid-wrap {
    grid-template-columns: 1fr;
  }
  .content-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .content-filter-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .search-box {
    flex: 1;
  }
}
