/* 홈 첫 화면: 흰 코드 × 검은 공연장 (가로 대비) */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 머리말은 첫 화면 위에 투명하게 얹는다 */
.home .site-header { position: absolute; left: 0; right: 0; background: transparent; backdrop-filter: none; }
.home .site-header .wrap { max-width: none; padding: 0 56px; height: 84px; }
.home .nav { gap: 2px; }
.home .nav a { color: #d8d6d0; padding: 8px 11px; }
.home .nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.home .nav .nav-cta, .home .nav .nav-cta:hover { color: var(--ink); background: var(--gold); }

.duo { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 96px; min-height: max(640px, 100vh); }
.duo-side { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 0 56px; }
.duo-code { background: #fafaf7; color: var(--ink); align-items: flex-end; text-align: right; }
.duo-stage { background: #0b0b0d; color: var(--white); overflow: hidden; }

/* 조명 */
.duo-stage::before {
  content: ""; position: absolute; left: 18%; top: -10%; width: 64%; height: 115%;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255,240,205,.30), rgba(255,240,205,.06) 60%, transparent 78%);
  transition: opacity 1.1s ease;
}
.duo.anim:not(.lit) .duo-stage::before { opacity: 0; }

/* 무대 바닥: 두 쪽을 가로지르는 금색 선 */
.duo-floor {
  position: absolute; left: 0; right: 0; bottom: 96px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, var(--gold));
  transform-origin: right; transition: transform 1s cubic-bezier(.2,.7,.2,1);
}
.duo.anim:not(.on-floor) .duo-floor { transform: scaleX(0); }

