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

:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --dim: #aaa;
  --accent: #0a0a0a;
  --line: #e5e5e5;
  --font: 'Hanken Grotesk', 'Pretendard', sans-serif;
}

html, body, #root {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  cursor: none;
}

/* CURSOR */
#cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s;
  mix-blend-mode: difference;
}
#cursor.expanded { width: 44px; height: 44px; }

/* LAYOUT */
#app { display: grid; grid-template-columns: 240px 1fr; height: 100vh; }

/* NAV */
#nav {
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  z-index: 10;
}
.site-name { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.site-sub { font-size: 10px; color: var(--dim); letter-spacing: .06em; margin-bottom: 48px; }
.nav-group-label { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: #bbb; margin-bottom: 8px; }
.nav-links { list-style: none; }
.nav-links li { margin-bottom: 1px; }
.nav-links a {
  display: block; padding: 4px 0; text-decoration: none;
  color: var(--dim); font-size: 12px; letter-spacing: .05em;
  transition: color .15s; cursor: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::before { content: '→ '; color: var(--accent); }
#nav-bottom { font-size: 10px; color: #aaa; letter-spacing: .06em; line-height: 1.8; }
#nav-bottom a { color: #aaa; text-decoration: none; }
#nav-bottom a:hover { color: var(--dim); }

/* PANELS */
#main { position: relative; overflow: hidden; }
.panel {
  position: absolute; inset: 0; overflow-y: auto;
  padding: 36px 44px 80px; opacity: 0; pointer-events: none;
  transition: opacity .3s; scrollbar-width: thin; scrollbar-color: #ddd transparent;
}
.panel::-webkit-scrollbar { width: 2px; }
.panel::-webkit-scrollbar-thumb { background: #ddd; }
.panel.active { opacity: 1; pointer-events: all; }

/* HOME LIST */
.list-heading { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: #aaa; margin-bottom: 6px; padding-top: 4px; }
.project-list { list-style: none; margin-bottom: 40px; }
.project-item {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: baseline; gap: 0 12px; padding: 8px 0;
  border-bottom: 1px solid var(--line); transition: border-color .15s; cursor: none;
}
.project-item:hover { border-color: #ccc; }
.project-year { font-size: 11px; color: #bbb; letter-spacing: .04em; user-select: none; }
.project-name { font-size: 13px; color: var(--text); text-decoration: none; letter-spacing: .02em; transition: color .15s; cursor: none; }
.project-item:hover .project-name { color: var(--accent); }
.project-tag { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #bbb; transition: color .15s; }
.project-item:hover .project-tag { color: var(--dim); }

/* HOVER PREVIEW */
#preview {
  position: fixed; pointer-events: none; z-index: 900;
  opacity: 0; transition: opacity .2s; transform: translate(20px, -50%);
}
#preview.show { opacity: 1; }
#preview img { display: block; width: 300px; height: 188px; object-fit: cover; filter: grayscale(15%) contrast(1.08); }
#preview-cap { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }

/* SOUND / IMAGE LIST */
.sound-list, .image-list { list-style: none; border-top: 1px solid var(--line); }
.sound-item, .image-item {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: baseline; gap: 0 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line); cursor: none; transition: border-color .15s;
}
.sound-item:hover, .image-item:hover { border-color: #ccc; }
.sound-item:hover .sound-title, .image-item:hover .image-title { color: var(--accent); }
.sound-item:hover .sound-tag,  .image-item:hover .image-tag  { color: var(--dim); }
.sound-year,  .image-year  { font-size: 11px; color: #bbb; letter-spacing: .04em; }
.sound-title, .image-title { font-size: 13px; color: var(--text); letter-spacing: .02em; transition: color .15s; }
.sound-tag,   .image-tag   { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #bbb; transition: color .15s; }

/* INTRO BLOCK */
.home-tag { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.home-bio { font-size: 13px; color: #888; line-height: 1.85; max-width: 520px; }

/* DETAIL */
.detail-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); cursor: none; margin-bottom: 40px;
  background: none; border: none; font-family: var(--font); padding: 0; transition: color .15s;
}
.detail-back:hover { color: var(--text); }
.detail-back::before { content: '←'; color: var(--accent); margin-right: 4px; }
.detail-header { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 40px; }
.detail-label { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.detail-title { font-size: 28px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.detail-meta { font-size: 11px; color: #aaa; letter-spacing: .06em; display: flex; gap: 20px; flex-wrap: wrap; }
.detail-meta span { display: flex; gap: 6px; }
.detail-meta .mk { color: #bbb; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 40px; }
.detail-grid.single { grid-template-columns: 1fr; }
.detail-grid.triple { grid-template-columns: 1fr 1fr 1fr; }
.dgrid-item { position: relative; overflow: hidden; cursor: none; }
.dgrid-item img { width: 100%; display: block; transition: transform .5s cubic-bezier(.25,.46,.45,.94), filter .3s; filter: grayscale(15%) contrast(1.06); }
.dgrid-item:hover img { transform: scale(1.03); filter: grayscale(0%) contrast(1.1); }
.dgrid-caption { margin-top: 8px; font-size: 10px; color: #aaa; letter-spacing: .12em; text-transform: uppercase; line-height: 1.6; }
.dgrid-caption .cap-title { color: var(--dim); display: block; margin-bottom: 2px; }
.dgrid-caption .cap-desc { color: #bbb; font-size: 9px; }


/* INFO */
.info-block { max-width: 500px; margin-bottom: 52px; }
.info-heading { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.info-body { font-size: 13px; color: #888; line-height: 1.9; }
.info-body p { margin-bottom: 14px; }
.info-body a { color: var(--accent); text-decoration: none; }
.info-body a:hover { text-decoration: underline; }
.clist { list-style: none; }
.clist li { display: flex; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; align-items: baseline; }
.ckey { font-size: 10px; color: #bbb; letter-spacing: .1em; min-width: 80px; flex-shrink: 0; }
.cval { color: var(--text); }
.cval a { color: var(--text); text-decoration: none; }
.cval a:hover { color: var(--accent); }

/* LIGHTBOX */
#lightbox {
  position: fixed; inset: 0; background: rgba(255,255,255,0.96);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lb-img { max-width: 88vw; max-height: 88vh; object-fit: contain; filter: contrast(1.06); }
#lb-close {
  position: absolute; top: 20px; right: 28px; background: none; border: none;
  font-family: var(--font); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); cursor: none; transition: color .15s;
}
#lb-close:hover { color: var(--text); }
#lb-cap { position: absolute; bottom: 24px; font-size: 9px; color: #aaa; letter-spacing: .18em; text-transform: uppercase; }

/* MOBILE */
@media (max-width: 640px) {
  html, body { overflow: auto; cursor: auto; }
  #cursor { display: none; }
  #app { grid-template-columns: 1fr; height: auto; }
  #nav { border-right: none; border-bottom: 1px solid var(--line); padding: 20px; }
  .site-sub { margin-bottom: 20px; }
  #main { height: auto; }
  .panel { position: relative; opacity: 1; pointer-events: all; padding: 20px 20px 60px; }
  .panel:not(.active) { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid.triple { grid-template-columns: 1fr 1fr; }
}

/* ── DETAIL META ROW (메타 + 링크 양쪽 정렬) ── */
.detail-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── 하이퍼링크 ── */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border: 0.5px solid var(--text);
  padding: 6px 14px;
  transition: background .15s, color .15s;
  cursor: none;
}
.project-link:hover {
  background: var(--text);
  color: var(--bg);
}
.project-link-arrow { font-size: 11px; transition: transform .15s; }
.project-link:hover .project-link-arrow { transform: translate(2px, -2px); }

/* ── 사운드클라우드 플레이어 ── */
.sc-player-wrap { margin-bottom: 40px; }
.sc-player-label {
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 10px;
}
.sc-player {
  display: block;
  width: 100%;
  height: 166px;
  border: none;
  border-top: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
}

/* ── DESCRIPTION 반응형 ── */
.detail-caption-block {
  max-width: 100%;
  margin-bottom: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.detail-caption-block p {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 6px;
  max-width: 720px;
}
.detail-caption-block p:last-child { margin-bottom: 0; }
