/*
Theme Name: Personal Resume Portfolio
Description: Sidebar Left-Fixed Black Theme
*/

:root {
    --side-bg-color: #1a1a1a;
    --side-text-color: #ffffff;
    --secondary-color: #EE654D;
}

/* 1. 기본 공통 설정 */
#aside-nav-wrapper, 
.sidewrapper.sidenav, 
#fly-sidebar {
    background-color: var(--side-bg-color) !important;
}

/* 2. 데스크톱 레이아웃 (750px 이상) */
@media only screen and (min-width: 750px) {
    /* 본문을 왼쪽으로 당기기 위해 오른쪽 패딩을 크게 줍니다 */
    #page.site {
        padding-left: 0 !important;      /* 왼쪽은 바짝 붙이고 */
        padding-right: 300px !important; /* 오른쪽 여백을 크게 줘서 본문을 왼쪽으로 밀어버림 */
        
        width: 100% !important;
        box-sizing: border-box !important; /* 패딩이 너비에 포함되도록 설정 (필수!) */
        display: block !important;
    }

    /* 사이드바 설정: 왼쪽 완전 고정 */
    #aside-nav-wrapper {
        position: fixed !important;
        top: 50px !important; 
        left: 0 !important;
        width: 250px !important;
        height: calc(100vh - 50px) !important;
        background-color: #1a1a1a !important;
        z-index: 90 !important;
        margin: 0 !important;
        transform: none !important;
        overflow-y: auto !important;
    }

    /* 본문 영역 전체: 내부 요소들을 중앙으로 모으는 기둥 역할 */
    #content.site-content {
        margin-left: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; 
        padding-top: 40px !important; /* 상단 여백 확보 */
    }

    /* 글, 포스트, 망보드 로그인, 이용약관 상자들: 실제 중앙 정렬 박스 */
    .content-wrap, 
    .entry-content, 
    .mangboard, 
    #mb_login,
    article {
        width: 100% !important;
        max-width: 900px !important; /* 너무 넓어지지 않게 가독성 폭 제한 */
        margin-left: auto !important; 
        margin-right: auto !important; 
        float: none !important;
    }
}

/* 3. 모바일/태블릿 레이아웃 (750px 이하) - 통합 최적화 */
@media only screen and (max-width: 750px) {

    /* [1] 데스크톱 여백 초기화 및 본문 너비 확보 */
    #page.site {
        padding-left: 0 !important;
        padding-top: 60px !important; /* 상단 검은 바 높이만큼 여백 */
        display: block !important;
        width: 100% !important;
    }

/* [2] 콘텐츠 박스 레이아웃 조정: 화면보다 20% 더 넓게 확장 */
    #content.site-content, 
    .content-wrap,
    .entry-content {
        /* 너비를 화면의 120%로 설정 */
        width: 110% !important; 
        
        /* 늘어난 20%의 절반인 10%만큼 왼쪽으로 강제로 당겨서 중앙 맞춤 */
        margin-left: -5% !important; 
        
        /* 오른쪽 마진도 똑같이 맞춰줍니다 */
        margin-right: -5% !important; 
        
        /* 안쪽 여백은 최소화해서 공간 확보 */
        padding: 1px !important; 
        box-sizing: border-box !important;
    }

/* 3. 모바일 레이아웃 - 망보드 강제 확장 */
@media only screen and (max-width: 750px) {

    /* 망보드 로그인/게시판의 가장 바깥쪽 상자를 직접 타격 */
    div[id*="mb_login"], 
    div[class*="mangboard"], 
    .mb_login_form {
        width: 100vw !important; /* 화면 가로폭 전체를 다 쓰겠다고 선언 */
        margin-left: -15px !important; /* 왼쪽 여백(padding)만큼 왼쪽으로 당김 */
        padding-right: 0 !important;
        min-width: 0 !important;
        overflow: visible !important; /* 삐져나가는 걸 허용 */
    }

    /* 진짜 범인인 내부 테이블(표)을 오른쪽으로 확장 */
    div[id*="mb_login"] table, 
    .mb_login_form table {
        width: calc(100% + 20px) !important; /* 부모보다 20px 더 크게 */
        position: relative !important;
        left: 0 !important;
        min-width: 0 !important;
    }

    /* 입력창들이 잘리지 않게 조정 */
    .mb_login_form input {
        width: 95% !important; /* 너무 꽉 차면 답답하니 95% */
    }
}

    /* [4] 망보드 입력창 및 버튼 확장 */
    .mb_board input, 
    .mangboard input, 
    .mb_login_form input[type="text"], 
    .mb_login_form input[type="password"] {
        width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* [5] 모든 이미지, 표, 동영상 화면 폭 고정 */
    img, iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        word-break: break-all !important;
        border-collapse: collapse !important;
    }

    /* [6] 표 내부 텍스트 및 셀 크기 축소 */
    table td, table th, 
    .mangboard td, .mb_board td {
        padding: 8px 4px !important;
        font-size: 13px !important;
        word-break: break-all !important;
    }
}

/* 4. 텍스트 및 로고 스타일 (공통) */
#aside-nav-wrapper #navbar ul li a,
#aside-nav-wrapper .site-title a,
#aside-nav-wrapper .site-description {
    color: var(--side-text-color) !important;
}

#aside-nav-wrapper #navbar ul li a:hover,
#aside-nav-wrapper #navbar ul li.current_page_item > a {
    color: var(--secondary-color) !important;
    background-color: rgba(255,255,255,0.05);
}

#aside-nav-wrapper .my-photo .custom-logo-link {
    width: 90px !important;
    height: 90px !important;
    margin: 20px auto !important;
    display: block;
    border: 2px solid rgba(255,255,255,0.2);
}