@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Noto+Sans+KR:wght@400;500&family=Open+Sans:wght@600&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  --bg: #FFFFFF;
  --text: #000000;
  --muted: #000000;
  --border: #DDDCD7;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ─────────────────────────────── */

.en {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, .logo, nav a, .filter-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

/* ─── HEADER ─────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: var(--bg);
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  letter-spacing: 0.005em;
  transition: color 0.18s;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

/* ─── FOOTER ─────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 20px 48px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--muted);
}

/* ─── INDEX: FILTER BAR ──────────────────────── */

.filter-bar {
  position: sticky;
  top: 29px;
  z-index: 199;
  background-color: var(--bg);
  border-bottom: 1px solid #000;
}

.filter-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-btns-group {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

.view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 24px;
  flex-shrink: 0;
}

.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  color: var(--text);
  opacity: 0.25;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: opacity 0.18s;
}

.view-btn:hover {
  opacity: 0.6;
}

.view-btn.active {
  opacity: 1;
}

.filter-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.18s;
  line-height: 1;
  text-align: left;
}

.filter-btn:hover {
  color: #727272;
}

.filter-btn.active {
  color: var(--text);
}

/* ─── INDEX: GRID ────────────────────────────── */

.grid {
  display: flex;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.grid-col {
  flex: 1;
  height: 100%;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 20px 10px 96px;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
}

.grid-col::-webkit-scrollbar {
  display: none;
}

.grid-col:first-child {
  padding-left: 0;
}

.grid-col:last-child {
  padding-right: 0;
}

.grid-col .project-card {
  margin-bottom: 20px;
}

.grid.list-view {
  display: block;
  overflow: visible;
  height: auto !important;
  padding: 0 48px;
}

/* ─── PROJECT CARD ───────────────────────────── */

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}

.project-card.hidden {
  display: none;
}

.thumb-wrap {
  width: 100%;
  aspect-ratio: 390 / 510;
  overflow: hidden;
  margin-bottom: 10px;
}

.thumb-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: filter 0.35s ease;
}

video.thumb-img {
  pointer-events: none;
}

.project-card:hover .thumb-img {
  filter: brightness(0.85);
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  text-align: center;
  width: 100%;
  min-width: 0;
}

.card-tag {
  font-family: 'Open Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-tag-item {
  text-decoration: underline;
}

.card-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.card-year {
  display: none;
}

/* ─── LIST VIEW ──────────────────────────────── */

.grid.list-view {
  display: block;
  counter-reset: project-counter;
}

.list-view-header {
  display: none;
}

.grid.list-view .list-view-header {
  display: grid;
  grid-template-columns: 32px 1fr 56px 200px;
  align-items: center;
  gap: 0 16px;
  padding: 8px 0;
  background: var(--bg);
  border-bottom: 1px solid #000;
  position: sticky;
  top: 68px;
  z-index: 50;
}

.list-header-no {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.list-header-name {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.list-sort-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0;
  text-align: right;
  transition: color 0.18s;
}

.list-sort-btn:hover {
  color: #aaa;
}

.list-sort-btn.sort-active {
  color: var(--text);
}

.grid.list-view .project-card {
  display: grid;
  grid-template-columns: 32px 1fr 56px 200px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 0 16px;
  counter-increment: project-counter;
}

.grid.list-view .project-card::before {
  content: counter(project-counter, decimal-leading-zero);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #aaa;
}

.grid.list-view .thumb-wrap {
  display: none;
}

.grid.list-view .card-meta {
  display: contents;
}

.grid.list-view .card-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.grid.list-view .card-year {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  text-align: right;
  margin-top: 0;
}

.grid.list-view .card-tag {
  font-size: 10px;
  text-align: right;
}

/* ─── PROJECT DETAIL PAGE ────────────────────── */

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted);
  padding: 18px 48px;
  transition: color 0.18s;
}

.project-back:hover {
  color: var(--text);
}

.project-back svg {
  transition: transform 0.18s;
}

.project-back:hover svg {
  transform: translateX(-3px);
}

.detail-images {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.detail-img-section {
  width: 100%;
}

.detail-img-row {
  display: flex;
  gap: 0;
}

.detail-img-row .detail-img-section {
  flex: 1;
  min-width: 0;
}

.detail-img-section .img-placeholder {
  width: 100%;
  height: auto;
  display: block;
}

.detail-divider {
  border-top: 1px solid #000;
  width: 100%;
}

.detail-text {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 48px 120px;
}

.detail-text-meta {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-text-tag {
  text-decoration: underline;
}

.detail-text-title {
  font-family: 'Pretendard', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 0;
}

.detail-text-title + .detail-text-desc {
  margin-top: 4px;
}

.detail-text-desc {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.44;
  color: var(--text);
}

.detail-text-meta-block {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 0;
  white-space: pre-line;
}

.detail-text-desc-ko {
  margin-top: 20px;
  margin-bottom: 0;
  white-space: pre-line;
}

.detail-text-meta-block + .detail-text-desc-ko {
  margin-top: 0;
}

.detail-text-desc-en {
  margin-top: 0;
}

.detail-text-desc-en + .detail-text-desc-en {
  margin-top: 0;
}

.detail-text-label {
  font-size: 16px;
}

.detail-text-desc:not(.detail-text-label) + .detail-text-label {
  margin-top: 1px;
}

/* ─── ABOUT PAGE ─────────────────────────────── */

.about-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 48px 120px;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}

.about-intro h1 {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 36px;
}

.about-intro p.en {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 20px;
}

.about-intro p.ko {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 20px;
}

.about-intro .contact {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-intro .contact a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 1px;
  width: fit-content;
  transition: opacity 0.18s;
}

.about-intro .contact a:hover {
  opacity: 0.5;
}

.about-cv {
  /* CV column */
}

/* ─── About page layout ──────────────────────────────────────── */

.about-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: calc(100vh - 31px);
  overflow: hidden;
}

