/* ===================== :root CSS Variables ===================== */
:root {
    --clr-primary: #0e72b1;
    --clr-primary-light: #3a9fdd;
    --clr-primary-dark: #064a78;
    --clr-accent: #4fc3f7;
    --clr-dark: #0b1120;
    --clr-dark-alt: #111d35;
    --clr-light: #f0f4f8;
    --clr-text: #e2e8f0;
    --clr-muted: #94a3b8;
    --clr-card-bg: rgba(17, 29, 53, 0.7);
    --font-main: 'Poppins', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; /* [A-5] 한글 폰트 fallback: Pretendard CDN + 시스템 한글 폰트 -by Sino 2026-08-28 @date 2026-08-28 */
    --nav-h: 64px;
    --max-w: 1140px;
    --radius: 12px;
    --glow-spread: rgba(14, 114, 177, 0.35);
}

/* ===================== Global Reset ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--clr-text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--clr-dark);
    overflow-x: hidden;
}

/* ===================== Scrollbar ===================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--clr-dark); }
::-webkit-scrollbar-thumb { background: var(--clr-primary-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-primary); }

/* ===================== Links ===================== */
a {
    color: var(--clr-accent);
    text-decoration: none;
    transition: all 0.25s ease;
}
a:hover { color: #fff; }

/* ===================== Headings ===================== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-weight: 600;
}
/* [B-3] 타이포 스케일: 헤딩 대비 1.33→1.5, 대형 헤딩 자간 축소 (masthead h1 제외) -by Sino 2026-08-28 @date 2026-08-28 */
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }

p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }

