/* ========================================
   H.D.L. (Hours. Days. Life.) 
   Universal Design System v1.5 - Final Layout Fix
   ======================================== */

:root {
    --hdl-bg-grey: #202020;
    --hdl-pure-black: #111111;
    --hdl-white: #ffffff;
    --hdl-grey: #a0a0a0;
    --hdl-border: #333333;
    --font-en: 'Montserrat', sans-serif;
    --font-kr: 'Noto Sans KR', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--hdl-bg-grey); color: var(--hdl-white); font-family: var(--font-kr); line-height: 1.6; overflow-x: hidden; scroll-behavior: smooth; }

/* --- 1. Typography --- */
.title-xl { font-family: var(--font-en); font-size: clamp(22px, 8vw, 40px); font-weight: 700; letter-spacing: -2px; line-height: 1.2; word-break: keep-all; }
.text_m { font-size: 18px; color: var(--hdl-grey); font-weight: 300; line-height: 1.8; }
.text_s { font-size: 11px; letter-spacing: 5px; color: #555; text-transform: uppercase; }

/* --- 2. Navigation (PC 우측 정렬 완벽 대응) --- */
nav { position: fixed; top: 0; width: 100%; height: 65px; z-index: 2000; background: rgba(32, 32, 32, 0.9); backdrop-filter: blur(15px); border-bottom: 1px solid var(--hdl-border); }
.nav-inner { display: flex !important; justify-content: space-between !important; align-items: center !important; max-width: 1200px; margin: 0 auto; width: 100%; height: 100%; padding: 0 25px; }
.logo-font { font-family: var(--font-en); font-weight: 600; letter-spacing: -1.5px; font-size: 22px; color: #fff; text-decoration: none; flex-shrink: 0; }

.desktop-menu { display: flex !important; list-style: none !important; gap: 30px; margin-left: auto !important; }
.desktop-menu a { font-size: 13px; font-weight: 700; color: var(--hdl-grey); text-decoration: none; transition: 0.3s; }
.desktop-menu a:hover { color: #fff; }

/* --- 3. Hamburger Button & Overlay --- */
.hamburger-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 2100; margin-left: 20px; border: none; background: none; }
.hamburger-btn span { width: 25px; height: 2px; background: #fff; transition: 0.3s; display: block; }

.mobile-overlay { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.8); z-index: 3000; transition: 0.4s ease-in-out; }
.mobile-overlay.active { right: 0; }
.mobile-menu-content { position: absolute; top: 0; right: 0; width: 250px; height: 100%; background: #1a1a1a; padding: 80px 30px; box-shadow: -5px 0 15px rgba(0,0,0,0.5); }
.mobile-links { display: flex; flex-direction: column; gap: 30px; list-style: none; }
.mobile-links a { color: #fff; text-decoration: none; font-size: 18px; font-weight: 700; }

/* --- 4. Main Layout (사이드바 우측 박제) --- */
#hdl-wrapper { display: flex !important; justify-content: space-between !important; max-width: 1200px; margin: 0 auto; padding: 85px 25px 40px; align-items: flex-start; width: 100%; }
#hdl-main { flex: 1 !important; min-width: 0; padding-right: 40px; } /* 우측 사이드바와 간격 */

/* --- 5. Home Buttons & Notion Feed --- */
.hub-header { padding: 40px 0 20px; }
.header-breadcrumb { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #666; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.hybrid-header { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0 60px; }
.hdl-card { background: var(--hdl-pure-black); border: 1px solid var(--hdl-border); padding: 50px 20px; transition: 0.4s ease; text-decoration: none; color: inherit; display: flex; flex-direction: column; text-align: center;}
.hdl-card:hover { transform: translateY(-10px); border-color: #777; }
.card-sub-title { font-size: 24px; margin: 15px 0; }
.hub-btn { background: #fff; color: #000; display: inline-block; padding: 5px 15px; margin-top: 15px; font-weight: 800; font-size: 11px; letter-spacing: 1px; }

/* Notion Style Feed */
.notion-feed { display: flex; flex-direction: column; gap: 20px; margin-bottom: 60px; }
.notion-card { background: var(--hdl-pure-black); border: 1px solid var(--hdl-border); border-radius: 8px; overflow: hidden; transition: 0.2s ease; }
.notion-card:hover { border-color: #777; }
.notion-card-link { display: flex; text-decoration: none; color: #fff; height: 160px; }
.notion-card-content { flex: 1; padding: 25px; display: flex; flex-direction: column; justify-content: center; }
.notion-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.notion-card-summary { font-size: 13px; color: var(--hdl-grey); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; line-height: 1.5; }
.notion-card-meta { font-size: 11px; color: #777; display: flex; align-items: center; gap: 6px; }
.notion-card-thumb { width: 250px; background-size: cover; background-position: center; border-left: 1px solid var(--hdl-border); flex-shrink: 0; }

/* --- 6. Sidebar & Profile --- */
#hdl-sidebar { width: 280px !important; flex-shrink: 0; position: sticky; top: 100px; display: flex !important; flex-direction: column !important; gap: 40px !important; }
.profile-card { background: var(--hdl-pure-black) !important; border: 1px solid var(--hdl-border) !important; padding: 30px !important; text-align: center; position: relative !important; width: 100% !important; box-sizing: border-box !important; }
.logo-box { font-family: var(--font-en); font-size: 20px; font-weight: 800; margin-bottom: 15px; }
.profile-name { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.profile-title { font-size: 11px; color: #666; margin-bottom: 25px; }
.lab-link-btn { display: block; border: 1px solid #444; padding: 10px; color: #fff; font-size: 11px; text-decoration: none; font-weight: 700; transition: 0.3s; }
.lab-link-btn:hover { background: #fff; color: #000; border-color: #fff; }

/* Sidebar Navigation */
.sidebar-nav { margin-top: 10px !important; position: relative !important; display: block !important; }
.sidebar-nav .tt_category, .sidebar-nav .category_list { position: static !important; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.sidebar-nav .tt_category .link_tit, .sidebar-nav .category_list > li > a { color: var(--hdl-grey) !important; font-size: 13px !important; text-decoration: none !important; padding: 10px 5px !important; border-bottom: 1px solid #222 !important; display: block !important; transition: 0.2s !important; }
.sidebar-nav .tt_category .link_tit:hover, .sidebar-nav .category_list > li > a:hover { color: #fff !important; background: rgba(255,255,255,0.05) !important; padding-left: 10px !important; }
.sidebar-nav .sub_category_list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.sidebar-nav .sub_category_list li a { padding-left: 15px !important; font-size: 12px !important; color: #777 !important; display: block !important; padding-top: 5px !important; padding-bottom: 5px !important; text-decoration: none !important;}
.sidebar-nav .sub_category_list li a:hover { color: #fff !important; padding-left: 20px !important; }

/* --- 7. Tistory Default Reset --- */
s_list, .list-section { display: none !important; }

/* --- 8. Mobile Optimization (768px) --- */
@media screen and (max-width: 768px) {
    .desktop-menu { display: none !important; }
    .hamburger-btn { display: flex !important; } /* 🚨 none에서 flex로 수정 완료! 🚨 */
    
    #hdl-wrapper { flex-direction: column !important; padding-top: 80px; }
    #hdl-main { padding-right: 0; width: 100%; }
    
    #hdl-sidebar { width: 100% !important; position: static; margin-top: 40px; padding: 0; }
    .hybrid-header { grid-template-columns: 1fr; }
    .notion-card-link { flex-direction: column; height: auto; }
    .notion-card-thumb { width: 100%; height: 180px; border-left: none; border-top: 1px solid var(--hdl-border); }
}