/* ==========================================
   공통 리셋 및 배경 설정
   ========================================== */
* {
    margin: 0;          
    padding: 0;         
    box-sizing: border-box; 
}

body {
    background-color: #000000;              
    color: #ffffff;                         
    font-family: 'Noto Sans KR', sans-serif; 
    overflow-x: hidden;                     
}

a {
    color: inherit;         
    text-decoration: none;  
}

/* ==========================================
   ① 인트로 페이지 (index.html)
   ========================================== */
.intro-body {
    display: flex;          
    justify-content: center; 
    align-items: center;     
    height: 100vh;          
    background-color: #000000;
}

.intro-logo {
    width: 400px;                    
    height: auto;                    
    transition: transform 0.5s ease; 
}

.intro-logo:hover {
    transform: scale(1.2); 
}

/* ==========================================
   ② 메뉴바 내비게이션 (정중앙 로고 & 좌측 토글 메뉴)
   ========================================== */
.navbar {
    position: fixed;                 
    top: 0;                          
    left: 0;                         
    width: 100%;                     
    height: 70px;                    
    background-color: rgba(0, 0, 0, 0.95); 
    display: flex;                   
    justify-content: space-between;  
    align-items: center;             
    padding: 0 40px;                 
    z-index: 1000;                   
    border-bottom: 1px solid #111;   
}

.nav-left {
    position: relative;     
    display: flex;
    align-items: center;
    width: 150px;           
}

.menu-toggle-btn {
    background: none;       
    border: none;           
    color: #ffffff;         
    font-size: 28px;        
    font-weight: 300;       
    cursor: pointer;        
    padding: 0;
    line-height: 1;         
    transition: color 0.3s ease; 
}

.menu-toggle-btn:hover {
    color: #888888;         
}

.nav-menu-dropdown {
    display: none;          
    position: absolute;     
    top: 45px;              
    left: 0;                
    background-color: #000000; 
    border: 1px solid #111; 
    padding: 15px 20px;     
    min-width: 150px;       
    flex-direction: column; 
    gap: 15px;              
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.6); 
}

.nav-menu-dropdown.show {
    display: flex;          
}

.nav-menu-dropdown a {
    font-size: 14px;        
    color: #888888;         
    letter-spacing: 1px;    
    transition: color 0.3s; 
    display: block;         
}

.nav-menu-dropdown a:hover, .nav-menu-dropdown a.active {
    color: #ffffff;         
}

.nav-center {
    position: absolute;
    left: 50%;              
    transform: translateX(-50%); 
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo {
    height: 55px;           
    width: auto;            
    display: block;
}

.nav-right {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    width: 150px;           
}

.blog-icon {
    height: 33px;           
    width: auto;
    opacity: 0.7;           
    transition: opacity 0.3s; 
}

.blog-icon:hover {
    opacity: 1;             
}

/* ==========================================
   단일 페이지 화면 전환용 기본 세팅
   ========================================== */
.page-content {
    display: none !important; 
}

.page-content.active {
    display: block !important; 
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;    
    }
    .nav-left, .nav-right {
        width: 80px;        
    }
}

/* ==========================================
   ③ 메인 리스트 레이아웃 (main.html)
   ========================================== */
.container {
    padding: 100px 40px 200px 40px; 
    max-width: 1400px;            
    margin: 0 auto;               
}

.page-title {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 40px;
    color: #ffffff;
    text-align: center;           
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 250px)); 
    justify-content: center; 
    gap: 50px 100px;          
}

.project-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 105 / 210; 
    overflow: hidden;        
    background-color: #000;
}

.project-card img {
    width: 100%;             
    height: 100%;            
    object-fit: cover;       
    opacity: 0.6;           
    transition: opacity 0.4s ease; 
}

.project-card:hover img {
    opacity: 1.0;            
}

.project-info {
    position: absolute;
    top: 30px;
    left: 20px;
    right: 20px;
    pointer-events: none;    
}

.project-info h2 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.project-info p {
    font-size: 11px;
    color: #888888;
}

@media (max-width: 768px) 
{

    .intro-logo {
    width: 200px;                    
    height: auto;                    
    transition: transform 0.5s ease; 
}

    .project-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr)); 
        gap: 15px 15px;      
    }
    .container {
        padding: 100px 20px 40px 20px; 
    }
    .page-title {
        text-align: left;    
    }
}

/* ==========================================
   ④ 상세 페이지 레이아웃 (About 및 포트폴리오 상세 공통)
   ========================================== */
.container-detail {
    padding-top: 0px;    
    padding-bottom: 0px;   
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.detail-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;       
    padding: 0;            
    margin-bottom: 1px;    
    background-color: transparent; 
    color: #333333;
}

