@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  --color-bg: #F2F3F5;
  --color-text: #929599;
  --color-meta: #b0b3b8;
  --color-border: #d8d9db;
  --pad: 20px;
  --indent: 63px; /* aligns with "W/t" in logo */
  --selection-bg: #E7FFDD;
  --selection-text: #FFE6F8;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

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

body {
  font-family: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Split Layout ─── */

.split-layout {
  display: grid;
  grid-template-columns: 33.33% 10px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ─── Left Panel ─── */

.panel-left {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px 0 40px;
}

.left-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.left-scroll::after {
  content: '';
  display: block;
  height: 40px;
  flex-shrink: 0;
}

.left-scroll::-webkit-scrollbar { width: 3px; }
.left-scroll::-webkit-scrollbar-track { background: transparent; }
.left-scroll::-webkit-scrollbar-thumb { background: #c0c2c5; border-radius: 2px; }

.resize-handle {
  cursor: col-resize;
  position: relative;
  background: transparent;
  z-index: 10;
}

.resize-handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  border-left: 1px solid #666666;
  transition: border-color 0.15s;
}

.resize-handle::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  border-right: 1px solid #666666;
  transition: border-color 0.15s;
}

.resize-handle:hover::before {
  border-left-color: rgba(255, 255, 255, 0.4);
}

.resize-handle:hover::after {
  border-right-color: rgba(255, 255, 255, 0.4);
}

.panel-left::-webkit-scrollbar { width: 3px; }
.panel-left::-webkit-scrollbar-track { background: transparent; }
.panel-left::-webkit-scrollbar-thumb { background: #c0c2c5; border-radius: 2px; }

.logo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
  font-weight: 300;
  color: #000000;
  line-height: 1.0;
  letter-spacing: -0.02em;
  padding: 0 0 0 20px;
  margin-bottom: 30px;
  cursor: pointer;
}

.logo div:nth-child(2) { padding-left: 1px; }

.logo-ghost {
  visibility: hidden;
}

.logo-fade {
  opacity: 1;
  transition: opacity 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .logo:hover .logo-fade {
    opacity: 0;
  }
}

.bio {
  font-size: 14px;
  font-weight: 300;
  color: #000000;
  line-height: 19px;
  padding: 0 var(--pad) 0 var(--indent);
  margin-bottom: 28px;
  word-break: keep-all;
  font-family: 'Inter', 'Pretendard', sans-serif;
  letter-spacing: 0.01em;
}

.bio-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 var(--pad) 0 var(--indent);
  margin-bottom: 40px;
}

.bio-links a {
  font-size: 14px;
  font-weight: 300;
  color: #000000;
  letter-spacing: 0.01em;
  text-decoration: underline;
  transition: opacity 0.15s;
}

.bio-links a:hover {
  opacity: 0.6;
}

#bio-ig { text-decoration: none; }
#bio-ig span { text-decoration: underline; }

/* ─── Project Sections (Left) ─── */

.list-section {
  margin: 0 20px;
  container-type: inline-size;
}

.list-section + .list-section {
  margin-top: 40px;
}

.section-label {
  font-size: 14px;
  font-weight: 400;
  color: #000000;
  line-height: 19px;
  letter-spacing: 0;
  padding: 6px 0;
  border-bottom: 1px solid #666666;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid #666666;
  transition: background 0.1s, color 0.1s;
  cursor: pointer;
}

/* 목록 호버 — JS로 랜덤 컬러 적용 */
.list-row:hover,
.list-row.highlighted {
  background: transparent;
}

.list-name {
  font-family: 'Pretendard', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: #000000;
  line-height: 19px;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow: hidden;
}

.list-cat {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 300;
  color: #000000;
  line-height: 19px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
}

.list-client {
  font-family: 'Pretendard', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: #000000;
  line-height: 19px;
  letter-spacing: -0.02em;
  word-break: break-word;
  overflow: hidden;
  text-align: left;
}

.left-footer {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: #000000;
  letter-spacing: 0.01em;
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 0;
  margin: 0;
  grid-column: 1 / -1;
}

/* ─── Right Panel ─── */

.panel-right {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

.thumbnail-grid.single-col {
  grid-template-columns: 1fr;
}

.right-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #000000;
  padding: 20px var(--pad) 35px;
  flex-shrink: 0;
}

.rh-ghost {
  visibility: hidden;
}


/* ─── Thumbnail Grid ─── */

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 16px;
  padding: 0 var(--pad) 48px;
  flex: 1;
  overflow-y: auto;
}

.thumbnail-grid::-webkit-scrollbar { width: 3px; }
.thumbnail-grid::-webkit-scrollbar-track { background: transparent; }
.thumbnail-grid::-webkit-scrollbar-thumb { background: #c0c2c5; border-radius: 2px; }


.thumb-card {
  display: block;
}

.thumb-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e0e1e3;
  margin-bottom: 6px;
}

.thumb-image img,
.thumb-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.thumb-image .placeholder {
  width: 100%;
  height: 100%;
  background: #e0e1e3;
}

.thumb-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

/* 썸네일 호버 — 밝게 */
.thumb-card:hover .thumb-image::after,
.thumb-card.highlighted .thumb-image::after {
  background: rgba(255, 255, 255, 0.4);
}

.thumb-title,
.thumb-cat {
  transition: color 0.3s ease;
}

.thumb-card:hover .thumb-title,
.thumb-card.highlighted .thumb-title {
  color: rgba(146, 149, 153, 0.4);
}

.thumb-card:hover .thumb-cat,
.thumb-card.highlighted .thumb-cat {
  color: rgba(146, 149, 153, 0.3);
}

.thumb-info {
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.thumb-title {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  word-break: keep-all;
  color: #000000;
  letter-spacing: -0.02em;
}

.thumb-cat {
  font-family: 'Inter', sans-serif;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #666666;
  white-space: nowrap;
  position: relative;
  top: -3px;
}

/* ─── Responsive ─── */

@media (max-width: 960px) {
  .split-layout {
    grid-template-columns: 41.67% 8px 1fr;
  }
}

@container (max-width: 400px) {
  .list-row {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  }

  .list-cat {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    height: auto;
    overflow: auto;
  }

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

  .resize-handle {
    display: none;
  }

  .panel-left {
    height: auto;
    overflow-y: visible;
  }

  .left-scroll::after {
    display: none;
  }

  .left-footer {
    position: static;
    padding: 20px 0 20px var(--pad);
    grid-column: 1 / -1;
  }

  .panel-right {
    height: auto;
    overflow-y: visible;
  }

  .right-header {
    display: none;
  }

  .thumbnail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 12px;
    padding: 0 var(--pad) 24px;
  }

  .thumb-title {
    font-size: 16px;
    line-height: 21px;
  }

  .thumb-cat {
    top: -5px;
  }

  .list-section + .list-section {
    margin-top: 32px;
  }

  .list-row {
    grid-template-columns: minmax(0, 17fr) minmax(0, 8fr);
  }
}
