/* * SUNHWA Portfolio Base Style
 * Updated: 2026-04-29
 */

/* 1. 변수 및 초기화 */
:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --gray-light: #f4f4f4;
    --gray-medium: #cccccc;
    --gap-narrow: 5px;
    --font-main: 'Noto Sans KR', sans-serif;
    --font-heading: 'DM Serif Display', serif;

    --fs-h1: clamp(1.8rem, 6vw, 3rem);
    --fs-h2: clamp(1.2rem, 3.5vw, 2rem);   /* [수정] 모바일에서 너무 크지 않게 범위 조정 */
    --fs-body: clamp(0.9rem, 2.5vw, 1rem);
    --fs-label: 11px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-white);
    color: var(--primary-black);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

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

/* 2. 헤더 및 네비게이션 */
.main-header {
    width: 100%;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background: var(--primary-white);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-menu ul li a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-menu ul li a.active {
    font-weight: 700;
    border-bottom: 2px solid var(--primary-black);
}

/* 햄버거 버튼 — 데스크탑에서는 숨김 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-black);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 햄버거 → X 아이콘 애니메이션 */
.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 3. 메인 페이지 (Index) */
.hero-section {
    padding: 80px 40px 60px;
    text-align: left;
    max-width: 1400px;
    margin: 0 auto;
}

.idea-log-title {
    font-family: var(--font-heading);
    font-size: var(--fs-h1);
    line-height: 1.1;
}

.idea-log-title .bold { font-weight: 700; }
.idea-log-title .bold-italic { font-weight: 700; font-style: italic; }

/* 포트폴리오 그리드 */
.portfolio-grid-container {
    padding: 0 40px 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-narrow);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    background-color: var(--gray-light);
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.placeholder-box {
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-box span {
    color: #ddd;
    font-size: 11px;
    letter-spacing: 1px;
}

/* VIEW MORE 버튼 */
.view-more-container {
    text-align: center;
    margin-top: 60px;
}

.view-more-btn {
    padding: 15px 40px;
    border: 1px solid var(--primary-black);
    background: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.view-more-btn:hover {
    background: var(--primary-black);
    color: var(--primary-white);
}

.hidden { display: none; }

/* 4. 상세 페이지 (Detail) */
.project-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 20px;
}

.project-hero-img {
    width: 100%;
    height: auto;
    margin-bottom: 60px;
}

.info-section {
    margin-bottom: 80px;
}

.info-section h1 {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);    /* [수정] 인라인 32px 대신 반응형 CSS 변수 사용 */
    margin-bottom: 24px;
    font-weight: 700;
}

.info-section p {
    font-size: var(--fs-body);
    color: #444;
    line-height: 1.8;
    font-weight: 300;
}

/* 크레딧 테이블 */
.credit-section {
    border-top: 1px solid var(--primary-black);
    padding-top: 40px;
    margin-bottom: 80px;
}

.credit-table {
    width: 100%;
    border-collapse: collapse;
}

.credit-table tr {
    border-bottom: 1px solid #eee;
}

.credit-table th {
    padding: 11px 0;
    width: 200px;
    text-align: left;
    font-size: var(--fs-label);
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    vertical-align: top;
}

.credit-table td {
    padding: 11px 0;
    font-size: 0.9rem;
    color: var(--primary-black);
    line-height: 1.4;
}

/* 갤러리 */
#detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 5. 푸터 */
.main-footer {
    padding: 60px 40px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #999;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    gap: 16px;
}

.footer-nav a {
    color: #999;
    font-size: 11px;
}

.footer-nav a:hover {
    color: var(--primary-black);
}

/* 6. 모바일 반응형 */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    .main-header {
        padding: 15px 20px;
    }

    /* 햄버거 버튼 표시 */
    .mobile-menu-toggle {
        display: flex;
    }

    /* 네비게이션: 기본 상태에서 숨김 */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;             /* 헤더 바로 아래 */
        left: 0;
        width: 100%;
        background: var(--primary-white);
        border-bottom: 1px solid #eee;
        padding: 20px 0;
        z-index: 999;
    }

    /* [핵심 수정] .active 클래스가 붙으면 메뉴 표시 */
    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu ul li a {
        display: block;
        padding: 14px 24px;
        font-size: 14px;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu ul li:last-child a {
        border-bottom: none;
    }

    /* 서브메뉴는 모바일에서 인라인으로 표시 */
    .nav-menu .submenu {
        display: none;  /* 필요 시 드롭다운 JS 추가 가능 */
    }

    .hero-section {
        padding: 40px 20px;
    }

    .portfolio-grid-container {
        padding: 0 20px 60px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-detail-container {
        padding: 40px 20px;
    }

    .credit-table th {
        width: 120px;
        font-size: 10px;
    }

    .credit-table td {
        font-size: 0.8rem;
    }

    .main-footer {
        padding: 40px 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* 초소형 모바일 (480px 이하) */
@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* 2열 유지, 1열은 너무 크게 보임 */
    }
}

/* ===================================================
   7. uglyQ 페이지
   =================================================== */

.uglyq-subtitle {
    font-size: var(--fs-body);
    color: #888;
    margin-top: 12px;
    font-weight: 300;
}

/* 태그 필터 바 */
.uglyq-filter-section {
    padding: 0 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.uglyq-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-btn {
    padding: 6px 14px;
    border: 1px solid var(--gray-medium);
    background: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-main);
}

.tag-btn:hover,
.tag-btn.active {
    background: var(--primary-black);
    color: var(--primary-white);
    border-color: var(--primary-black);
}

/* 포스트 피드 */
.uglyq-feed {
    padding: 0 40px 100px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* 포스트 카드 */
.uglyq-card {
    border-top: 1px solid var(--primary-black);
    padding-top: 32px;
}

.uglyq-card-header {
    margin-bottom: 20px;
}

.uglyq-date {
    font-size: 11px;
    color: #999;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.uglyq-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

/* 태그 뱃지 */
.uglyq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.uglyq-tag {
    font-size: 11px;
    color: #888;
    letter-spacing: 0.3px;
}

/* 이미지 그룹 */
.uglyq-images {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.uglyq-images img {
    width: 100%;
    height: auto;
}

/* 본문 */
.uglyq-body {
    font-size: var(--fs-body);
    line-height: 1.9;
    color: #333;
    font-weight: 300;
}

/* 빈 상태 */
.uglyq-empty {
    font-size: 14px;
    color: #aaa;
    text-align: center;
    padding: 60px 0;
}

/* uglyQ 모바일 반응형 */
@media (max-width: 768px) {
    .uglyq-filter-section {
        padding: 0 20px 30px;
    }

    .uglyq-feed {
        padding: 0 20px 60px;
        gap: 40px;
    }
}

/* ===================================================
   8. works.html 포트폴리오 페이지
   =================================================== */

.works-filter-section {
    padding: 0 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.works-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.works-count-wrap {
    padding: 0 40px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.works-count {
    font-size: 12px;
    color: var(--color-text-secondary, #999);
}

/* 아이템 하단 타이틀/분류 표시 */
.portfolio-item-info {
    padding: 10px 4px 4px;
}

.portfolio-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-black);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-item-discipline {
    font-size: 11px;
    color: #999;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.works-empty {
    font-size: 14px;
    color: #aaa;
    text-align: center;
    padding: 80px 0;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .works-filter-section {
        padding: 0 20px 20px;
    }
    .works-count-wrap {
        padding: 0 20px 20px;
    }
}

/* ===================================================
   9. About 페이지
   =================================================== */

.about-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 80px 40px 120px;
}

/* 인트로 */
.about-intro {
    margin-bottom: 80px;
    padding-bottom: 80px;
    border-bottom: 1px solid var(--primary-black);
}

.about-name {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 8vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 24px;
}

.about-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-style: italic;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.5;
}

.about-bio {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.9;
    color: #333;
    font-weight: 300;
    max-width: 640px;
}

/* 공통 섹션 */
.about-section {
    margin-bottom: 72px;
    padding-bottom: 72px;
    border-bottom: 1px solid #eee;
}

.about-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.about-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 28px;
}

/* Disciplines */
.disciplines-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.disciplines-list li {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: baseline;
}

.disciplines-list li:first-child {
    border-top: 1px solid #f0f0f0;
}

.disc-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-black);
}

.disc-desc {
    font-size: 13px;
    color: #555;
    font-weight: 300;
    line-height: 1.6;
}

/* Clients */
.about-clients-desc {
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 24px;
}

.clients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.clients-grid span {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.3px;
    padding: 4px 0;
}

/* 경력 타임라인 */
.timeline {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid #f0f0f0;
}

.timeline-item:first-child {
    border-top: 1px solid #f0f0f0;
}

.timeline-period {
    font-size: 11px;
    color: #999;
    letter-spacing: 0.3px;
    padding-top: 3px;
    line-height: 1.6;
}

.timeline-role {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0 0 4px;
}

.timeline-org {
    font-size: 13px;
    font-weight: 400;
    color: #555;
    margin: 0 0 8px;
}

.timeline-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.7;
    font-weight: 300;
    margin: 0;
}

