/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-soft: rgba(20, 20, 20, 0.6);
  --ink-header: #3f3f3f;   /* site name / nav */
  --accent: #d6432a;       /* title / active-year / caption red */
  --rule: rgba(20, 20, 20, 0.14);

  /* 이름(로고)과 contact 본문에만 쓰는 세리프 폰트 */
  --font-serif: "Times New Roman", "Noto Serif KR", Georgia, "Nanum Myeongjo", serif;
  /* 그 외 전반(메뉴, 제목, 본문)에 쓰는 헬베티카 계열 산세리프 폰트 */
  --font-sans: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

  --font-display: var(--font-sans);
  --font-body: var(--font-sans);

  --gutter: 24px;       /* 우측 여백 기준 */
  --gutter-left: 44px;  /* 좌측 여백 — 우측보다 조금 더 넓게 */
  --header-h: 118px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

img { max-width: 100%; display: block; }

/* =========================================================
   Header (name + nav) — shared across every page
   ========================================================= */
.site-header {
  padding-top: 40px;
  padding-bottom: 10px;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter);
}

.site-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1;
  color: var(--ink-header);
}

.site-name a { text-decoration: none; }

.site-nav {
  margin-top: 10px;
  margin-left: 3px; /* 이름 글자의 좌측 여백(사이드 베어링)에 맞춘 시각 보정 */
  font-size: 14px;
  color: var(--ink-header);
}

.site-nav a {
  margin-right: 2px;
}

.site-nav .sep {
  margin: 0 6px;
  color: var(--ink-soft);
}

.site-nav a.active {
  text-decoration-color: currentColor;
}

/* year sub-nav on the works page */
.year-nav {
  margin-top: 4px;
  font-size: 14px;
  letter-spacing: 0.4px;
}

.year-nav a {
  margin-right: 4px;
}

.year-nav .sep {
  margin: 0 8px;
}

.year-nav a.active {
  color: var(--accent);
}
/* =========================================================
   Home — flat chronological list
   ========================================================= */
.work-list {
  list-style: none;
  margin: 26px 0 0;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter);
  max-width: 640px;
}
.work-list li { margin: 0 0 4px; }
.work-list a { font-size: 15px; }

/* =========================================================
   Works grid (masonry canvas)
   ========================================================= */
.grid-wrap {
  position: relative;
  margin: 30px 0 80px;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter);
}

.grid-canvas {
  position: relative;
  width: 100%;
}

.grid-item {
  position: absolute;
  width: var(--item-w, 150px);
  transition: opacity 0.25s ease;
}

.grid-item.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.grid-item figure {
  margin: 0;
}

.grid-item img {
  width: 100%;
  height: var(--item-h, 82px);
  object-fit: cover;
  display: block;
}

.grid-item figcaption {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--accent);
  line-height: 1.3;
}

.grid-empty {
  padding-left: var(--gutter-left);
  padding-right: var(--gutter);
  color: var(--ink-soft);
  font-size: 14px;
}

/* =========================================================
   Work detail page
   ========================================================= */
.work-detail { padding: 0 var(--gutter) 100px var(--gutter-left); }

.work-back {
  display: inline-block;
  margin: 26px 0 30px;
  font-size: 13px;
}

.work-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  font-size: 13.5px;
}

.work-meta .field-label {
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: none;
  margin-bottom: 2px;
}

.work-title-block .work-title {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 8px;
}

.work-title-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-title-block li { margin-bottom: 2px; }

.work-info p { margin: 0 0 10px; }

.work-cast ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-cast li { margin-bottom: 2px; }

.work-images {
  column-count: 2;
  column-gap: 24px;
}
.work-images figure {
  margin: 0 0 24px;
  break-inside: avoid;
}
.work-images img { width: 100%; height: auto; }

.work-body {
  max-width: 640px;
  margin: 40px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
}

/* =========================================================
   Plain text pages (cv / text / contact)
   ========================================================= */
.text-page {
  padding: 0 var(--gutter) 100px var(--gutter-left);
  max-width: 640px;
}
.text-page .prose {
  font-size: 14.5px;
  line-height: 1.75;
.page-cv .prose {
  margin-top: 50px;
}
.text-page .prose p { margin: 0 0 1.1em; }
.text-page .prose ul { padding-left: 1.2em; }

.page-contact .prose {
  font-family: var(--font-serif);
  font-size: 18px;
}

/* =========================================================
   Text — blog-style list (works와 동일한 md + index.json 구조)
   ========================================================= */
.text-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}
.text-list li { margin: 0 0 10px; }
.text-list a {
  display: grid;
  grid-template-columns: 100px 1fr;
  column-gap: 28px;
  align-items: baseline;
  font-size: 15px;
}

.text-list-date {
  color: var(--ink-soft);
  white-space: nowrap;
}


.text-list-date {
  color: var(--ink-soft);
  white-space: nowrap;
}

.text-post-date {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 30px 0 6px;
}
.text-post-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 24px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .work-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --gutter-left: 26px; }
  .work-images { column-count: 1; }
  .work-meta { grid-template-columns: 1fr; gap: 18px; }
}