/* 코드 줄 */
.duo-lines {
  position: absolute; right: 56px; bottom: calc(50% + 96px); margin: 0;
  font: 400 15px/2 "JetBrains Mono", monospace; color: #9b978f; text-align: left;
}
.duo-lines .n { color: #c9c5bd; margin-right: 18px; }
.duo-lines .k { color: var(--burgundy, #8e2433); }
.duo-lines .s { color: #7a6a3e; }
.duo-lines .ln { display: block; min-height: 2em; }
.duo-lines .caret { display: inline-block; width: 9px; height: 18px; background: var(--ink); vertical-align: -3px; animation: duo-blink 1s steps(1) infinite; }
@keyframes duo-blink { 50% { opacity: 0; } }

/* 슬로건: 고딕(코드) → 명조(예술) */
.duo h1, .duo-word { margin: 0; line-height: 1; font-size: clamp(64px, 10.5vw, 168px); }
.duo h1 { font-family: "Gothic A1", var(--font); font-weight: 900; letter-spacing: -.04em; }
.duo-word {
  font-family: "Nanum Myeongjo", serif; font-weight: 800; letter-spacing: -.02em;
  transition: opacity .8s ease .1s, transform .8s ease .1s;
  text-shadow: 0 0 40px rgba(255,230,180,.25);
}
.duo.anim:not(.raised) .duo-word { opacity: 0; transform: translateY(14px); }

/* 무대 바닥 아래: 한 줄 소개(흰 쪽) · 버튼(검은 쪽). 막이 오른 뒤 떠오른다 */
.duo-foot { display: flex; align-items: center; padding: 0 56px; }
.duo-foot > * { transition: opacity .5s ease .15s, transform .5s ease .15s; }
.duo.anim:not(.raised) .duo-foot > * { opacity: 0; transform: translateY(8px); }
.duo-foot-code { background: #fafaf7; justify-content: flex-end; }
.duo-foot-stage { background: #0b0b0d; gap: 10px; }
.duo-intro { margin: 0; font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.duo-intro a { text-decoration: none; }
.duo-intro a:hover { color: var(--gold); }
.duo-intro span { color: #b7b3aa; margin: 0 10px; }
.duo-foot .btn { padding: 11px 20px; font-size: .92rem; }
.duo-btn-line { border-color: rgba(255,255,255,.4); color: var(--white); }
.duo-btn-line:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 1100px) {
  .home .nav a[href="/portfolio/"] { display: none; }
  .home .nav a { padding: 8px 8px; font-size: .9rem; }
}
@media (max-width: 860px) {
  .home .site-header .wrap { padding: 0 20px; height: 68px; }
  .home .nav-toggle { color: var(--ink); }
  .home .nav a { color: #d9d8e0; }
  .home .nav a[href="/portfolio/"] { display: block; }
  /* 휴대폰: 코드를 / 예술로 / 버튼까지 한 화면에 */
  .duo { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .duo-side { padding: 0 22px; }
  .duo-code { order: 1; align-items: flex-start; text-align: left; padding-top: 80px; padding-bottom: 6px; }
  .duo-foot-code { order: 2; justify-content: flex-start; padding: 10px 22px 26px; }
  .duo-stage { order: 3; padding-top: 64px; padding-bottom: 64px; }
  .duo-foot-stage { order: 4; padding: 18px 22px 28px; border-top: 3px solid var(--gold); }
  .duo-floor { display: none; }
  .duo-lines { position: static; font-size: 11.5px; line-height: 1.75; margin-bottom: 14px; }
  .duo-intro { font-size: .92rem; }
  .duo-intro span { margin: 0 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .duo-stage::before, .duo-floor, .duo-word, .duo-foot > * { transition: none; }
}

/* 하는 일: 코드 쪽은 흰 바탕 고딕, 공연장 쪽은 검은 바탕 명조 */
.act { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; padding: 120px 56px; }
.act-code { background: #fafaf7; color: var(--ink); border-top: 1px solid #e6e3dc; }
.act-stage { background: #0b0b0d; color: var(--white); }
.act-no { display: block; font: 400 .8rem/1 "JetBrains Mono", monospace; letter-spacing: .04em; color: #6d6a64; margin-bottom: 22px; }
.act-stage .act-no { color: #9a968e; }
.act h2 { margin: 0; line-height: 1.12; font-size: clamp(40px, 5.6vw, 84px); }
.act-code h2 { font-family: "Gothic A1", var(--font); font-weight: 900; letter-spacing: -.04em; }
.act-stage h2 { font-family: "Nanum Myeongjo", serif; font-weight: 800; letter-spacing: -.02em; }
.act-body { max-width: 460px; padding-bottom: 8px; }
.act-body p { font-size: 1.08rem; line-height: 1.8; margin: 0 0 18px; }
.act-code .act-body p { color: #3c3b40; }
.act-stage .act-body p { color: #cfcac0; }
.act.act-stage .act-body .act-fact { color: #9a968e; }
.act .act-body .act-fact { font-size: .85rem; color: #6d6a64; padding-top: 16px; border-top: 1px solid currentColor; border-top-color: rgba(141,138,132,.35); }
.act-link { display: inline-block; margin-top: 10px; font-weight: 700; text-decoration: none; color: inherit; border-bottom: 2px solid var(--gold); padding-bottom: 3px; }
.act-link::after { content: " →"; }
.act-link:hover { color: var(--gold); }

/* 최근 작업 */
.works { background: #fafaf7; color: var(--ink); border-top: 1px solid #e6e3dc; padding: 110px 56px; }
.works-h { font: 400 .8rem/1 "JetBrains Mono", monospace; letter-spacing: .04em; color: #6d6a64; margin: 0 0 28px; }
.works-list { list-style: none; margin: 0 0 36px; padding: 0; border-top: 1px solid var(--ink); }
.works-list li { display: grid; grid-template-columns: 140px 1fr 1.3fr; gap: 24px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid #dcd8cf; }
.w-kind { font: 400 .8rem "JetBrains Mono", monospace; color: #6d6a64; }
.works-list b { font-size: 1.3rem; letter-spacing: -.02em; }
.works-list b a { text-decoration: none; }
.works-list b a:hover { color: var(--gold); }
.w-meta { color: #6d6a64; font-size: .92rem; }

@media (max-width: 860px) {
  .act { grid-template-columns: 1fr; gap: 24px; padding: 80px 22px; }
  .works { padding: 72px 22px; }
  .works-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* 홈 꼬리말은 공연장과 같은 검정 */
.home .site-footer { background: #0b0b0d; }
.act-link + .act-link { margin-left: 22px; }