/* uglyQ 링크 */
.about-uglyq-link {
    font-weight: 700;
    color: var(--primary-black);
    border-bottom: 1px solid var(--primary-black);
    padding-bottom: 1px;
    transition: opacity 0.2s;
}

.about-uglyq-link:hover {
    opacity: 0.5;
}

/* Contact */
.contact-email {
    display: inline-block;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-family: var(--font-heading);
    color: var(--primary-black);
    border-bottom: 1px solid var(--primary-black);
    padding-bottom: 2px;
    margin-top: 12px;
    transition: opacity 0.2s;
}

.contact-email:hover {
    opacity: 0.5;
}

/* About 모바일 반응형 */
@media (max-width: 768px) {
    .about-container {
        padding: 40px 20px 80px;
    }

    .about-intro {
        margin-bottom: 48px;
        padding-bottom: 48px;
    }

    .about-section {
        margin-bottom: 48px;
        padding-bottom: 48px;
    }

    .disciplines-list li {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px 0;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 20px 0;
    }

    .timeline-period {
        font-size: 11px;
        color: #bbb;
    }
}

/* ===================================================
   10. Privacy & Terms (Legal 페이지)
   =================================================== */

.legal-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 80px 40px 120px;
}

.legal-header {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--primary-black);
}

.legal-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 12px;
}

