/* portfolio.css — 이 사이트의 화면 전부.
 *
 * oak(골격 C)에서 가져온 것은 두 가지뿐이다: 왼쪽 고정 사이드바라는 뼈대와
 * 사진 확대 보기(lightbox.js, 아래 §9). 나머지는 디자이너 포트폴리오로 새로 짰다.
 *
 * 원칙 (레퍼런스 조사 2026-09-22):
 *   · 첫 화면에서 누구인지, 무엇을 하는지를 한 줄로 말한다
 *   · 작업 썸네일은 같은 비율의 타일 — 다양한 작업이 '흩어짐'이 아니라 '폭'으로 읽힌다
 *   · 캡션은 사진 위가 아니라 아래 — 인쇄물은 흰 바탕이 많아 어두운 스크림이 작업을 가린다
 *   · 색은 한 벌: 따뜻한 종이색 바탕 + 먹색 글자 + 사이드바의 짙은 갈색
 */

:root {
  --paper:   #f6f3ee;
  --paper-2: #efeae2;
  --card:    #ffffff;
  --ink:     #1c1814;
  --ink-2:   #4a433b;
  --mute:    #857b70;
  --line:    rgba(28, 24, 20, .12);
  --line-2:  rgba(28, 24, 20, .22);
  --accent:  #b4532a;          /* 테라코타 — 링크·숫자·강조 한 곳에만 */

  --sb-bg:   #1a140e;
  --sb-fg:   #f3efe8;
  --sb-mute: #a79d90;
  --sb-line: rgba(243, 239, 232, .14);
  --sb-w:    248px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;   /* 영문 장식 글자에만 */

  --gut: clamp(20px, 4vw, 64px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.7 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── 1. 뼈대 — 왼쪽 사이드바 + 본문 ─────────────────────────────── */
.sb {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 50;
  display: flex; flex-direction: column; background: var(--sb-bg); color: var(--sb-fg);
  padding: 40px 32px 32px;
}
.sb-brand { display: block; }
.sb-name { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.sb-en { display: block; margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--sb-mute); letter-spacing: .01em; }
.sb-role { margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--sb-mute); }
.sb-nav { margin-top: 56px; display: flex; flex-direction: column; }
.sb-nav a {
  display: flex; align-items: baseline; gap: 12px; padding: 11px 0;
  border-top: 1px solid var(--sb-line); font-size: 15px; color: var(--sb-mute);
  transition: color .2s var(--ease);
}
.sb-nav a:last-child { border-bottom: 1px solid var(--sb-line); }
.sb-nav a span { font-family: var(--serif); font-style: italic; font-size: 13px; opacity: .6; width: 18px; }
.sb-nav a:hover, .sb-nav a[aria-current="page"] { color: var(--sb-fg); }
.sb-nav a[aria-current="page"]::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: center; }
.sb-foot { margin-top: auto; font-size: 12px; line-height: 1.8; color: var(--sb-mute); }
.sb-foot a:hover { color: var(--sb-fg); }
.sb-burger { display: none; }

.main { margin-left: var(--sb-w); min-height: 100vh; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.sec { padding: clamp(64px, 9vw, 128px) 0; }
.sec + .sec { border-top: 1px solid var(--line); }

@media (max-width: 1023px) {
  .sb { position: sticky; inset: 0 0 auto; width: auto; height: 64px; padding: 0 20px; flex-direction: row; align-items: center; }
  .sb-brand { display: flex; align-items: baseline; gap: 10px; }
  .sb-name { font-size: 19px; }
  .sb-en { margin: 0; font-size: 15px; }
  .sb-role, .sb-foot { display: none; }
  .sb-burger { display: inline-flex; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 1px solid var(--sb-line); color: var(--sb-fg); font-size: 20px; cursor: pointer; }
  .sb-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0; padding: 8px 20px 20px; background: var(--sb-bg); }
  .sb-nav.open { display: flex; }
  .main { margin-left: 0; }
}

