/*
 * 개발자 주석:
 * home.css를 먼저 로드한다.
 * PROJECTS 전용 영역은 projects- / project- 접두사로 구분한다.
 */
.projects-page .desktop-nav .is-current {
    padding-bottom: 2px;
    border-bottom: 1px solid currentColor;
}

.projects-preline { white-space: pre-line; }
.projects-page main { min-width: 0; }

/* 목록 HERO */
.projects-hero {
    position: relative;
    height: 560px;
    padding-top: 60px;
    color: #fff;
    background: #333;
}
.projects-hero > img,
.project-detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.projects-hero-shade {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
}
.projects-hero-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 0 80px 56px;
}
.projects-eyebrow {
    margin-bottom: 20px;
    color: rgba(255,255,255,.5);
    font-size: 11px;
    letter-spacing: .2em;
}
.projects-hero h1 {
    margin-bottom: 20px;
    font-family: var(--korean-serif);
    font-size: 56px;
    font-weight: 300;
    line-height: 1.25;
}
.projects-hero-description {
    max-width: 384px;
    margin-bottom: 28px;
    color: rgba(255,255,255,.7);
    font-size: 15px;
    line-height: 1.8;
}
.projects-hero-tagline {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
}
.projects-hero-tagline > span:first-child {
    width: 32px;
    height: 1px;
    background: rgba(255,255,255,.4);
}
.projects-hero-tagline strong { color: #fff; font-weight: 500; }
.projects-hero-quote {
    position: absolute;
    right: 56px;
    bottom: 56px;
    text-align: right;
}
.projects-hero-quote p {
    color: rgba(255,255,255,.5);
    font-family: var(--korean-serif);
    font-size: 16px;
    line-height: 1.8;
}
.projects-hero-quote small {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,.3);
    font-size: 11px;
    letter-spacing: .15em;
}

/* 필터 / 목록 */
.projects-filter-bar,
.project-detail-bar {
    position: sticky;
    top: 60px;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.projects-filter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}
