/* 포트폴리오 스타일. 원래 내 공간 제어판에 붙어 있던 것을 2026-12-07 따로 뗐다. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: #F7F7F5; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* ==========================================================================
   포트폴리오: 오프화이트 종이 위 먹선 도면 (CAD 청사진 + 건축 스케치)
   사용자 지정: 종이 #F7F7F5, 먹 #141414, 보조 #666, 머리카락 선 rgba(20,20,20,.16), 둥근 모서리·그림자·그라데이션 없음.
   제목·본문 Pretendard, 번호·좌표·치수·사양은 JetBrains Mono. 강조는 굵기와 반전, 붉은 점은 아주 조금(#D9381E).
   ========================================================================== */

.bp {
  --paper: #F7F7F5; --ink: #141414; --ink-2: #666666; --hair: rgba(20, 20, 20, 0.16); --mark: #D9381E;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace; --pad: 28px;
  min-height: 100vh; background: var(--paper); color: var(--ink); color-scheme: light;
  font-family: 'Pretendard Variable', Pretendard, 'Inter', sans-serif; scroll-behavior: auto;
}
.bp ::selection { background: var(--ink); color: var(--paper); }
.bp :focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.bp .m { font-family: var(--mono); letter-spacing: 0.02em; }
.bp a { color: inherit; }

/* 도면 틀: 바깥 테두리 + 네 모서리 십자선 */
.bp-sheet { position: relative; margin: 24px; border: 1px solid var(--ink); background:
  linear-gradient(var(--hair), var(--hair)) 0 0 / 1px 100% no-repeat; }
.bp-x { position: absolute; width: 13px; height: 13px; pointer-events: none; }
.bp-x::before, .bp-x::after { content: ""; position: absolute; background: var(--ink); }
.bp-x::before { left: 6px; top: 0; width: 1px; height: 13px; }
.bp-x::after { top: 6px; left: 0; height: 1px; width: 13px; }
.bp-sheet > .bp-x.tl { left: -19px; top: -19px; } .bp-sheet > .bp-x.tr { right: -19px; top: -19px; }
.bp-sheet > .bp-x.bl { left: -19px; bottom: -19px; } .bp-sheet > .bp-x.br { right: -19px; bottom: -19px; }
:is(.bp-hero, .bp-card, .bp-stage-figs figure) > .bp-x.tl { left: 10px; top: 10px; }
:is(.bp-hero, .bp-card, .bp-stage-figs figure) > .bp-x.tr { right: 10px; top: 10px; }
:is(.bp-hero, .bp-card, .bp-stage-figs figure) > .bp-x.bl { left: 10px; bottom: 10px; }
:is(.bp-hero, .bp-card, .bp-stage-figs figure) > .bp-x.br { right: 10px; bottom: 10px; }

