@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg-color: #ffffff;
    --text-title: #191f28; 
    --text-body: #333d4b;
    --text-muted: #8b95a1;
    --blue: #3182f6; 
    --blue-hover: #1b64da;
    --border: #f2f4f6;
    --gnb-bg: rgba(255, 255, 255, 0.85);
    --footer-bg: #f9fafb;
}

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

body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ====================================================
   상단 GNB & 네비게이션
   ==================================================== */
.gnb { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: var(--gnb-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.gnb_inner { width: 100%; max-width: 1040px; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.gnb_logo { font-weight: 800; font-size: 1.2rem; color: var(--text-title); text-decoration: none; }
.gnb_right { display: flex; align-items: center; gap: 32px; }

.gnb_nav { display: flex; gap: 28px; }
.gnb_nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.gnb_nav a:hover, .gnb_nav a.active { color: var(--text-title); }

/* ====================================================
   검색 영역 & 태그 드롭다운 레이어
   ==================================================== */
.gnb_search { position: relative; display: flex; align-items: center; }
.search_input_gnb { padding: 8px 16px 8px 36px; border-radius: 20px; border: 1px solid var(--border); background: #f9fafb; font-size: 0.9rem; width: 200px; outline: none; transition: all 0.2s; }
.search_input_gnb:focus { border-color: var(--blue); background: #ffffff; width: 260px; }
.search_icon { position: absolute; left: 12px; color: var(--text-muted); font-size: 14px; pointer-events: none; }

/* 태그 드롭다운 */
.search_dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}
/* 포커스 시 레이어 활성화 클래스 */
.search_dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown_title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.dropdown_tags { display: flex; flex-wrap: wrap; gap: 8px; }

.main_container { max-width: 1040px; margin: 0 auto; padding: 100px 20px 60px; }

/* ====================================================
   슬라이딩 배너 (Carousel)
   ==================================================== */
.carousel_wrapper { position: relative; width: 100%; border-radius: 24px; overflow: hidden; background: #f9fafb; margin-bottom: 60px; height: 400px; }
.carousel_track { display: flex; height: 100%; transition: transform 0.5s ease-in-out; }
.carousel_slide { min-width: 100%; height: 100%; display: flex; align-items: center; padding: 40px; text-decoration: none; color: inherit; }
.slide_content { flex: 1; padding-right: 40px; }
.slide_label { display: inline-block; color: var(--blue); font-weight: 700; margin-bottom: 16px; font-size: 0.95rem; }
.slide_title { font-size: 2.2rem; font-weight: 800; color: var(--text-title); line-height: 1.3; margin-bottom: 16px; word-break: keep-all; }
.slide_desc { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide_image { width: 45%; height: 100%; border-radius: 16px; overflow: hidden; }
.slide_image img { width: 100%; height: 100%; object-fit: cover; }

.carousel_btn { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: rgba(255,255,255,0.9); border: 1px solid var(--border); border-radius: 50%; cursor: pointer; font-size: 1.5rem; color: var(--text-title); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 6px rgba(0,0,0,0.05); z-index: 10; transition: all 0.2s; }
.carousel_btn:hover { background: #fff; box-shadow: 0 6px 12px rgba(0,0,0,0.1); }
.btn_prev { left: 20px; }
.btn_next { right: 20px; }

/* ====================================================
   글 목록 리스트
   ==================================================== */
.list_header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--text-title); padding-bottom: 20px; margin-bottom: 20px; }
.list_title { font-size: 1.5rem; font-weight: 800; color: var(--text-title); }

.post_list { display: flex; flex-direction: column; }
.post_item { display: flex; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.post_info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.post_thumb { width: 240px; height: 160px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.post_thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post_item:hover .post_thumb img { transform: scale(1.05); }

.post_title { font-size: 1.5rem; font-weight: 700; color: var(--text-title); margin-bottom: 12px; line-height: 1.4; transition: color 0.2s ease; }
.post_item:hover .post_title { color: var(--blue); }
.post_excerpt { font-size: 1rem; color: var(--text-body); margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post_meta { font-size: 0.9rem; color: var(--text-muted); display: flex; gap: 12px; margin-bottom: 16px; }

/* ====================================================
   태그 UI (카카오/토스 스타일)
   ==================================================== */
.post_tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag_pill { display: inline-flex; align-items: center; justify-content: center; padding: 6px 16px; border: 1px solid rgba(49, 130, 246, 0.5); border-radius: 999px; font-size: 0.85rem; font-weight: 500; color: var(--blue); background-color: transparent; transition: all 0.2s ease; cursor: pointer; }
.tag_pill:hover { background-color: rgba(49, 130, 246, 0.05); border-color: var(--blue); }

/* ====================================================
   푸터 (Footer)
   ==================================================== */
.footer { background-color: var(--footer-bg); padding: 60px 20px; border-top: 1px solid var(--border); margin-top: 60px; }
.footer_inner { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer_col h4 { font-size: 1rem; font-weight: 700; color: var(--text-title); margin-bottom: 20px; }
.footer_col ul { list-style: none; }
.footer_col li { margin-bottom: 12px; }
.footer_col a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.footer_col a:hover { color: var(--text-title); text-decoration: underline; }
.footer_bottom { max-width: 1040px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.85rem; }

/* ====================================================
   본문 페이지 레이아웃 (좌 본문, 우 TOC)
   ==================================================== */
.post_layout {
    display: flex;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px; /* GNB 높이 고려 */
    position: relative;
    align-items: flex-start;
}

.post_main_content {
    flex: 1;
    min-width: 0; /* 텍스트 오버플로우 방지 */
    max-width: 800px;
}

/* ====================================================
   동적 목차 (Table of Contents)
   ==================================================== */
.toc_container {
    position: sticky;
    top: 100px; /* 스크롤 시 화면 상단에 고정 */
    width: 260px;
    flex-shrink: 0;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 모바일/태블릿에서는 TOC 숨김 */
@media (max-width: 1024px) {
    .toc_container { display: none; }
    .post_layout { justify-content: center; }
}

.toc_title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc_list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc_link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
    display: block;
    line-height: 1.4;
}

/* h3 태그(소제목)는 들여쓰기 */
.toc_link.toc_h3 {
    padding-left: 16px;
    font-size: 0.85rem;
}

.toc_link:hover {
    color: var(--text-title);
}

/* 현재 스크롤 위치의 제목 강조 */
.toc_link.active {
    color: var(--blue);
    font-weight: 700;
    transform: translateX(4px);
}


/* ========================================================
   Modern Tech Footer Style 
   ======================================================== */
.footer {
    background-color: #0d1117; /* 모던한 다크톤 */
    color: #8b949e;
    padding: 80px 20px 40px;
    border-top: 1px solid #30363d;
    font-family: 'Inter', 'Pretendard', sans-serif;
}

.footer_inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: space-between;
}

/* 브랜드 설명 영역 (좌측 크게) */
.footer_brand {
    flex: 1 1 300px;
    max-width: 400px;
}

.footer_logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f0f6fc;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 16px;
}
.footer_logo span {
    color: #58a6ff; /* 강조색 */
}

.footer_desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.footer_social {
    display: flex;
    gap: 16px;
}

.social_icon {
    font-size: 1.2rem;
    color: #8b949e;
    text-decoration: none;
    transition: color 0.2s ease;
    filter: grayscale(100%) opacity(0.7);
}
.social_icon:hover {
    color: #f0f6fc;
    filter: grayscale(0%) opacity(1);
}

/* 카테고리 컬럼 */
.footer_col {
    flex: 1 1 150px;
}

.footer_col h4 {
    color: #f0f6fc;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer_col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer_col li {
    margin-bottom: 12px;
}

.footer_col a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.footer_col a:hover {
    color: #58a6ff; /* 호버 시 파란색 하이라이트 */
}

/* 배지 (New, Hiring 등) */
.badge_new, .badge_hiring {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
}

.badge_new {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

.badge_hiring {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
    border: 1px solid rgba(163, 113, 247, 0.3);
}

/* 푸터 최하단 영역 */
.footer_bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid #21262d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
}

.footer_bottom_left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer_legal_links {
    display: flex;
    gap: 16px;
}

.footer_legal_links a {
    color: #8b949e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer_legal_links a:hover {
    color: #f0f6fc;
}

/* 시스템 상태 인디케이터 */
.footer_status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f0f6fc;
    font-weight: 500;
}

.status_dot {
    width: 10px;
    height: 10px;
    background-color: #2ea043; /* 녹색 정상 상태 */
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(46, 160, 67, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 160, 67, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 160, 67, 0); }
}

@media (max-width: 768px) {
    .footer_inner { flex-direction: column; gap: 40px; }
    .footer_bottom { flex-direction: column; align-items: flex-start; }
}