/* ── 2. 공용 글자 ───────────────────────────────────────────── */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.display { font-size: clamp(34px, 5.2vw, 76px); line-height: 1.16; font-weight: 600; letter-spacing: -.045em; }
.display em { font-style: normal; font-weight: 300; color: var(--accent); }  /* 한글 이탤릭은 기울인 가짜 글꼴이 된다 — 굵기와 색으로만 강조 */
.h2 { font-size: clamp(26px, 3vw, 40px); line-height: 1.25; font-weight: 600; letter-spacing: -.035em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.75; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--mute); }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: gap .25s var(--ease), color .2s; }
.link-arrow:hover { gap: 16px; color: var(--accent); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); flex-wrap: wrap; }

/* ── 3. 홈 — 인트로 ─────────────────────────────────────────── */
.intro { padding: clamp(72px, 12vw, 176px) 0 clamp(56px, 8vw, 112px); }
.intro .display { margin-top: 28px; max-width: 14em; }
.intro .lead { margin-top: 28px; }
.intro-tags { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; }
a.tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.intro-links { margin-top: 44px; display: flex; gap: 32px; flex-wrap: wrap; }

/* ── 4. 작업 타일 — 홈·작업 목록 공용 ──────────────────────────── */
.tiles { display: grid; gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1279px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .tiles, .tiles.two { grid-template-columns: 1fr; } }

.tile { display: block; }
.tile-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile-media.fit img { object-fit: contain; padding: 7%; }
.tile:hover .tile-media img { transform: scale(1.035); }
.tile-n { position: absolute; top: 14px; left: 14px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink); background: rgba(246, 243, 238, .86); padding: 2px 10px; border-radius: 999px; }
.tile-body { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 16px; }
.tile-t { font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1.4; }
.tile-m { flex: none; font-size: 13px; color: var(--mute); }
.tile-s { margin-top: 4px; font-size: 14px; color: var(--mute); line-height: 1.6; }

/* ── 5. 분야 목록 · 필터 ───────────────────────────────────── */
.fields { border-top: 1px solid var(--line-2); }
.field-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .3s var(--ease); }
.field-row:hover { padding-left: 12px; }
.field-row .n { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 18px; }
.field-row .t { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.03em; }
.field-row .d { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--mute); letter-spacing: -.01em; }
.field-row .c { font-size: 14px; color: var(--mute); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.filters button { cursor: pointer; background: none; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: all .2s; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters sup { font-size: 11px; margin-left: 4px; opacity: .6; }

/* ── 6. 작업 상세 ──────────────────────────────────────────── */
.pj-top { padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 64px); }
.pj-back { font-size: 14px; color: var(--mute); }
.pj-back:hover { color: var(--ink); }
.pj-title { margin-top: 28px; font-size: clamp(34px, 5vw, 68px); line-height: 1.15; font-weight: 600; letter-spacing: -.045em; }
.pj-lead { margin-top: 24px; }
.pj-meta { margin: clamp(40px, 5vw, 64px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--line-2); }
.pj-meta div { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); }
.pj-meta dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pj-meta dd { margin: 6px 0 0; font-size: 15px; font-weight: 500; }
.pj-body { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-top: clamp(48px, 6vw, 88px); }
.pj-body h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 500; }
.pj-body .txt p + p { margin-top: 1em; }
.pj-body .txt { font-size: 17px; line-height: 1.85; color: var(--ink-2); max-width: 38em; }
@media (max-width: 767px) { .pj-body { grid-template-columns: 1fr; gap: 16px; } }

.gallery { display: grid; gap: clamp(12px, 1.6vw, 24px); padding-bottom: clamp(64px, 8vw, 120px); }
.gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) { .gallery.cols-2, .gallery.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shot { margin: 0; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--card); cursor: zoom-in; }
.gallery.cols-1 .shot button { background: none; }
.gallery.cols-1 .shot img { margin: 0 auto; max-height: 92vh; width: auto; }
.shot img { width: 100%; }
.shot figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); }

.pj-next { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); }
.pj-next a { padding: 36px 0; display: block; }
.pj-next a + a { text-align: right; border-left: 1px solid var(--line); padding-left: 24px; }
.pj-next small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.pj-next b { display: block; margin-top: 8px; font-size: clamp(18px, 2vw, 26px); font-weight: 600; letter-spacing: -.03em; transition: color .2s; }
.pj-next a:hover b { color: var(--accent); }

