:root {
    --brand-primary: #0A1628;
    --brand-surface: #0F2035;
    --brand-accent: #00E5A0;
    --brand-secondary: #00B4D8;
    --brand-bg-light: #F0F4F8;
}

[x-cloak] {
    display: none !important;
}

.prose {
    max-width: 720px;
    line-height: 1.7;
}

details > summary {
    cursor: pointer;
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details > summary::after {
    content: '›';
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 160ms ease;
}

details[open] > summary::after {
    transform: rotate(90deg);
}

::selection {
    background: var(--brand-accent);
    color: var(--brand-primary);
}

.table-wrap {
    overflow-x: auto;
}

/* === Landing 보강 === */

/* Inquiry form 입력 필드 다크 모드 */
.inquiry-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 14px;
    color: #f1f5f9;
    font-size: 14px;
    transition: border-color .15s, background .15s;
}

.inquiry-input:focus {
    outline: none;
    border-color: #00E5A0;
    background: rgba(0,229,160,0.04);
}

.inquiry-input::placeholder {
    color: #64748b;
}

textarea.inquiry-input {
    resize: vertical;
    min-height: 120px;
}

select.inquiry-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300E5A0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Reveal 애니메이션 */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Keywords marquee */
@keyframes marqueeX {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.marquee-track {
    animation: marqueeX 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* Nav scrolled 상태 */
nav#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* 모바일 메뉴 링크 hover */
.mobile-link {
    display: block;
}
/* === Notion content === */
.notion-content { font-size: 17px; line-height: 1.75; }
.notion-content > * + * { margin-top: 0.25rem; }
.notion-content table { border-collapse: collapse; }
.notion-content img { max-width: 100%; height: auto; }
.notion-content details > summary::-webkit-details-marker { display: none; }

/* 글자 크기 위젯이 .notion-content font-size를 바꾸면 헤딩/리스트도 비례로 따라감 */
.notion-content p,
.notion-content li,
.notion-content td,
.notion-content th,
.notion-content blockquote,
.notion-content figcaption { font-size: 1em; }
.notion-content h2 { font-size: 1.875em !important; line-height: 1.4 !important; }
.notion-content h3 { font-size: 1.5em   !important; line-height: 1.4 !important; }
.notion-content h4 { font-size: 1.25em  !important; line-height: 1.45 !important; }
.notion-content code { font-size: 0.9em !important; }
.notion-content pre  { font-size: 0.95em !important; }
.notion-content summary { font-size: 1em !important; }

/* === 스크롤 부드럽게 === */
html { scroll-behavior: smooth; }

/* === Notion content 추가 보강 === */
.notion-content h2[id], .notion-content h3[id], .notion-content h4[id] { scroll-margin-top: 6rem; }
.notion-content a { word-break: break-all; }

/* TOC 활성 링크 - JS가 클래스 토글 */

/* === Content protection (가벼운 방지턱) === */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

/* === 코드블록 hover/active === */
.code-block {
    user-select: none;
}
.code-block pre { user-select: none; }
.code-block:active { transform: translateY(1px); }

/* === 강의 코드 카드 — 회전하는 네온 보더 === */
.code-card-shell {
    background:
        conic-gradient(
            from var(--code-card-angle, 0deg),
            transparent 0deg,
            rgba(0, 229, 160, 0.0) 40deg,
            rgba(0, 229, 160, 0.6) 90deg,
            rgba(0, 229, 160, 1) 120deg,
            rgba(0, 229, 160, 0.6) 150deg,
            rgba(0, 229, 160, 0.0) 200deg,
            transparent 360deg
        );
    animation: code-card-rotate 6s linear infinite;
}
.code-card-shell::before {
    content: '';
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle at center, rgba(0, 229, 160, 0.18), transparent 60%);
    filter: blur(40px);
    z-index: -1;
    opacity: 0.7;
    animation: code-card-pulse 4s ease-in-out infinite;
    pointer-events: none;
}
@property --code-card-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes code-card-rotate {
    to { --code-card-angle: 360deg; }
}
/* @property 미지원 브라우저 fallback: filter hue-rotate로 비슷한 효과 */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
    .code-card-shell {
        background: linear-gradient(135deg, rgba(0, 229, 160, 0.6), rgba(0, 229, 160, 0.1), rgba(0, 229, 160, 0.6));
        animation: code-card-hue 6s linear infinite;
    }
    @keyframes code-card-hue {
        0%   { filter: hue-rotate(0deg); }
        100% { filter: hue-rotate(20deg); }
    }
}
@keyframes code-card-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

/* === 글자 크기 조절 위젯 === */
#font-fab, #font-fab * { user-select: none; }
#font-slider {
    accent-color: #00E5A0;
}
#font-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px; height: 14px; border-radius: 50%;
    background: #00E5A0;
    border: 2px solid #0F2035;
    cursor: pointer;
}
#font-slider::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%;
    background: #00E5A0;
    border: 2px solid #0F2035;
    cursor: pointer;
}

/* 사이드바 슬림 스크롤바 */
.material-sidebar-scroll::-webkit-scrollbar { width: 4px; }
.material-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.material-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 9999px; }
.material-sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* Alpine x-cloak (FOUC 방지) */
[x-cloak] { display: none !important; }