.about-col {
  height: 100%;
  overflow-y: scroll;
  overscroll-behavior: contain;
  padding: 72px 0 120px;
  scrollbar-width: none;
}

.about-col::-webkit-scrollbar {
  display: none;
}

.about-col:first-child {
  padding-right: 64px;
  border-right: 1px solid var(--border);
}

.about-col:last-child {
  padding-left: 64px;
}

.about-section {
  margin-bottom: 35px;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-en {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 4px;
}

.about-ko {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.about-cv-download {
  padding-top: 8px;
}

.cv-download-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #555555;
  text-decoration: none;
  border-bottom: 1px solid #555555;
  padding-bottom: 2px;
  transition: opacity 0.18s;
}

.cv-download-link:hover {
  opacity: 0.45;
}

.cv-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-bottom: 2px;
}

.about-contact {
  margin-top: 35px;
}

.about-contact-item {
  margin-top: 0;
  line-height: 1.6;
}

.about-contact-key {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #888888;
}

.about-contact-val {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.18s;
}

.about-contact-val:hover {
  opacity: 0.45;
}

.cv-block {
  margin-bottom: 35px;
}

.cv-block h2 {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.cv-table {
  width: 100%;
  border-collapse: collapse;
}

.cv-table tr {
  border-bottom: 1px solid var(--border);
}

.cv-table td {
  padding: 12px 0;
  font-size: 13px;
  vertical-align: top;
  line-height: 1.55;
}

.cv-table td.year {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--muted);
  width: 52px;
  padding-right: 24px;
  white-space: nowrap;
}

.cv-table td.item {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
}

.cv-table td.item span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── RESPONSIVE ─────────────────────────────── */

@media (max-width: 768px) {

  /* Header: 로고 + 네비 한 줄 유지 */
  .header-inner {
    padding: 0 20px;
  }

  nav {
    gap: 18px;
  }

  nav a {
    font-size: 12px;
  }

  /* Filter bar: 모바일 2줄 허용 */
  .filter-bar {
    height: auto;
  }

  .filter-bar-inner {
    padding: 8px 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 10px;
    height: auto;
  }

  .filter-btns-group {
    flex-wrap: wrap;
    gap: 8px 10px;
    justify-content: flex-start;
  }

  .view-toggle {
    margin-left: 0;
  }

  .filter-btn {
    font-size: 13px;
    flex-shrink: 0;
  }

  .grid.list-view .list-view-header,
  .grid.list-view .project-card {
    grid-template-columns: 28px 1fr 48px;
  }

  .grid.list-view .list-view-header .list-sort-btn[data-sort="tagLabel"],
  .grid.list-view .card-tag {
    display: none;
  }

  .grid.list-view .list-view-header {
    top: auto;
  }

  /* Grid: 모바일 2열 독립 스크롤 */
  .grid {
    padding: 0 20px;
  }

  .grid-col {
    padding: 16px 8px 64px;
  }

  .grid-col:first-child {
    padding-left: 0;
  }

  .grid-col:last-child {
    padding-right: 0;
  }

  .grid-col .project-card {
    margin-bottom: 16px;
  }

  .grid.list-view {
    padding: 0 20px;
  }

  /* 카드 폰트 조정 */
  .card-title {
    font-size: 14px;
  }

  .card-tag {
    font-size: 9px;
  }

  /* 프로젝트 상세 */
  .project-back {
    padding: 16px 20px;
    font-size: 11px;
  }

  .detail-images {
    padding: 0 20px;
  }


  .detail-text {
    padding: 40px 20px 72px;
  }

  .detail-text-meta {
    font-size: 9px;
    margin-bottom: 1px;
  }

  .detail-text-title {
    font-size: 14px;
  }

  .detail-text-label {
    font-size: 11px;
  }

  .detail-text-desc {
    font-size: 12px;
    line-height: 1.44;
  }

  /* About 페이지 */
  .about-wrap {
    grid-template-columns: 1fr;
    padding: 40px 20px 72px;
    gap: 40px;
  }

  .about-intro h1 {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .about-intro p.en {
    font-size: 14px;
  }

  /* CV 표: 가로 스크롤 */
  .cv-block {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cv-table {
    min-width: 320px;
  }

  /* About page layout */
  .about-page {
    padding: 0 24px;
  }

  .about-columns {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .about-col {
    height: auto;
    overflow-y: visible;
    padding: 35px 0;
  }

  .about-col:first-child {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .about-col:last-child {
    padding-left: 0;
  }

  /* Footer */
  footer {
    padding: 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