/* ── 7. 소개 ─────────────────────────────────────────────── */
.about-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 96px); align-items: end; padding-top: clamp(72px, 11vw, 160px); padding-bottom: clamp(56px, 7vw, 96px); }  /* 좌우 여백은 .wrap 것을 쓴다 — padding 한 줄로 쓰면 지워진다 */
.about-hero .display { margin-top: 28px; }
.about-photo { aspect-ratio: 4 / 5; background: var(--paper-2); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-sign { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--mute); margin-top: 28px; }
@media (max-width: 899px) { .about-hero { grid-template-columns: 1fr; } }

.cols { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.cols .txt { font-size: 17px; line-height: 1.9; color: var(--ink-2); }
.cols .txt p + p { margin-top: 1.1em; }
@media (max-width: 767px) { .cols { grid-template-columns: 1fr; gap: 20px; } }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.svc { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--line); }
.svc:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.svc .n { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 18px; }
.svc h3 { margin-top: 14px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.svc p { margin-top: 10px; font-size: 15px; line-height: 1.75; color: var(--mute); }
@media (max-width: 899px) {
  .services { grid-template-columns: 1fr 1fr; }
  .svc, .svc:not(:nth-child(3n+1)) { padding: 28px 20px 28px 0; border-left: 0; }
  .svc:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 559px) { .services { grid-template-columns: 1fr; } .svc:nth-child(2n) { padding-left: 0; border-left: 0; } }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stat b { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.stat b sup { font-size: .4em; color: var(--accent); margin-left: 2px; }
.stat span { display: block; margin-top: 12px; font-size: 14px; color: var(--mute); }
@media (max-width: 767px) { .stats { grid-template-columns: 1fr 1fr; row-gap: 40px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.list-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.list-2 li { list-style: none; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; display: flex; justify-content: space-between; gap: 16px; }
.list-2 li span { color: var(--mute); font-size: 14px; }
.list-2 { padding: 0; margin: 0; border-top: 1px solid var(--line-2); }
@media (max-width: 599px) { .list-2 { grid-template-columns: 1fr; } }

/* ── 8. 연락 · 하단 띠 ─────────────────────────────────────── */
.cta { background: var(--sb-bg); color: var(--sb-fg); }
.cta .wrap { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); }
.cta .eyebrow { color: var(--sb-mute); }
.cta .display { margin-top: 24px; max-width: 13em; }
.cta .big-mail { margin-top: 40px; display: inline-block; font-size: clamp(22px, 3.2vw, 44px); font-weight: 500; letter-spacing: -.03em; border-bottom: 2px solid var(--accent); padding-bottom: 6px; transition: color .2s; }
.cta .big-mail:hover { color: #e6a47f; }
.cta-links { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 15px; color: var(--sb-mute); }
.cta-links a:hover { color: var(--sb-fg); }

.contact-rows { border-top: 1px solid var(--line-2); margin-top: 56px; }
.contact-rows > div { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact-rows dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.contact-rows dd { margin: 0; font-size: clamp(18px, 2vw, 24px); font-weight: 500; letter-spacing: -.02em; }
.contact-rows dd a { border-bottom: 1px solid var(--line-2); }
.contact-rows dd a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 599px) { .contact-rows > div { grid-template-columns: 1fr; gap: 6px; } }

.foot { padding: 32px 0; font-size: 13px; color: var(--mute); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }

/* 스크롤하며 떠오르기 — 한 번만 */
.rise { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } .tile-media img { transition: none; } }

/* ── 9. 사진 확대 보기 — lightbox.js 와 한 벌 (oak skeleton-c.css §11 에서 가져옴) ── */
.lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.lb[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(16, 12, 8, .94); }
.lb-fig { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(92vw, 1600px); }
.lb-img { display: block; max-width: 100%; max-height: calc(88svh - 4rem); width: auto; height: auto; object-fit: contain; }
.lb-cap { color: rgba(255, 255, 255, .8); font-size: 13px; text-align: center; }
.lb-btn { position: absolute; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.45); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(0,0,0,.75); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn[hidden] { display: none; }
.lb-x { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 12px; letter-spacing: .12em; color: rgba(255,255,255,.7); }
@media (max-width: 767px) {
  .lb { padding: 32px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-count { bottom: 72px; }
}
body.lb-open { position: fixed; width: 100%; overflow: hidden; }
