/* ========== Theme Colors ========== */
:root{
  --bg:#0f172a;
  --panel:#111827;
  --border:#1f2937;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#7c3aed;
  --accent-2:#22d3ee;
  --success:#10b981;
  --danger:#ef4444;
}

/* ========== Base ========== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}
/* sticky header anchor offset */
:target::before{content:"";display:block;height:72px;margin-top:-72px}

body{
  background:
    radial-gradient(1200px 600px at 100% -200px, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(900px 500px at -10% -150px, rgba(124,58,237,.18), transparent 60%),
    var(--bg);
  color:var(--text);
  font:16px/1.65 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,'Noto Sans KR',Arial,sans-serif;
}

a{color:var(--accent-2);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:960px;margin:0 auto;padding:0 20px}

/* ==== Bold text fix ==== */
strong, b {
  font-weight: 800 !important;   /* 진짜 굵게 */
  color: var(--text) !important; /* 다크테마에서도 잘 보이게 */
}

/* ========== Header ========== */
.site-header{
  border-bottom:1px solid var(--border);
  background:rgba(15,23,42,.7);
  backdrop-filter:blur(8px);
  position:sticky;top:0;z-index:100;
}
.site-header .wrap{
  display:flex;justify-content:space-between;align-items:center;padding:12px 0;
}
.brand{font-weight:800;font-size:20px;color:#fff;text-decoration:none}
.nav{display:flex;gap:18px}
.nav a{color:#d1d5db;font-weight:600}
.nav a.active{border-bottom:2px solid var(--accent-2);color:#fff}

/* ========== Hero (Home only) ========== */
.hero{
  background:linear-gradient(135deg,rgba(124,58,237,.3),rgba(34,211,238,.25));
  padding:60px 0 50px;border-bottom:1px solid var(--border);text-align:center;
}
.hero h1{margin:0;font-size:42px;line-height:1.2}
.hero p{margin:10px 0 20px}
.hero h1,.hero p{color:var(--text)!important}
.cta{
  display:inline-block;padding:10px 20px;border-radius:9999px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#001014;font-weight:800;
}

/* ========== Card Shell ========== */
.page-card{
  background:var(--panel);border:1px solid var(--border);
  border-radius:16px;padding:28px;margin:28px 0 40px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}

/* ========== Kill Slate heading decorations everywhere ========== */
.page-card h1,.page-card h2,.page-card h3,
.pv-section h1,.pv-section h2,.pv-section h3,
.markdown-body h1,.markdown-body h2,.markdown-body h3{
  border:0!important;border-bottom:0!important;background:transparent!important;
  background-image:none!important;box-shadow:none!important;padding-bottom:0!important;
}
.pv-section h2{margin:8px 0 6px!important;font-weight:800;color:#cbd5e1}

/* Slate가 포스트 본문에 주는 흰 배경 방지 */
.markdown-body {
  background: transparent !important;
  color: var(--text) !important;
}

.markdown-body a{color:var(--accent-2)!important}

/* ========== Tag Buttons ========== */
.tag-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 20px}
.btn{
  display:inline-block;padding:8px 14px;border-radius:9999px;
  border:1px solid var(--border);color:var(--text);background:#0b1220;
  transition:background .15s ease,transform .05s ease;
}
.btn:hover{background:#1e293b}
.btn:active{transform:translateY(1px)}
.btn.active{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#001014;font-weight:700;
}
.btn.disabled{opacity:.4;pointer-events:none;text-decoration:line-through}

/* ========== Paper List ========== */
.paper-list{list-style:none;padding:0;margin:12px 0 24px}
.paper-list li{
  background:#0b1220;border:1px solid var(--border);
  border-radius:12px;padding:14px 16px;margin:10px 0;
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  transition: background .15s ease, border-color .15s ease;
}
.paper-list li:hover{ border-color:#334155; background:#0e1726; }
.paper-list .post-link{color:#93c5fd;font-weight:700}
.paper-list time{color:var(--muted);font-size:.9em}
.paper-list:empty{display:none}

/* ========== Content Elements ========== */
figure{margin:1.6em auto;text-align:center}
figure img{max-width:100%;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,.35)}
figure figcaption{font-size:.9em;color:var(--muted);margin-top:6px}
mark{background:#fde047;padding:0 4px;border-radius:3px;color:#111}

blockquote{
  border-left:4px solid var(--accent-2);padding:.6em 1em;margin:1.2em 0;
  background:rgba(34,211,238,.08);font-style:italic;color:#dbeafe;border-radius:10px;
}

code{background:#0b1220;border:1px solid var(--border);border-radius:6px;padding:0 .35em}
pre{
  background:#0b1220;border:1px solid var(--border);border-radius:12px;
  padding:14px 16px;overflow:auto;margin:14px 0;position:relative;
}
pre code{background:none;border:none;padding:0}

/* 표 라운딩 */
table{width:100%;border-collapse:collapse;margin:16px 0;border-radius:10px;overflow:hidden}
th,td{border:1px solid var(--border);padding:8px 10px}
th{background:#0b1220}

/* ========== Footer ========== */
.site-footer{
  color:var(--muted);padding:24px 0;border-top:1px solid var(--border);text-align:center;
}

/* ========== Sections spacing ========== */
.pv-section{margin-top:20px}

/* ---- Fix top titles: Paper Review / Foxy Scholar ---- */
.page-card h1, .page-card h1 a,
.page-card h2, .page-card h2 a,
.markdown-body h1, .markdown-body h1 a,
.markdown-body h2, .markdown-body h2 a{
  color: var(--text) !important;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding-bottom: 0 !important;
}
.page-card h1, .markdown-body h1{ font-size: 2rem !important; font-weight: 800 !important; }
.page-card h2, .markdown-body h2{ font-size: 1.6rem !important; font-weight: 800 !important; }
.markdown-body h1 .anchor, .markdown-body h2 .anchor { display:none !important; }

/* MathJax color in dark theme */
.mjx-container { color: var(--text) !important; }

/* ========== UX Enhancers (포스트 가독/기능) ========== */
/* 포스트 페이지 가독성 */
.is-post .wrap{ max-width: 820px; }
.is-post .page-card{ padding: 32px 28px; }
.is-post p{ line-height: 1.8; font-size: 1.05rem; }

/* 스크롤 진행막대 */
#progress{
  position:fixed;top:0;left:0;height:3px;width:100%;
  transform-origin:0 0;transform:scaleX(0);
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  z-index:9999;pointer-events:none;
}

/* 코드 복사 버튼 */
.copy-btn{
  position:absolute;top:8px;right:8px;
  background:#0b1220;color:#d1d5db;border:1px solid var(--border);
  border-radius:8px;padding:4px 8px;font-size:12px;cursor:pointer;
}
.copy-btn:hover{background:#1e293b}

/* 이미지 줌 (클릭 토글) */
img.zoomable{cursor:zoom-in;transition:transform .2s ease,box-shadow .2s ease}
img.zoomable.zoomed{
  position:fixed;top:50%;left:50%;
  transform:translate(-50%,-50%) scale(1.05);
  max-width:calc(100vw - 100px);max-height:calc(100vh - 100px);
  z-index:10000;cursor:zoom-out;box-shadow:0 30px 80px rgba(0,0,0,.6);
  border-radius:12px;
}
.no-scroll{overflow:hidden}

/* About 링크 리스트 */
.link-list{ list-style:none; padding:0; margin:8px 0 0; }
.link-list li{ margin:6px 0; }
.link-list a{ color:#93c5fd; font-weight:700; }
.link-list a:hover{ filter:brightness(1.15); text-decoration:none; }

/* ===== Section titles / 점선 제거 & 통일 ===== */
.section-title{
  display:flex; align-items:center; gap:10px;
  margin: 8px 0 10px; font-weight:800; letter-spacing:.2px;
  color: #cbd5e1;  /* 섹션 타이틀 색 */
  font-size: 1.05rem;
}
.section-title::before{
  content:""; width:18px; height:18px; border-radius:6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

/* 슬레이트가 그어주는 점선/밑줄 제거 */
.page-card h2, .page-card h3,
.markdown-body h2, .markdown-body h3{
  border:0 !important; background:none !important; box-shadow:none !important;
}
hr{ border:0; height:1px; background: var(--border); opacity:.7; }

/* ===== Home “Latest” 스타일 ===== */
.kicker{
  display:inline-block;
  font-weight:800;
  color:#a5b4fc;  /* <- 여기 색만 원하는 값으로 변경 (#60a5fa 등) */
  margin:6px 0 8px;
  letter-spacing:.3px;
}


/* ===== 카드/버튼 마감 ===== */
.home-card{
  background: rgba(17,24,39,.8);
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.tag-buttons .btn{
  background:#0e1726;
  border-color:#243244;
}
.tag-buttons .btn:hover{
  background:#142036;
}

/* ===== 리스트 가독성 보정 ===== */
ul.pretty{ list-style:none; padding-left:0; }
ul.pretty li{
  position:relative; padding-left:18px; margin:6px 0;
}
ul.pretty li::before{
  content:""; position:absolute; left:0; top:.62em;
  width:8px; height:8px; border-radius:3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:0 0 0 2px rgba(124,58,237,.12);
}

/* About 링크 뱃지(버튼 대신 라인형) */
.link-list{ list-style:none; padding:0; margin:8px 0 0; }
.link-list li{ margin:8px 0; }
.link-list a{
  color:#93c5fd; font-weight:700; border-bottom:1px dashed #375a7f;
}
.link-list a:hover{ border-bottom-style:solid; filter:brightness(1.15); text-decoration:none; }

/* 포스트 목록 hover 살짝 강조 */
.paper-list li{ transition: background .15s ease, border-color .15s ease; }
.paper-list li:hover{ background:#0e1726; border-color:#334155; }

/* Paper Review 필터 버튼 글자색 통일 */
.tag-buttons .btn,
.tag-buttons a.btn:link,
.tag-buttons a.btn:visited{
  color: var(--text) !important;
}

/* 활성 버튼도 밝은 글자 + 살짝 가독성 보정 */
.tag-buttons .btn.active{
  color: #ffffff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

.post-content li > p { margin: 0; }
.post-content ol li, .post-content ul li { color: inherit; opacity: 1; }

/* 헤딩 색/두께 보정 (h3/h4도 강하게) */
.page-card h3, .markdown-body h3,
.page-card h4, .markdown-body h4 {
  color: var(--text) !important;
  font-weight: 800 !important;
}

/* 리스트 가독성 보정(불투명도 1, 글자색 상속) */
.markdown-body ul li, .markdown-body ol li {
  color: inherit !important;
  opacity: 1 !important;
}

/* 리스트 안 수식도 밝게 */
.mjx-container { color: var(--text) !important; }

/* 헤딩/리스트 가독성 보정 */
.markdown-body h3, .markdown-body h4 { 
  color: var(--text) !important; 
  font-weight: 800 !important; 
}
.markdown-body ul li, .markdown-body ol li { 
  color: inherit !important; 
  opacity: 1 !important; 
}
/* 수식도 밝게 */
.mjx-container { color: var(--text) !important; }