/* ===================== Tables ===================== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
th, td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(79, 195, 247, 0.15);
    text-align: left;
}
th {
    background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary));
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
}
td { background: rgba(11, 17, 32, 0.5); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(14, 114, 177, 0.1); }

/* ===================== Navbar ===================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: linear-gradient(135deg, rgba(11, 17, 32, 0.95), rgba(6, 74, 120, 0.85));
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    z-index: 1000;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4), 0 0 40px var(--glow-spread);
    border-bottom: 1px solid rgba(79, 195, 247, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    height: 56px;
    background: linear-gradient(135deg, rgba(11, 17, 32, 0.98), rgba(6, 74, 120, 0.95));
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.navbar .container {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
}

.brand {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--clr-accent), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}
.brand:hover { transform: scale(1.05); }

.nav-links { list-style: none; display: flex; gap: 2rem; }

.nav-links a {
    color: var(--clr-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0;
    position: relative;
    transition: all 0.3s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--clr-primary-light), var(--clr-accent));
    border-radius: 1px;
    transition: width 0.3s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

/* [A-2] active nav: buildNav의 class="active" 단일 선택자로 하드코딩 4건 대체 -by Sino 2026-08-28 @date 2026-08-28 */
.nav-links a.active { color: #fff; }
.nav-links a.active::after { width: 100%; }

/* ===================== [P7] Nav Dropdown (게시글) ===================== */
/* 드롭다운: 게시글 트리거 -by Sino 2026-09-04 @date 2026-09-04 */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex; align-items: center; gap: 0.25rem;
    color: var(--clr-muted); font-size: 0.95rem; font-weight: 500;
    padding: 0.4rem 0; cursor: pointer; position: relative;
    transition: all 0.3s ease;
    line-height: 1;  /* [UI보완] chevron(▾) box가 toggle 높이를 늘려 텍스트 baseline이 이웃 링크보다 내려가던 문제 — a와 동일하게 1로 통일 -by Sino 2026-09-05 */
}
.nav-dropdown-toggle::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 2px; background: linear-gradient(90deg, var(--clr-primary-light), var(--clr-accent));
    transition: width 0.3s ease;
}
.nav-dropdown-toggle:hover { color: #fff; }
.nav-dropdown-toggle:hover::after { width: 100%; }
.nav-dropdown.active .nav-dropdown-toggle { color: #fff; }
.nav-dropdown.active .nav-dropdown-toggle::after { width: 100%; }

/* 드롭다운 메뉴 (기본: 숨김) -by Sino 2026-09-04 @date 2026-09-04 */
.nav-dropdown-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    min-width: 180px; list-style: none; margin-top: 0.5rem;
    background: var(--clr-dark-alt); border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0; visibility: hidden; transition: all 0.25s ease;
    z-index: 1001; padding: 0.5rem 0;
}
.nav-dropdown-menu::before {
    content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(79, 195, 247, 0.2);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1; visibility: visible;
}
.nav-dropdown-menu li a {
    display: block; padding: 0.5rem 1rem; color: var(--clr-muted);
    font-size: 0.9rem; white-space: nowrap;
}
.nav-dropdown-menu li a::after { display: none; } /* 드롭다운 내 ::after 밑줄 비활성 -by Sino 2026-09-04 */
.nav-dropdown-menu li a:hover { background: rgba(14, 114, 177, 0.15); color: #fff; }
.nav-dropdown-menu li a[aria-current="page"] { color: var(--clr-accent); font-weight: 600; }

/* [P9] 드롭다운 JS 토글 상태 (.open 클래스, 클릭/키보드 접근성) -by Sino 2026-09-04 @date 2026-09-04 */
.nav-dropdown.open .nav-dropdown-menu { opacity: 1; visibility: visible; }

/* ===================== [P10] 게시글 목록 스타일 ===================== */
/* 카테고리 목록 페이지: 카드 그리드 (최신순) -by Sino 2026-09-04 @date 2026-09-04 */
.post-listing { margin-top: 2rem; }
.post-listing .section-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 3rem; }
.post-card { display: block; text-decoration: none; color: inherit; }
.post-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(14, 114, 177, 0.2); }
.post-date { font-size: 0.8rem; color: var(--clr-muted); letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.post-card h3 { color: var(--clr-accent); margin-bottom: 0.5rem; }
.post-card .post-excerpt { color: var(--clr-muted); font-size: 0.95rem; line-height: 1.6; }

/* 홈 최신 게시글 섹션: "전체 보기 →" 링크 (목록 페이지 .post-listing과 격리) -by Sino 2026-09-05 @date 2026-09-05 */
.post-all-link { text-align: center; margin-top: 2.5rem; }

/* ===================== [EB] 외부 블로그 섹션 스타일 ===================== */
/* 블로그 목록 페이지 하단: 외부 블로그 카드 (기존 .card 재용 + 도메인/하위 게시글 링크) -by Sino 2026-09-06 @date 2026-09-06 */
.post-external { padding: 3rem 0 5rem; }
.post-external .section-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 3rem; }
.post-domain { font-size: 0.8rem; color: var(--clr-muted); letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.post-sublinks { list-style: none; padding: 0; margin-top: 1rem; }
.post-sublinks li { padding: 0.3rem 0; border-top: 1px solid rgba(79, 195, 247, 0.08); }
.post-sublinks li a { color: var(--clr-text); font-size: 0.9rem; text-decoration: underline; text-decoration-color: rgba(79, 195, 247, 0.4); transition: color 0.25s ease; }
.post-sublinks li a:hover { color: var(--clr-accent); }

/* ===================== [P11] 게시글 백링크 스타일 ===================== */
/* 게시글 상세 상단: ← 카테고리 라벨 칩 -by Sino 2026-09-04 @date 2026-09-04 */
.post-backlink { margin-bottom: 2rem; }
.post-backlink a {
    display: inline-flex; align-items: center; gap: 0.25rem;
    color: var(--clr-muted); font-size: 0.95rem; font-weight: 500;
    padding: 0.25rem 0.75rem; border-radius: 50px;
    background: rgba(14, 114, 177, 0.15); border: 1px solid rgba(79, 195, 247, 0.2);
    transition: all 0.25s ease;
}
.post-backlink a:hover { background: rgba(14, 114, 177, 0.3); color: #fff; transform: translateX(-2px); }

/* [API] 댓글 섹션 스타일 — style.css :root에 --clr-border 변수가 없어 --clr-dark-alt/rgba 계열로 교체 -by Sino 2026-10-16 */
.comment-section { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--clr-dark-alt); }
.comment-list { margin-bottom: 2rem; }
.comment-item { padding: 1rem 0; border-bottom: 1px solid rgba(148, 163, 184, 0.2); }
.comment-item time { color: var(--clr-muted); margin-left: 0.5rem; font-size: 0.85rem; }
.comment-item p { margin: 0.5rem 0 0; color: var(--clr-text); }
.no-comment { color: var(--clr-muted); font-style: italic; }
.comment-form .form-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.comment-form input { padding: 0.5rem; border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 4px; background: var(--clr-dark-alt); color: var(--clr-text); }
.comment-form input[type="text"]#authorName { width: 140px; }
.comment-form input[type="text"]#commentContent { flex: 1; min-width: 200px; }
.comment-form button { padding: 0.5rem 1rem; background: var(--clr-accent); color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.captcha-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.captcha-row button { padding: 0.25rem 0.5rem; background: var(--clr-muted); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
#commentMsg { margin-top: 0.5rem; font-size: 0.9rem; }

/* [API] 홈 방문 배지 -by Sino 2026-10-18 */
.visit-badge { margin-top: 3rem; text-align: center; }
.visit-badge-text { color: var(--clr-muted); font-size: 0.95rem; letter-spacing: 0.02em; }
.visit-badge-text span { color: var(--clr-text); font-weight: 600; }

/* ===================== Container & Content ===================== */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

.content-area {
    flex: 1;
    margin-top: calc(var(--nav-h) + 1rem);
    margin-bottom: 4rem;
    padding: 3rem 0;
}

/* ===================== Hero / Masthead ===================== */
.masthead {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
}

/* Animated gradient background */
.masthead::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--clr-dark) 0%,
        #0a1628 25%,
        #0d2a4e 50%,
        #0a1628 75%,
        var(--clr-dark) 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating orbs */
.masthead::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.12) 0%, transparent 70%);
    top: 15%; right: -10%;
    animation: floatOrb 8s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 40px) scale(1.15); }
}