.projects-filters {
    display: flex;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.projects-filters::-webkit-scrollbar { display: none; }
.projects-filter {
    flex-shrink: 0;
    padding: 16px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .1em;
    white-space: nowrap;
}
.projects-filter:hover { color: #111; }
.projects-filter.is-active {
    color: #111;
    border-color: #111;
    font-weight: 500;
}
.projects-count {
    flex-shrink: 0;
    padding-left: 16px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .1em;
}
.projects-list { padding-block: 64px; }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 48px 20px;
}
.projects-card { display: block; min-width: 0; }
.projects-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
    overflow: hidden;
    background: #eee;
}
.projects-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.projects-card:hover .projects-card-image img { transform: scale(1.05); }
.projects-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    background: #111;
    color: #fff;
    font-size: 9px;
    letter-spacing: .15em;
}
.projects-card-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.projects-card-info h2 {
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .1em;
}
.projects-title-ko {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}
.projects-meta { color: #aaa; font-size: 12px; line-height: 1.7; }
.projects-card-arrow {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    transition: transform .3s;
}
.projects-card:hover .projects-card-arrow { transform: translateX(4px); }
.projects-more-wrap { display: flex; justify-content: center; }
.projects-more {
    margin-top: 56px;
    padding: 16px 40px;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    font-size: 11px;
    letter-spacing: .15em;
    transition: background .3s, color .3s;
}
.projects-more:hover { background: #111; color: #fff; }
.projects-more:disabled { opacity: .5; cursor: wait; }
.projects-empty { padding: 80px 0; text-align: center; color: var(--muted); font-size: 14px; }
.projects-error { margin-top: 32px; color: #a22; font-size: 13px; }
.projects-list[aria-busy="true"] .projects-grid { opacity: .55; }

/* 상세 HERO */
.project-detail-hero {
    position: relative;
    height: 70vh;
    min-height: 480px;
    background: #333;
    color: #fff;
}
.project-detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, rgba(0,0,0,.7), rgba(0,0,0,.2), transparent
    );
}
.project-detail-hero-copy {
    position: absolute;
    inset: auto 56px 56px;
}
.project-detail-hero-copy .projects-eyebrow {
    margin-bottom: 16px;
    color: rgba(255,255,255,.6);
}
.project-detail-hero h1 {
    max-width: 1000px;
    margin-bottom: 12px;
    font-family: var(--serif);
    font-size: 96px;
    font-weight: 400;
    line-height: 1;
    overflow-wrap: anywhere;
}
.project-detail-title-ko {
    margin-bottom: 16px;
    font-family: var(--korean-serif);
    font-size: 20px;
    font-weight: 300;
    color: rgba(255,255,255,.8);
}
.project-detail-summary {
    max-width: 384px;
    color: rgba(255,255,255,.6);
    font-size: 14px;
    line-height: 1.7;
}
.project-detail-quote {
    position: absolute;
    right: 56px;
    bottom: 56px;
    color: rgba(255,255,255,.5);
    font-family: var(--serif);
    font-size: 18px;
    font-style: italic;
    line-height: 1.7;
    text-align: right;
}
.project-detail-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
}
.project-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .05em;
}
.project-breadcrumb strong { color: #111; font-weight: 400; }
.project-neighbors {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .1em;
}
.project-neighbors [aria-disabled="true"] { opacity: .35; }

/* 상세 기본정보 / 갤러리 */
.project-overview {
    display: grid;
    grid-template-columns: 280px minmax(0,1fr);
    gap: 64px;
    padding-block: 64px;
}
.project-specs > h2 {
    margin-bottom: 4px;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
}
.project-specs-title-ko {
    margin-bottom: 28px;
    color: #555;
    font-family: var(--korean-serif);
    font-size: 16px;
}
.project-specs table {
    width: 100%;
    margin-bottom: 32px;
    border-collapse: collapse;
    font-size: 13px;
}
.project-specs tr { border-top: 1px solid var(--line); }
.project-specs th {
    width: 72px;
    padding: 10px 16px 10px 0;
    color: var(--muted);
    font-weight: 400;
    text-align: left;
    white-space: nowrap;
}
.project-specs td { padding-block: 10px; line-height: 1.5; }
.project-specs > .button { margin-bottom: 32px; }
.project-specs-note { border-top: 1px solid var(--line); padding-top: 24px; }
.project-specs-note p {
    margin-bottom: 4px;
    font-family: var(--korean-serif);
    font-size: 16px;
    font-weight: 500;
}
.project-specs-note small { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.project-photo-stage,
.project-space-stage {
    position: relative;
    overflow: hidden;
    background: #eee;
}
.project-photo-stage { aspect-ratio: 3 / 2; margin-bottom: 12px; }
.project-gallery-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .3s;
}
.project-gallery-slide.is-active { opacity: 1; }
.project-photo-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.project-photo-controls p { color: var(--muted); font-size: 12px; }
.project-photo-controls > div { display: flex; gap: 12px; }
.project-photo-controls button {
    width: 40px;
    height: 40px;
    border: 1px solid #aaa;
    background: #fff;
    color: #333;
    font-size: 26px;
}
.project-photo-controls button:hover { color: #fff; border-color: #111; background: #111; }
.project-basic-image { align-self: start; aspect-ratio: 3 / 2; overflow: hidden; }
.project-basic-image img { width: 100%; height: 100%; object-fit: cover; }

/* 상세 본문 */
.project-detail-section { border-top: 1px solid var(--line); }
.project-muted-section { background: #f9f8f6; }
.project-detail-space { padding-block: 56px; }
.project-section-label {
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .15em;
}
.project-section-title {
    margin-bottom: 24px;
    font-family: var(--korean-serif);
    font-size: 36px;
    font-weight: 300;
    line-height: 1.3;
}
.project-section-body { color: #555; font-size: 14px; line-height: 1.8; }
.project-context-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 64px; }
.project-context-grid .project-section-label { margin-bottom: 20px; }
.project-context-image { aspect-ratio: 5 / 4; margin-bottom: 16px; overflow: hidden; }
.project-context-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.project-site-analysis { padding-left: 16px; border-left: 2px solid #111; }
.project-site-analysis .project-section-label { margin-bottom: 8px; }
.project-site-analysis > p:last-child { color: #555; font-size: 13px; line-height: 1.8; }
.project-concept-body { max-width: 600px; margin-bottom: 40px; }
.project-four-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.project-diagram-card { margin: 0; min-width: 0; }
.project-diagram-card figcaption { color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.project-concept-diagram,
.project-mass-diagram,
.project-plan-diagram {
    overflow: hidden;
    border: 1px solid var(--line);
}
.project-concept-diagram {
    aspect-ratio: 5 / 4;
    margin-bottom: 8px;
    padding: 12px;
    background: #fff;
}
.project-diagram-card svg,
.project-plan-diagram svg { display: block; width: 100%; height: 100%; }
.project-mass-grid { gap: 24px; }
.project-mass-card { position: relative; }
.project-mass-diagram {
    aspect-ratio: 3 / 2;
    margin-bottom: 8px;
    padding: 8px;
    background: #f2f1ef;
}
.project-mass-arrow {
    position: absolute;
    top: 40%;
    right: -20px;
    color: #ccc;
    font-size: 18px;
}
.project-plan-grid { display: grid; grid-template-columns: 1fr 1fr 200px; gap: 40px; }
.project-plan-label { margin-bottom: 12px; color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.project-plan-diagram { aspect-ratio: 4 / 3; padding: 16px; background: #fff; }
.project-room-list { display: flex; flex-direction: column; gap: 16px; }
.project-room-list h3 { margin-bottom: 8px; font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.project-room-list p { color: #555; font-size: 12px; line-height: 1.8; }
.project-material-layout { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 40px; }
.project-material-grid { gap: 12px; }
.project-material-image,
.project-completion-image { aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.project-material-image img,
.project-completion-image img { width: 100%; height: 100%; object-fit: cover; }
.project-material-names > p:not(.project-plan-label) { padding-block: 8px; border-bottom: 1px solid #f0ede8; color: #555; font-size: 13px; }
.project-completion-grid { gap: 12px; }
.project-completion-image img { transition: transform .5s; }
.project-completion-image:hover img { transform: scale(1.05); }

/* SPACE */
.project-space-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.project-space-heading .project-section-label { margin-bottom: 0; }
.project-space-heading > p:last-child { color: #aaa; font-size: 12px; }
.project-space-stage { aspect-ratio: 21 / 9; background: #e8e6e1; }
.project-space-prev,
.project-space-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.2);
    color: #fff;
    backdrop-filter: blur(4px);
    font-size: 28px;
}
.project-space-prev { left: 16px; }
.project-space-next { right: 16px; }
.project-space-prev:hover,
.project-space-next:hover { background: rgba(255,255,255,.4); }
.project-space-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.project-space-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.5); transition: width .3s; }
.project-space-dots button.is-active { width: 24px; background: #fff; }
.project-space-thumbnails { display: flex; gap: 8px; margin-top: 12px; }
.project-space-thumbnails button { flex: 1; min-width: 0; aspect-ratio: 4 / 3; padding: 0; border: 0; overflow: hidden; background: #eee; opacity: .5; }
.project-space-thumbnails button.is-active { outline: 2px solid #111; outline-offset: 0; opacity: 1; }
.project-space-thumbnails img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 768px) and (max-width: 1199px) {
    .projects-hero-copy { padding-inline: 56px; }
    .projects-hero h1 { font-size: 48px; }
    .project-detail-hero h1 { font-size: 72px; }
    .project-overview { gap: 40px; }
    .project-plan-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .project-room-list { grid-column: 1 / -1; flex-direction: row; gap: 48px; }
    .project-material-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .projects-hero { height: 480px; }
    .projects-hero-copy { padding: 0 32px 56px; }
    .projects-hero h1 { font-size: 36px; }
    .projects-hero-quote { display: none; }
    .projects-count { display: none; }
    .projects-filter-inner { padding-inline: 24px; }
    .projects-filter { padding-inline: 16px; }
    .projects-list { padding-block: 48px; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-detail-hero-copy { inset: auto 32px 56px; }
    .project-detail-hero h1 { font-size: 48px; }
    .project-detail-title-ko { font-size: 18px; }
    .project-detail-quote { display: none; }
    .project-detail-bar-inner { padding-block: 10px; }
    .project-breadcrumb { font-size: 10px; }
    .project-neighbors { gap: 8px; font-size: 10px; }
    .project-overview { grid-template-columns: 1fr; gap: 40px; padding-block: 48px; }
    .project-detail-space { padding-block: 56px; }
    .project-section-title { font-size: 30px; }
    .project-context-grid { grid-template-columns: 1fr; gap: 40px; }
    .project-four-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .project-mass-grid { gap: 24px 16px; }
    .project-mass-arrow { display: none; }
    .project-plan-grid { grid-template-columns: 1fr; gap: 32px; }
    .project-room-list { flex-direction: row; flex-wrap: wrap; gap: 32px; }
    .project-material-layout { grid-template-columns: 1fr; gap: 24px; }
    .project-completion-grid { gap: 8px; }
    .project-space-stage { aspect-ratio: 16 / 9; }
}

/*
 * 개발자 주석:
 * CONCEPT / MASS / PLAN에 업로드한 이미지.
 * 도면 전체를 볼 수 있도록 잘라내지 않는다.
 */
.project-uploaded-diagram {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}