.detail-image-box {
    width: 100%;           
    aspect-ratio: 420 / 210; 
    overflow: hidden;
    background-color: #fff;
}

.detail-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;          
}

.detail-text-box {
    padding: 60px 40px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.detail-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #111111;
}

.detail-sub {
    font-size: 14px;
    color: #888888;
}

.detail-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #555555;
    letter-spacing: -0.3px;
}

@media (max-width: 768px) {
    .container-detail {
        padding-top: 10px;
    }
    .detail-section {
        padding: 100 20px;
        margin-bottom: 1px; 
    }
    .detail-text-box {
        padding: 40px 20px;
    }
}

/* ==========================================
   ⑤ 하단 푸터(Footer) 스타일
   ========================================== */
.site-footer {
    width: 100%;
    max-width: none;         
    margin-top: 25px;        
    padding-bottom: 40px;    
    display: flex;           
    justify-content: center; 
}

.footer-content {
    width: 100%;
    max-width: calc((219px * 4) + (25px * 3)); 
    display: flex;
    flex-direction: column;
    gap: 20px;               
    padding: 0;              
    border-top: 1px solid #111; 
    padding-top: 10px;       
}

.footer-brand {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;                
}

.footer-info p {
    font-size: 12px;
    color: #888888;         
    letter-spacing: 0.2px;
    line-height: 1.5;
}

.footer-info p span {
    color: #ffffff;         
    font-weight: 500;
    margin-right: 4px;      
}

.footer-info a {
    transition: color 0.3s ease; 
}
.footer-info a:hover {
    color: #ffffff;         
}

@media (max-width: 768px) {
    .site-footer {
        padding: 0 20px;    
        margin-top: 40px;   
    }
    .footer-content {
        max-width: 100%;    
        padding-top: 30px;
    }
}

/* ==========================================
   스크롤바(Scrollbar) 커스텀 디자인
   ========================================== */
::-webkit-scrollbar {
    width: 4px; 
}

::-webkit-scrollbar-track {
    background: #000000; 
}

::-webkit-scrollbar-thumb {
    background: #333333; 
    border-radius: 10px; 
    transition: background 0.3s ease; 
}

::-webkit-scrollbar-thumb:hover {
    background: #888888; 
}


/* ==========================================
   [추가] 라이트박스 단일 이미지 뷰어 CSS
   ========================================== */
.lightbox-overlay {
    display: none;              /* 평일에는 숨김 */
    position: fixed;            /* 스크롤에 무관하게 화면 전체 고정 */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95); /* 뒷배경을 매우 어두운 95% 블랙 투명도로 채움 */
    z-index: 5000;              /* 내비게이션 바보다 무조건 상단 노출 최우선순위 */
    justify-content: center;
    align-items: center;
}

/* 활성화 상태 클래스 */
.lightbox-overlay.show {
    display: flex;              /* 스크립트에 의해 쇼 작동 시 중앙 정렬 정착 */
}

/* 모달 이미지 컨텐츠 상자 */
.lightbox-content {
    position: relative;
    max-width: 90%;             
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;       /* 영역 밑 투명 영역 클릭이 네비게이션 공간에 방해되지 않도록 방어 */
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;        /* 원본 황금 비율이 깨지지 않도록 형태 보존 정렬 */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

/* 좌/우측 분할 보이지 않는 터치/클릭 감지 인터페이스 공간 */
.lightbox-nav-area {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;                 /* 화면의 정반을 각각 이전/다음 클릭 구역으로 사용 */
    z-index: 5010;              /* 이미지 바로 위로 레이어 할당 */
}

.left-area {
    left: 0;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>'), auto; 
    /* 왼쪽 절반 마우스 오버 시 왼쪽 화살표 커서 인라인 임베딩 */
}

.right-area {
    right: 0;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>'), auto;
    /* 오른쪽 절반 마우스 오버 시 오른쪽 화살표 커서 인라인 임베딩 */
}

/* 우측 상단 닫기 X 버튼 디자인 */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #888888;
    font-size: 36px;
    font-weight: 200;
    cursor: pointer;
    z-index: 5020;              /* 클릭 영역 최상단 배치 */
    transition: color 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ffffff;             /* 마우스 오버 시 하얗게 점등 */
}

/* 모바일 전용 UI 보정 */
@media (max-width: 768px) {
    .lightbox-close {
        top: 0px;
        right: 20px;
        font-size: 32px;
    }
}


/* 유튜브 동영상 반응형 16:9 레이아웃 스타일 */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 유지 (9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    margin-bottom: 1px; /* 아래 이미지와의 간격 */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}