/* ── 디자인시스템.md 값 ─────────────────────────
   메인(index.html)과 상세(work.html)가 함께 쓰는 스타일 */
:root {
  /* 2절 색 */
  --bg: #FFFFFF;
  --text: #000000;
  --sub: #747778;
  --point: #000000;

  /* 3절 글자 : 모든 용도 14px / -0.01em, 행간 1.5 (작업물 설명란만 1.25) */
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --size: 14px;
  --leading: 1.5;
  --leading-caption: 1.25;
  --tracking: -0.01em;

  /* 4절 여백 (폭 넓게 1200 / 요소 사이 좁게 16) */
  --max: 1200px;
  --section: 140px;
  --gap: 16px;
  --side: 24px;

  /* 5절 형태 : 모서리 0 / 테두리 없음 / 그림자 없음 */
  --radius: 0px;

  /* 마우스 커서 : 도트 한 칸 = 4px
     평소 = 도트 한 칸, 작업물·링크 위 = 같은 크기 도트로 그린 화살표 (asset/커서_호버.png 모양만 참고, 모노톤) */
  --cursor-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='4' height='4' fill='%23000'/%3E%3C/svg%3E") 0 0, auto;
  --cursor-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges' fill='%23000'%3E%3Crect x='0' y='0' width='4' height='4'/%3E%3Crect x='4' y='0' width='4' height='4'/%3E%3Crect x='8' y='0' width='4' height='4'/%3E%3Crect x='16' y='0' width='4' height='4'/%3E%3Crect x='0' y='4' width='4' height='4'/%3E%3Crect x='0' y='8' width='4' height='4'/%3E%3Crect x='0' y='16' width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3Crect x='8' y='8' width='4' height='4'/%3E%3Crect x='12' y='12' width='4' height='4'/%3E%3Crect x='16' y='16' width='4' height='4'/%3E%3Crect x='20' y='20' width='4' height='4'/%3E%3Crect x='24' y='24' width='4' height='4'/%3E%3C/svg%3E") 0 0, pointer;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--side); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size);
  line-height: var(--leading);
  letter-spacing: var(--tracking);
  font-weight: 400;
  text-align: left;
  cursor: var(--cursor-dot);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; cursor: var(--cursor-arrow); }
img { display: block; width: 100%; }
ul { list-style: none; }

/* ── 3 그리드 : 1열 = 로고 · 메뉴 · 연락처 · 저작권 (고정) / 오른쪽 2열 = 내용 ── */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--side);
  display: grid;
  /* 3열 비율 4 : 7 : 7 — ref/글꼴.png 에서 1열이 콘텐츠 폭의 약 22% */
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr) minmax(0, 7fr);
  column-gap: var(--gap);
}
.side {
  grid-column: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  /* 바깥 여백을 좌우와 같은 24px 로 → 로고는 좌상단, 저작권은 좌하단 */
  padding: var(--side) 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.side-top, .side-bottom { display: flex; flex-direction: column; gap: var(--gap); }
main { grid-column: 2 / span 2; padding-top: var(--side); }
/* 저작권 : 글자 아래 여백(행간)을 없애 좌하단 여백선에 딱 맞춤 */
.copyright { line-height: 1; }

/* 로고 : asset/Logo.svg, 보내 준 캡처의 로고 크기(63 × 24px)에 맞춤 */
.logo { display: inline-block; width: 63px; align-self: flex-start; }

/* 내비게이션 : 선택했거나 그 영역에 있을 때만 검정, 나머지는 회색 유지 */
.nav a { color: var(--sub); }
.nav a.is-current { color: var(--point); }

.sub { color: var(--sub); }
.label { color: var(--sub); margin-bottom: var(--gap); }

/* 연락처 : 제목 없이, 이름 바로 옆에 화살표, 왼쪽 정렬 */
.contact a:hover { color: var(--sub); }

/* ── 작업물 : 오른쪽 2열, 스크롤하면서 이어짐 ── */
.works { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); align-items: start; }
.works-col { display: flex; flex-direction: column; gap: var(--gap); }
.work { display: block; cursor: var(--cursor-arrow); }
.thumb { position: relative; overflow: hidden; border-radius: var(--radius); background: #F4F4F4; }

/* 호버 : 사진 위로 하얀 오버레이가 올라오고, 좌하단에 한 줄 설명 */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--gap);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  line-height: var(--leading-caption);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.work:hover .overlay,
.work:focus-visible .overlay { opacity: 1; }
.thumb img { height: 100%; object-fit: cover; object-position: center; }
.r43 { aspect-ratio: 4 / 3; }   /* 웹 · 브랜딩 */
.r34 { aspect-ratio: 3 / 4; }   /* 모바일 앱 */
.thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--sub); }
/* 설명란 : ref/글꼴.png 기준 — 이미지와 6px, 줄 간격 1.25
   제목은 사진 왼쪽 끝, 연도는 사진 오른쪽 끝에 맞춰 가로로 */
.caption {
  padding-top: 6px;
  line-height: var(--leading-caption);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap);
}
.caption .title { font-weight: 700; }

/* 페이지 끝 여백 = 위쪽 여백 24px → 맨 아래까지 스크롤하면 위아래 끝 행 여백이 같음 */
#about { margin-top: var(--section); padding-bottom: var(--side); }
.about-text { max-width: calc((100% - var(--gap)) / 2); }

/* ── 상세 페이지 (work.html) ─────────────────────
   1열 = 메인과 같은 고정 열 + 프로젝트 목록
   2열 = 쇼잉 이미지가 세로로 이어짐 / 3열 = 제목 · 연도 · 작품 설명 (고정) */
.projects ul { line-height: var(--leading-caption); display: flex; flex-direction: column; gap: 4px; }
.projects a { color: var(--sub); }
.projects a.is-current { color: var(--point); }

.detail { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); align-items: start; padding-bottom: var(--side); }
.showing { display: flex; flex-direction: column; gap: var(--gap); }
.info { position: sticky; top: var(--side); }
.info .caption { padding-top: 0; }
.info-desc { margin-top: var(--gap); }

/* ── 좁은 화면 : 한 줄로 쌓기 ── */
@media (max-width: 760px) {
  .page { display: flex; flex-direction: column; }
  .side { display: contents; }
  .side-top { order: 0; padding-top: var(--side); }
  main { order: 1; padding-top: var(--section); }
  .side-bottom { order: 2; padding: 0 0 var(--side); }
  .about-text { max-width: none; }

  .detail { display: flex; flex-direction: column; gap: var(--gap); padding-bottom: var(--section); }
  .info { position: static; order: -1; }
}