/* 머리 칸 (위에 붙어 있다) */
.bp-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(260px, 1.2fr) 1fr auto; border-bottom: 1px solid var(--ink); background: var(--paper); }
.bp-cell { display: flex; align-items: center; padding: 14px 22px; border-right: 1px solid var(--ink); min-width: 0; }
.bp-cell:last-child { border-right: 0; }
.bp-brand { display: block; font-family: var(--mono); font-size: 13px; line-height: 1.55; letter-spacing: 0.02em; }
.bp-brand span { color: var(--ink-2); }
.bp-coord { justify-content: flex-end; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bp-nav { gap: 0; padding: 0; }
.bp-nav a { display: flex; align-items: center; height: 100%; padding: 0 18px; font-family: var(--mono); font-size: 13px; text-decoration: none; border-left: 1px solid var(--hair); }
.bp-nav a:first-child { border-left: 0; }
.bp-nav a b { font-weight: 500; margin-right: 6px; }
.bp-nav a:hover, .bp-enter:hover { background: var(--ink); color: var(--paper); }
.bp-enter { font-family: var(--mono); font-size: 13px; text-decoration: none; padding: 0 22px; }

/* 표제와 투상도: 뒤에 구조 격자 */
.bp-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 4vw;
  min-height: calc(100vh - 220px); padding: 64px 5vw;
  background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 100% 25%, 12.5% 100%; background-position: 0 -1px, -1px 0;
}
.bp-hero h1 { margin: 0 0 28px; font-size: clamp(34px, 3.6vw, 62px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 400; }
.bp-hero h1 b { display: block; font-weight: 700; }
.bp-hero h1 span { display: block; margin-top: 10px; font-weight: 300; font-size: 0.62em; letter-spacing: -0.01em; }
.bp-lede { max-width: 44ch; margin: 0 0 40px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.bp-legend { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 8px; margin: 0; font-size: 14px; }
.bp-legend dt, .bp-legend dd { margin: 0; }
.bp-hero-fig { margin: 0; }
.bp-hero-fig figcaption { margin-top: 6px; font-size: 11px; color: var(--ink-2); text-align: right; }
.bp-iso { display: block; width: 100%; height: auto; overflow: visible; }
.bp-iso path { fill: none; stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bp-iso .guide path { stroke: var(--hair); stroke-dasharray: 10 4 2 4; }
.bp-iso .hid { stroke-dasharray: 4 3; stroke: var(--ink-2); }
.bp-iso .face { stroke-width: 1.4; }
.bp-iso .cap { fill: var(--paper); }
.bp-iso .face { fill: var(--paper); }
.bp-iso .cap.side { fill: #ECECE8; }
.bp-iso .dm, .bp-iso .tk { stroke: var(--ink-2); }
.bp-iso .ld { stroke: var(--ink); }
.bp-iso text { font-family: var(--mono); font-size: 12px; fill: var(--ink); font-variant-numeric: tabular-nums; }
.bp-iso text.note { font-size: 11px; }
.bp-layer { transition: transform 600ms cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: no-preference) {
  .bp-iso .ink path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: bp-draw 2.2s cubic-bezier(.22, 1, .36, 1) .15s forwards; }
  .bp-iso .ink .hid { stroke-dasharray: 4 3; stroke-dashoffset: 0; animation: none; }
  @keyframes bp-draw { to { stroke-dashoffset: 0; } }
}

/* 표제란 */
.bp-titleblock { display: grid; grid-template-columns: 32px 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.bp-tb-label { grid-column: 2; padding: 10px 18px; border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 13px; }
.bp-tb-row { grid-column: 2; display: grid; grid-template-columns: auto 1fr auto auto; border-left: 1px solid var(--ink); font-size: 13px; }
.bp-tb-row span { padding: 12px 18px; border-right: 1px solid var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-tb-row span:last-child { border-right: 0; }

/* 절 */
.bp-section { padding: 72px 5vw 88px; border-bottom: 1px solid var(--ink); }
.bp-section:last-child { border-bottom: 0; }
.bp-sec-head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.bp-sec-head h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.bp-sec-head h2 .m { font-weight: 400; font-size: 0.7em; margin-right: 6px; }
.bp-meta { font-size: 12px; color: var(--ink-2); }
.bp-toggle { margin-left: auto; display: flex; border: 1px solid var(--ink); }
.bp-toggle button { padding: 7px 14px; border: 0; background: none; color: var(--ink); font: 12px var(--mono); cursor: pointer; }
.bp-toggle button + button { border-left: 1px solid var(--ink); }
.bp-toggle button[aria-pressed="true"], .bp-toggle button:hover { background: var(--ink); color: var(--paper); }

/* 도면 목록 표 */
.bp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bp-table th { padding: 10px 14px; border-bottom: 1px solid var(--ink); text-align: left; font: 500 12px var(--mono); letter-spacing: 0.04em; }
.bp-table td { padding: 16px 14px; border-bottom: 1px solid var(--hair); }
.bp-table td.m { font-size: 13px; font-variant-numeric: tabular-nums; }
.bp-table td.t { font-weight: 600; font-size: 17px; }
.bp-table tbody tr { cursor: pointer; }
.bp-table tbody tr:hover, .bp-table tbody tr:focus-visible { background: var(--ink); color: var(--paper); outline: 0; }

/* 카드: 평소엔 선화처럼, 올리면 실물과 도면 격자·치수 */
.bp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.bp-card { position: relative; display: grid; padding: 28px 28px 20px; border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.bp-card-fig { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--hair); background: #fff; }
.bp-card-fig img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.7) brightness(1.18); mix-blend-mode: multiply; transition: filter 260ms ease-out; }
.bp-overlay { position: absolute; inset: 0; opacity: 0; transition: opacity 200ms ease-out;
  background-image: linear-gradient(rgba(20, 20, 20, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 20, 20, .22) 1px, transparent 1px); background-size: 24px 24px; }
.ov-dim { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: center; padding-top: 6px; border-top: 1px solid var(--ink); font: 12px var(--mono); background: var(--paper); }
.bp-card:hover .bp-card-fig img, .bp-card:focus-visible .bp-card-fig img { filter: none; mix-blend-mode: normal; }
.bp-card:hover .bp-overlay, .bp-card:focus-visible .bp-overlay { opacity: 1; }
.bp-card-meta { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; margin-top: 16px; }
.bp-card-meta .t { font-weight: 600; font-size: 16px; }
.bp-card-meta .m { font-size: 12px; color: var(--ink-2); }

/* 명세 */
.bp-spec { display: grid; border-top: 1px solid var(--ink); }
.bp-spec-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-bottom: 1px solid var(--hair); }
.bp-spec-row h3 { margin: 0; padding: 18px 0; font-size: 13px; font-weight: 500; }
.bp-spec-row ul { margin: 0; padding: 18px 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 32px; font-size: 15px; }

/* 연락 */
.bp-links td:first-child { width: 80px; color: var(--ink-2); }
.bp-links td:nth-child(2) { width: 140px; }
.bp-links a, .bp-copy { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 220ms ease-out; }
.bp-links a:hover, .bp-copy:hover { background-size: 100% 1px; }
.bp-copy { padding: 0; border: 0; font: inherit; cursor: pointer; }
.bp-toast { min-height: 18px; margin: 14px 0 0; font-size: 12px; color: var(--mark); }

/* 자세히 (도면 한 장) */
.bp-modal { width: min(1280px, 92vw); max-height: 90vh; padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font-family: 'Pretendard Variable', Pretendard, sans-serif; }
.bp-modal::backdrop { background: rgba(247, 247, 245, 0.82); }
.bp-modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--ink); background: var(--paper); font-size: 12px; }
.bp-close { padding: 6px 12px; border: 1px solid var(--ink); background: none; color: var(--ink); font: 12px var(--mono); cursor: pointer; }
.bp-close:hover { background: var(--ink); color: var(--paper); }
.bp-modal-body { padding: 36px 40px 48px; }
.bp-modal-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; margin-bottom: 40px; }
.bp-modal-intro h2 { grid-column: 1 / -1; margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
.bp-modal-intro p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 52ch; }
.bp-dl { margin: 0; border-top: 1px solid var(--ink); }
.bp-dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.bp-dl dt { font: 12px var(--mono); color: var(--ink-2); }
.bp-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bp-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.bp-stage { padding: 28px 0 36px; border-top: 1px solid var(--ink); }
.bp-stage h3 { margin: 0 0 6px; font: 500 14px var(--mono); letter-spacing: 0.04em; }
.bp-stage p { margin: 0 0 18px; font-size: 15px; color: var(--ink-2); max-width: 70ch; line-height: 1.6; }
.bp-stage-figs { display: grid; gap: 20px; }
.bp-stage-figs.n2 { grid-template-columns: 1fr 1fr; } .bp-stage-figs.n3 { grid-template-columns: repeat(3, 1fr); }
.bp-stage-figs figure { position: relative; margin: 0; padding: 32px; border: 1px solid var(--hair); background: #fff; }
.bp-stage-figs img { display: block; width: 100%; height: auto; max-height: 46vh; object-fit: contain; }

@media (max-width: 980px) {
  .bp-sheet { margin: 12px; }
  .bp-head { grid-template-columns: 1fr auto; }
  .bp-coord, .bp-nav { display: none; }
  .bp-hero, .bp-modal-intro { grid-template-columns: 1fr; }
  .bp-tb-row { grid-template-columns: 1fr; }
  .bp-tb-row span { border-right: 0; border-bottom: 1px solid var(--hair); }
  .bp-cards, .bp-stage-figs.n2, .bp-stage-figs.n3 { grid-template-columns: 1fr; }
  .bp-spec-row { grid-template-columns: 1fr; }
  .bp-spec-row ul { padding-top: 0; }
  .bp-section { padding: 48px 20px 56px; }
  .bp-hero { padding: 48px 20px; min-height: 0; }
  .bp-sec-head { flex-wrap: wrap; gap: 8px 16px; }
  .bp-sec-head .bp-meta { display: none; }
  /* 작품 표 → 세로 도면 목록: 번호·이름 한 줄, 분류·사양·연도는 아래 주석 줄 */
  .bp-table:not(.bp-links) thead { display: none; }
  .bp-table:not(.bp-links) tbody tr { display: grid; grid-template-columns: 36px 1fr auto; column-gap: 8px; padding: 14px 4px; border-bottom: 1px solid var(--hair); }
  .bp-table:not(.bp-links) td { padding: 0; border: 0; }
  .bp-table:not(.bp-links) td:nth-child(1) { grid-row: 1 / span 2; }
  .bp-table:not(.bp-links) td:nth-child(2) { grid-column: 2; }
  .bp-table:not(.bp-links) td:nth-child(3) { grid-column: 3; grid-row: 1; color: var(--ink-2); }
  .bp-table:not(.bp-links) td:nth-child(4) { grid-column: 2 / span 2; margin-top: 4px; color: var(--ink-2); font-size: 12px; }
  .bp-table:not(.bp-links) td:nth-child(5) { display: none; }
  .bp-links td:nth-child(2) { width: auto; }
  .bp-modal-body { padding: 24px 20px 36px; }
}