.masthead h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    background: linear-gradient(135deg, #fff 0%, var(--clr-accent) 50%, var(--clr-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.masthead p {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--clr-muted);
    max-width: 920px;  /* [UI보완] 680px → 920px, 문구 박스 너비 완화 -by Sino 2026-09-05 */
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* CTA buttons */
.masthead .cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.masthead .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.masthead .btn-primary {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
    color: #fff;
    box-shadow: 0 4px 24px rgba(14, 114, 177, 0.4);
}
.masthead .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(14, 114, 177, 0.6);
    color: #fff;
    text-decoration: none;
}

.masthead .btn-outline {
    background: transparent;
    color: var(--clr-accent);
    border: 2px solid rgba(79, 195, 247, 0.4);
}
.masthead .btn-outline:hover {
    background: rgba(79, 195, 247, 0.1);
    border-color: var(--clr-accent);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== Section Common ===================== */
.section { padding: 5rem 0; }

.section:nth-child(even) {
    background: linear-gradient(180deg, transparent, rgba(6, 74, 120, 0.08), transparent);
}

/* Section title with animated underline */
.section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    color: #fff;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: -8px;
    width: 64px; height: 3px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
    border-radius: 2px;
    transition: width 0.4s ease;
}
.section-title:hover::after { width: 100%; }

/* ===================== Cards ===================== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--clr-card-bg);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(79, 195, 247, 0.08);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(14, 114, 177, 0.2), 0 0 60px var(--glow-spread);
    border-color: rgba(79, 195, 247, 0.2);
}
.card:hover::before { transform: scaleX(1); }

/* [B-1] Spotlight card: 커서 추적 라디얼 그라데이션 (::after, --mouse-x/y CSS 변수) -by Sino 2026-08-28 @date 2026-08-28 */
.card::after,
.portfolio-card::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(79, 195, 247, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.card:hover::after,
.portfolio-card:hover::after { opacity: 1; }

.card h3 {
    color: var(--clr-accent);
    margin-bottom: 0.75rem;
}
.card p {
    color: var(--clr-muted);
    font-size: 0.95rem;
}

/* ===================== Portfolio Cards ===================== */
.portfolio-card {
    background: var(--clr-card-bg);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(79, 195, 247, 0.08);
    margin-bottom: 2rem;
}
.portfolio-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 40px rgba(14, 114, 177, 0.2), 0 0 60px var(--glow-spread);
    border-color: rgba(79, 195, 247, 0.2);
}
.portfolio-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}
.portfolio-card:hover img { transform: scale(1.04); }

.portfolio-card .p-info { padding: 1.5rem 2rem; }
.portfolio-card .p-info h3 { color: var(--clr-accent); margin-bottom: 0.5rem; }
.portfolio-card .p-info p { color: var(--clr-muted); font-size: 0.9rem; margin-bottom: 0; }

/* ===================== Image Styling ===================== */
.content-area img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.content-area img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 36px rgba(14, 114, 177, 0.3);
}

/* ===================== Horizontal Rules ===================== */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.3), transparent);
    margin: 3rem auto;
    width: 80%;
}

/* [B-2] Scroll progress bar (상단 2px 그라데이션 진행 바, 인라인 JS가 width 갱신) -by Sino 2026-08-28 @date 2026-08-28 */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
    width: 0;
    z-index: 9999;  /* [UI보완] 드롭다운(z 1001)·모바일 햄버거보다 항상 최상단 표시 -by Sino 2026-09-05 */
}

