/* 게시판 공통 헤더 */
#renewal-board-header {
    --line: #e1e6e1;
    --accent: #496650;

    position: fixed;
    inset: 0 0 auto;
    z-index: 20;

    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    color: #242b28;
    color-scheme: light;

    font-family: "Pretendard", "Noto Sans KR",
        -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    word-break: keep-all;

    transition: background .3s, border-color .3s;
}

#renewal-board-header,
#renewal-board-header *,
#renewal-board-header *::before,
#renewal-board-header *::after {
    box-sizing: border-box;
}

#renewal-board-header a {
    color: inherit;
    text-decoration: none;
}

#renewal-board-header button {
    margin: 0;
    font: inherit;
    cursor: pointer;
}

#renewal-board-header a,
#renewal-board-header button {
    -webkit-tap-highlight-color: transparent;
}

#renewal-board-header a:focus-visible,
#renewal-board-header button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}

#renewal-board-header.is-scrolled {
    background: rgba(255, 255, 255, .90);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

/* 헤더 높이 확보 */
.renewal-board-header-space {
    height: 98px;
}

.renewal-board-skip {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 8px 16px;
    background: #fff;
    color: #111;
    transform: translateY(-150%);
}

.renewal-board-skip:focus {
    transform: none;
}

/* 내부 배치 */
#renewal-board-header .nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    max-width: 940px;
    margin: auto;
    padding: 23px 28px;
}

/* 로고와 하단 문구 */
#renewal-board-header .wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    flex-shrink: 0;

    color: #242b28;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -1.2px;
    line-height: 1.2;
}

#renewal-board-header .wordmark-logo {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

#renewal-board-header .brand-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    margin-left:5px;
    border-radius: 50%;
    background: var(--accent);
}

#renewal-board-header .wordmark-caption {
    display: block;
    max-width: 100%;
    margin: 0;

    color: inherit;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -.03em;
    white-space: normal;
    word-break: keep-all;
    opacity: .7;
}

/* 메뉴 */
#renewal-board-header #site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #66756b;
    font-size: 12px;
}

#renewal-board-header #site-nav a {
    white-space: nowrap;
}

#renewal-board-header #site-nav a:hover {
    color: #242b28;
}

#renewal-board-header #site-nav .nav-pill {
    padding: 9px 18px;
    border: 1px solid #dce5dc;
    border-radius: 30px;
    background: #f3f6f1;
    color: #496650;
    font-size: 12px;
    transition:
        background-color .25s ease,
        border-color .25s ease,
        color .25s ease;
}

#renewal-board-header .nav-pill span {
    margin-left: 12px;
}

#renewal-board-header .nav-board-links {
    display: flex;
    gap: 10px;
}

#renewal-board-header .menu-toggle {
    display: none;
    flex-shrink: 0;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: none;
    color: #242b28;
    white-space: nowrap;
}

/* 연구논문 메뉴 */
#renewal-board-header #site-nav .nav-pill.nav-pill-research {
    border-color: #edf3e9;
    background: #edf3e9;
    color: #38533d;
}

#renewal-board-header #site-nav .nav-pill.nav-pill-research:hover,
#renewal-board-header #site-nav .nav-pill.nav-pill-research:focus-visible {
    border-color: #597553;
    background: #dfead9;
    color: #263e2b;
}

/* 접힌 메뉴 */
@media (max-width: 1000px) {
    #renewal-board-header .menu-toggle {
        display: block;
    }

    #renewal-board-header #site-nav {
        display: none;
        position: absolute;
        top: calc(100% - 10px);
        left: 16px;
        right: 16px;

        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;

        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        font-size: 14px;
        font-weight: 600;

        max-height: calc(100vh - 120px);
        max-height: calc(100dvh - 120px);
        overflow-y: auto;
    }

    #renewal-board-header #site-nav.is-open {
        display: flex;
    }

    #renewal-board-header .nav-board-links {
        display: grid;
        grid-template-columns: repeat(
            auto-fit, minmax(120px, 1fr)
        );
        width: 100%;
        gap: 10px;
    }

    #renewal-board-header .nav-board-links .nav-pill {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        margin: 0;
        text-align: center;
    }
}

@media (max-width: 900px) {
    #renewal-board-header .nav-shell {
        padding-inline: 24px;
    }
}

/* 모바일: 같은 자리에서 로고와 설명 교차 전환 */
@media (max-width: 600px) {
    #renewal-board-header .nav-shell {
        gap: 12px;
        min-height: 80px;
        padding: 18px 20px;
    }

    #renewal-board-header .wordmark {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        flex: 1 1 0%;
        gap: 0;
        min-width: 0;
        font-size: 23px;
    }

    #renewal-board-header .wordmark-logo,
    #renewal-board-header .wordmark-caption {
        grid-area: 1 / 1;
    }

    #renewal-board-header .wordmark-logo {
        animation: hc-board-brand-logo 10s linear infinite;
    }

    #renewal-board-header .wordmark-caption {
        font-size: 13px;
        font-weight:600;
        line-height: 1.65;
        opacity: 0;
        animation: hc-board-brand-caption 10s linear infinite;
    }

    #renewal-board-header .wordmark-caption-detail {
        display: block;
    }

    .renewal-board-header-space {
        height: 80px;
    }
}

@keyframes hc-board-brand-logo {
    0%, 38%, 100% {
        opacity: 1;
    }

    48%, 88% {
        opacity: 0;
    }

    98% {
        opacity: 1;
    }
}

@keyframes hc-board-brand-caption {
    0%, 38%, 98%, 100% {
        opacity: 0;
    }

    48%, 88% {
        opacity: .7;
    }
}

/* 움직임 줄이기 */
@media (prefers-reduced-motion: reduce) {
    #renewal-board-header,
    #renewal-board-header *,
    #renewal-board-header *::before,
    #renewal-board-header *::after {
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
    #renewal-board-header .wordmark-logo {
        opacity: 1;
    }

    #renewal-board-header .wordmark-caption {
        display: none;
    }
}


/* 로고 광택 */
#renewal-board-header .wordmark-logo {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: fit-content;
    max-width: 100%;
}

#renewal-board-header .wordmark-logo::after {
    content: "";
    position: absolute;
    inset: -20% auto -20% 0;
    width: 35%;
    pointer-events: none;

    background: linear-gradient(
        105deg,
        transparent,
        rgba(255, 255, 255, .85),
        transparent
    );
    mix-blend-mode: screen;
    transform: translateX(-180%) skewX(-15deg);
    animation: hc-board-logo-shine 5s ease-in-out infinite;
}

@keyframes hc-board-logo-shine {
    0%, 15% {
        transform: translateX(-180%) skewX(-15deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    50% {
        transform: translateX(420%) skewX(-15deg);
        opacity: 0;
    }

    100% {
        transform: translateX(420%) skewX(-15deg);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #renewal-board-header .wordmark-logo::after {
        animation: none !important;
        display: none;
    }
}