/* ── 본문용 라이트 테마 색상 변수 ── */
:root {
  --primary: #f8fafc;
  --secondary: #ffffff;
  --accent: #2563eb;
  --accent2: #059669;
  --text: #1e293b;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
}

/* ── 헤더/푸터/플로팅메뉴용 다크 테마 원본 색상 변수 ── */
:root {
  --nav-bg: rgba(10,22,40,0.95);
  --nav-bg-scrolled: rgba(10,22,40,0.98);
  --dark-bg: #0a1628;
  --dark-accent: #00c8ff;
  --dark-accent2: #00ff9d;
  --dark-text-muted: #8a9bb5;
  --dark-border: rgba(0,200,255,0.15);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans KR', sans-serif; background: var(--primary); color: var(--text); overflow-x: hidden; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: var(--dark-accent); border-radius:3px; }

/* ── NAV ── */
nav { position: fixed; top:0; left:0; right:0; z-index:1000; padding: 0 40px; height: 90px; display: flex; align-items:center; justify-content:space-between; background: var(--nav-bg); backdrop-filter: blur(20px); border-bottom: 1px solid var(--dark-border); transition: all 0.3s; }
nav.scrolled { height:80px; background: var(--nav-bg-scrolled); box-shadow: 0 4px 20px rgba(0,0,0,0.3); border-color: transparent; }

/* ── LOGO STYLING ── */
.nav-logo, .footer-logo { display: inline-flex; align-items: baseline; font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; letter-spacing: 1px; color: var(--dark-accent); text-decoration: none; text-transform: lowercase; transition: all 0.3s; position: relative; }
.footer-logo { font-size: 1.6rem; }
.en-edu { color: var(--dark-accent2); margin-left: 2px; transition: 0.3s ease; }
.ko-text { font-family: 'Noto Sans KR', sans-serif; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.5px; margin-left: 10px; background: linear-gradient(135deg, #ffffff 0%, var(--dark-text-muted) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; opacity: 0.85; transition: 0.3s; text-transform: none; }
.footer-logo .ko-text { font-size: 0.85rem; }
.nav-logo:hover, .footer-logo:hover { transform: translateY(-2px); text-shadow: 0 4px 20px rgba(0, 200, 255, 0.4); }
.nav-logo:hover .en-edu, .footer-logo:hover .en-edu { text-shadow: 0 4px 20px rgba(0, 255, 157, 0.4); }
.nav-logo:hover .ko-text, .footer-logo:hover .ko-text { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)); transform: scale(1.05) translateX(2px); }

/* ── GNB LINKS ── */
.nav-links { display:flex; gap:24px; list-style:none; }
.nav-links > li { position: relative; padding: 30px 0; }
.nav-links a { font-size: 1.1rem; font-weight: 700; letter-spacing:0.5px; color: var(--dark-text-muted); text-decoration:none; transition: color 0.2s; padding: 4px 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--dark-accent); }

.sub-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--nav-bg-scrolled); min-width: 150px; text-align: center; list-style: none; padding: 10px 0; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); border: 1px solid var(--dark-border); opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.nav-links > li:hover .sub-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-10px); }
.sub-menu li { padding: 0; }
.sub-menu a { display: block; padding: 12px 20px; font-size: 0.95rem; font-weight: 500; color: var(--dark-text-muted); transition: all 0.2s; }
.sub-menu a:hover { color: var(--dark-accent); background: rgba(0,200,255,0.05); }

.nav-toggle { display:none; flex-direction:column; gap:5px; cursor:pointer; background:none; border:none; }
.nav-toggle span { width:24px; height:2px; background:var(--dark-accent); display:block; transition:0.3s; }
.user-menu { display:flex; gap:12px; align-items:center; }
.btn-login { padding:8px 18px; border:1px solid var(--dark-accent); background: transparent; color:var(--dark-accent); border-radius:24px; font-size:0.9rem; font-weight: 600; text-decoration:none; transition:0.3s; }
.btn-login:hover { background:rgba(0,200,255,0.1); }