/* [B-5] 기술 스택 칩 그리드: table 대체 (미리보기 .tech-chip 계열 값 그대로) -by Sino 2026-08-28 @date 2026-08-28 */
.tech-chip {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    background: rgba(14, 114, 177, 0.15);
    border: 1px solid rgba(79, 195, 247, 0.2);
    margin: 0.3rem;
    color: var(--clr-accent);
}
.tech-chip-group { margin-bottom: 1.5rem; }
.tech-chip-group .group-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-muted);
    display: block;
    margin-bottom: 0.5rem;
}

/* [B-4] 마일스톤 세로 타임라인: 노드(16px 원) + 그라데이션 라인 + glow -by Sino 2026-08-28 @date 2026-08-28 */
.timeline {
    position: relative;
    padding-left: 2.5rem;
    max-width: 720px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--clr-primary), rgba(79, 195, 247, 0.15));
    border-radius: 1px;
}
.tl-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
    content: '';
    position: absolute;
    left: calc(-2.5rem + 1px);
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--clr-primary);
    border: 3px solid var(--clr-dark);
    box-shadow: 0 0 12px var(--glow-spread);
}
.tl-year {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--clr-accent);
    background: rgba(14, 114, 177, 0.18);
    border: 1px solid rgba(79, 195, 247, 0.3);
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 0.5rem;
}
.tl-title { color: #fff; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.tl-desc { color: var(--clr-muted); font-size: 0.9rem; margin: 0; }

/* ===================== Footer ===================== */
.footer {
    background: linear-gradient(135deg, var(--clr-dark-alt), var(--clr-dark));
    color: var(--clr-muted);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid rgba(79, 195, 247, 0.1);
}

/* ===================== Scroll Animations (reveal-on-scroll) ===================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.grid-3 .reveal { transition-delay: 0s; }
.grid-3 .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid-3 .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .navbar .container { padding: 0 1rem; gap: 0; }
    .brand { font-size: 1.3rem; }
    .nav-links { gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
    .nav-links a { font-size: 0.8rem; padding: 0.3rem 0; }

    /* [B-3] 모바일 오버라이드도 동일 방향(비율 1.5) 조정 -by Sino 2026-08-28 @date 2026-08-28 */
    h1 { font-size: 2.2rem; letter-spacing: -0.02em; }
    h2 { font-size: 1.6rem; letter-spacing: -0.01em; }

    .masthead h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
    .masthead p { font-size: 0.95rem; padding: 0 1rem; }

    .content-area { margin-top: calc(var(--nav-h) + 0.5rem); padding: 1.5rem 0; }
    .section { padding: 3rem 0; }

    .grid-3 { grid-template-columns: 1fr; gap: 1.25rem; }
    .card, .portfolio-card .p-info { padding: 1.25rem; }

    .masthead .btn { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

    .container { padding: 0 1rem; }
    .navbar.scrolled { height: 52px; }

    /* [P8] 모바일 드롭다운: hover 불가 → static 배치 + display 토글 (JS .open/호버 병행) -by Sino 2026-09-04 @date 2026-09-04 */
    .nav-dropdown-menu {
        position: static; transform: none;
        display: none; opacity: 1; visibility: visible;
        background: transparent; border: none; box-shadow: none; padding: 0;
        margin-top: 0;
    }
    .nav-dropdown-menu::before { display: none; } /* 화살표 (모바일: 불필요) -by Sino 2026-09-04 */
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown-menu li a { padding: 0.5rem; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .nav-links { gap: 0.35rem; }
    .nav-links a { font-size: 0.7rem; }
    .masthead h1 { font-size: 1.6rem; }
}

/* [A-1] prefers-reduced-motion: 접근성 기준 애니메이션/트랜지션 전체 정지 -by Sino 2026-08-28 @date 2026-08-28 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    /* reveal 요소는 JS 비관찰 시에도 노출 보장 (opacity:0 초기값 상시 해제) -by Sino 2026-08-28 @date 2026-08-28 */
    .reveal { opacity: 1 !important; transform: none !important; }

    /* [P12] 드롭다운/카드/백링크 트랜지션 정지 (reduced-motion) -by Sino 2026-09-04 @date 2026-09-04 */
    .nav-dropdown-menu, .nav-dropdown-toggle, .post-card, .post-backlink a, .post-sublinks li a {
        transition: none !important; animation: none !important;
    }
}

/* [P12] 드롭다운 포커스 가시성 (키보드) -by Sino 2026-09-04 @date 2026-09-04 */
.nav-dropdown-toggle:focus-visible, .nav-dropdown-menu a:focus-visible {
    outline: 2px solid var(--clr-accent); outline-offset: 2px;
}