.legal-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.15;
}

.legal-updated {
    font-size: 12px;
    color: #aaa;
}

/* 본문 */
.legal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.legal-section {
    padding: 36px 0;
    border-bottom: 1px solid #f0f0f0;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.legal-section p {
    font-size: 14px;
    color: #444;
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 10px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-section ul li {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    font-weight: 300;
    padding-left: 16px;
    position: relative;
}

.legal-section ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #bbb;
    font-size: 12px;
}

.legal-section a {
    color: var(--primary-black);
    border-bottom: 1px solid #ccc;
    padding-bottom: 1px;
    transition: border-color 0.2s;
}

.legal-section a:hover {
    border-color: var(--primary-black);
}

/* 정보 테이블 */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.legal-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.legal-table tr:first-child {
    border-top: 1px solid #f0f0f0;
}

.legal-table th {
    padding: 12px 0;
    width: 120px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    vertical-align: top;
}

.legal-table td {
    padding: 12px 0;
    font-size: 14px;
    color: #333;
    font-weight: 300;
}

/* 모바일 */
@media (max-width: 768px) {
    .legal-container {
        padding: 40px 20px 80px;
    }

    .legal-header {
        margin-bottom: 40px;
        padding-bottom: 28px;
    }

    .legal-section {
        padding: 24px 0;
    }
}