/* ── SUBPAGE HEADER ── */
.page-header { padding: 160px 40px 80px; background: linear-gradient(135deg, var(--dark-bg) 0%, #0f2442 100%); text-align: center; position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,200,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,200,255,0.05) 1px, transparent 1px); background-size: 40px 40px; z-index: 1; opacity: 0.5; }
.page-header-content { position: relative; z-index: 2; animation: fadeInUp 0.8s ease both; }
.page-title { font-size: 2.8rem; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: -1px; }
.page-subtitle { font-size: 1.15rem; color: var(--dark-text-muted); font-weight: 300; }

/* ── ARTICLE DETAIL SECTION ── */
.article-section { padding: 60px 40px 120px; max-width: 1000px; margin: 0 auto; animation: fadeInUp 0.8s 0.2s ease both; }

.article-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }

/* Header */
.article-header { border-bottom: 2px solid var(--border); padding-bottom: 24px; margin-bottom: 30px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: 700; background: rgba(37,99,235,0.1); color: var(--accent); margin-bottom: 12px; }
.article-title { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.4; word-break: keep-all; }
.article-meta { display: flex; gap: 16px; color: var(--text-muted); font-size: 0.95rem; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.article-meta .divider { color: var(--border); }

/* Body */
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--text); min-height: 300px; padding-bottom: 40px; }
.article-body h3 { font-size: 1.3rem; margin: 30px 0 15px; color: var(--text); font-weight: 700; }
.article-body p { margin-bottom: 16px; word-break: keep-all; }
.article-body ul { padding-left: 24px; margin-bottom: 20px; color: var(--text-muted); }
.article-body li { margin-bottom: 8px; }
.article-body img { max-width: 100%; border-radius: 8px; margin: 20px 0; border: 1px solid var(--border); }

/* Attachments */
.article-attachments { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 40px; }
.attachment-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.attachment-list { list-style: none; }
.attachment-list li { margin-bottom: 8px; }
.attachment-list li:last-child { margin-bottom: 0; }
.attachment-list a { color: var(--accent); text-decoration: none; font-size: 0.95rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.attachment-list a:hover { text-decoration: underline; color: #1d4ed8; }

/* Navigation (Prev/Next) */
.article-nav { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-nav ul { list-style: none; }
.article-nav li { display: flex; padding: 18px 20px; border-bottom: 1px dashed var(--border); align-items: center; }
.article-nav li:last-child { border-bottom: none; }
.nav-label { width: 80px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; font-size: 0.95rem; }
.nav-link { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1rem; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: 0.2s; }
.nav-link:hover { color: var(--accent); }
.nav-date { width: 100px; text-align: right; color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; }

/* Bottom Action */
.article-actions { text-align: center; margin-top: 40px; }
.btn-list { display: inline-block; padding: 14px 40px; background: var(--secondary); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-size: 1.05rem; font-weight: 700; text-decoration: none; transition: 0.3s; }
.btn-list:hover { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,0.03); transform: translateY(-2px); }

/* 수정 / 삭제 버튼 */
.btn-action-edit { display:inline-block; padding:8px 22px; background:#e8f4fd; color:#1a6fb5; border-radius:6px; font-size:0.92rem; font-weight:700; text-decoration:none; transition:0.2s; }
.btn-action-edit:hover { background:#1a6fb5; color:#fff; }
.btn-action-del  { display:inline-block; padding:8px 22px; background:#fdecea; color:#c0392b; border-radius:6px; font-size:0.92rem; font-weight:700; border:none; cursor:pointer; transition:0.2s; }
.btn-action-del:hover  { background:#c0392b; color:#fff; }

@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }

/* ── FOOTER ── */
footer { border-top:1px solid var(--dark-border); padding:40px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; background:var(--dark-bg); }
.footer-copy { font-size:0.85rem; color:var(--dark-text-muted); }

/* ── RESPONSIVE ── */
@media(max-width:900px) {
  nav { padding:0 20px; }
  .nav-links { display:none; flex-direction:column; position:absolute; top:80px; left:0; right:0; background:var(--nav-bg-scrolled); padding:20px; border-bottom:1px solid var(--dark-border); }
  .nav-links.open { display:flex; }
  .nav-links > li { padding: 10px 0; }
  .sub-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; background: rgba(0,0,0,0.2); display: none; margin-top: 10px; }
  .nav-toggle { display:flex; }
  
  .page-header { padding: 120px 20px 60px; }
  .article-section { padding: 40px 20px 80px; }
  .article-wrap { padding: 30px 20px; }
  
  .article-title { font-size: 1.5rem; }
  .article-nav li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav-date { text-align: left; }