/*
Theme Name: Guide LJY Tech
Theme URI: https://blog.guide-ljy.com
Author: Guide LJY
Author URI: https://guide-ljy.com
Description: 클라우드, Linux, Windows Server 기술 문서를 위한 밝고 간결한 WordPress 테마입니다.
Version: 1.0.1
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: guide-ljy-tech
*/

:root {
  --ink: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --soft: #f6f8fb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --terminal: #101827;
  --code: #dbeafe;
  --radius: 14px;
  --shadow: 0 12px 35px rgba(15, 23, 42, .07);
  --content: 760px;
  --wide: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.container { width: min(calc(100% - 40px), var(--wide)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(226,232,240,.85); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--brand); font: 700 13px/1 ui-monospace, monospace; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.main-nav a { color: #475569; font-size: 14px; font-weight: 650; }
.header-search { display: flex; min-width: 220px; }
.header-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); outline: 0; }
.header-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.menu-toggle { display: none; margin-left: auto; border: 0; background: transparent; font-size: 24px; cursor: pointer; }

.hero { overflow: hidden; padding: 78px 0 62px; border-bottom: 1px solid var(--line); background: linear-gradient(145deg, #fff 30%, #eff6ff 100%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 70px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(38px, 6vw, 64px); line-height: 1.15; letter-spacing: -.055em; }
.hero-copy { max-width: 650px; margin: 22px 0 28px; color: var(--muted); font-size: 18px; }
.hero-search { display: flex; max-width: 610px; padding: 6px; border: 1px solid #cbd5e1; border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.hero-search input { min-width: 0; flex: 1; padding: 10px 13px; border: 0; outline: 0; }
.hero-search button { padding: 10px 18px; border: 0; border-radius: 9px; color: #fff; background: var(--brand); font-weight: 700; cursor: pointer; }
.terminal-card { padding: 18px; border: 1px solid #1e293b; border-radius: var(--radius); color: #cbd5e1; background: var(--terminal); box-shadow: 0 24px 60px rgba(15,23,42,.2); font: 14px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; transform: rotate(1.5deg); }
.terminal-bar { display: flex; gap: 7px; margin-bottom: 12px; }
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: #fb7185; }
.terminal-bar i:nth-child(2) { background: #fbbf24; }
.terminal-bar i:nth-child(3) { background: #34d399; }
.prompt { color: #60a5fa; }
.ok { color: #34d399; }

.section { padding: 58px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 25px; }
.section-head h2 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.more-link { color: var(--brand); font-size: 14px; font-weight: 700; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.category-card { min-height: 145px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .2s ease; }
.category-card:hover { color: inherit; border-color: #93c5fd; box-shadow: var(--shadow); transform: translateY(-2px); }
.category-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 18px; border-radius: 10px; color: var(--brand); background: #eff6ff; font: 800 12px/1 ui-monospace, monospace; }
.category-card strong { display: block; margin-bottom: 4px; }
.category-card small { color: var(--muted); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { display: flex; min-height: 245px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .2s ease; }
.post-card:hover { color: inherit; border-color: #bfdbfe; box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card .tag, .article-kicker { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.post-card h2, .post-card h3 { margin: 11px 0 10px; font-size: 20px; line-height: 1.45; letter-spacing: -.025em; }
.post-card p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.post-meta { display: flex; gap: 12px; margin-top: auto; color: #94a3b8; font-size: 12px; }
.post-meta span + span::before { margin-right: 12px; content: "·"; }

.page-header { padding: 58px 0 32px; border-bottom: 1px solid var(--line); }
.page-header h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.045em; }
.page-header p { margin: 10px 0 0; color: var(--muted); }
.archive-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 55px; padding: 48px 0 72px; }
.archive-list { display: grid; gap: 16px; }
.sidebar-box { position: sticky; top: 100px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.sidebar-box h2 { margin: 0 0 14px; font-size: 15px; }
.sidebar-box ul { margin: 0; padding: 0; list-style: none; }
.sidebar-box li + li { margin-top: 8px; }
.sidebar-box a { color: var(--muted); font-size: 14px; }
.pagination { margin-top: 30px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; }
.page-numbers.current { color: #fff; border-color: var(--brand); background: var(--brand); }

.article-header { padding: 65px 0 42px; border-bottom: 1px solid var(--line); background: var(--soft); }
.article-header-inner { max-width: 880px; }
.article-header h1 { max-width: 850px; margin: 10px 0 18px; font-size: clamp(36px, 6vw, 58px); line-height: 1.2; letter-spacing: -.055em; }
.article-summary { max-width: 720px; color: var(--muted); font-size: 18px; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--content)) 260px; gap: 70px; justify-content: center; padding: 52px 0 80px; }
.entry-content { min-width: 0; }
.entry-content h2, .entry-content h3 { scroll-margin-top: 100px; letter-spacing: -.03em; }
.entry-content h2 { margin: 2.4em 0 .7em; padding-bottom: .35em; border-bottom: 1px solid var(--line); font-size: 29px; }
.entry-content h3 { margin: 2em 0 .6em; font-size: 22px; }
.entry-content p { margin: 0 0 1.35em; }
.entry-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 24px 0; padding: 16px 20px; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; color: #475569; background: #eff6ff; }
.entry-content img { margin: 28px auto; border: 1px solid var(--line); border-radius: 10px; }
.entry-content table { width: 100%; margin: 28px 0; border-collapse: collapse; font-size: 14px; }
.entry-content th, .entry-content td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--soft); }
.entry-content pre { position: relative; overflow: auto; margin: 26px 0; padding: 48px 20px 20px; border-radius: 12px; color: var(--code); background: var(--terminal); font: 14px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; }
.entry-content code { padding: .14em .35em; border-radius: 5px; color: #1e40af; background: #eff6ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.entry-content pre code { padding: 0; color: inherit; background: none; }
.copy-code { position: absolute; top: 10px; right: 10px; padding: 5px 9px; border: 1px solid #334155; border-radius: 6px; color: #cbd5e1; background: #1e293b; font-size: 12px; cursor: pointer; }
.toc { position: sticky; top: 100px; align-self: start; padding-left: 20px; border-left: 1px solid var(--line); }
.toc-title { margin: 0 0 13px; font-size: 13px; font-weight: 800; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li + li { margin-top: 8px; }
.toc li.toc-h3 { padding-left: 13px; }
.toc a { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.toc a:hover, .toc a.is-active { color: var(--brand); }
.post-taxonomy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-taxonomy a { padding: 5px 10px; border-radius: 20px; color: var(--muted); background: var(--soft); font-size: 12px; text-decoration: none; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 35px; }
.post-navigation > div { min-width: 0; }
.post-navigation a {
  display: block;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: .2s ease;
}
.post-navigation a:hover { color: var(--brand-dark); border-color: #93c5fd; box-shadow: var(--shadow); }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }

#comments { margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); }
#comments h2,
#comments .comment-reply-title { margin: 0 0 18px; font-size: 24px; letter-spacing: -.03em; }
#comments > ol { margin: 0 0 34px; padding: 0; list-style: none; }
#comments .comment-body { margin-bottom: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
#comments .comment-meta { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
#comments .comment-content p:last-child { margin-bottom: 0; }
#comments .children { margin: 14px 0 0 24px; padding: 0; list-style: none; }
#comments .comment-form p { margin-bottom: 18px; }
#comments .comment-notes,
#comments .logged-in-as { color: var(--muted); font-size: 14px; }
#comments .logged-in-as a { color: var(--brand); }
#comments .comment-form-comment label { display: block; margin-bottom: 7px; font-weight: 700; }
#comments .required { color: #dc2626; }
#comments textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 14px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  outline: 0;
  resize: vertical;
}
#comments textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
#comments .form-submit { margin: 22px 0 0; }
#comments .submit {
  padding: 11px 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
#comments .submit:hover { background: var(--brand-dark); }

.empty-state { padding: 80px 0; text-align: center; }
.empty-state h1 { font-size: 40px; }
.site-footer { padding: 42px 0; border-top: 1px solid var(--line); color: var(--muted); background: var(--soft); font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-links { display: flex; gap: 18px; }
.screen-reader-text { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0,0,0,0); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .terminal-card { display: none; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: minmax(0, var(--content)); }
  .toc { display: none; }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-sidebar { display: none; }
  .header-search { display: none; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--wide)); }
  .header-inner { min-height: 62px; flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .main-nav { display: none; width: 100%; margin: -5px 0 14px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero { padding: 52px 0 44px; }
  .hero-copy { font-size: 16px; }
  .category-grid, .post-grid { grid-template-columns: 1fr; }
  .category-card { min-height: auto; }
  .post-card { min-height: 215px; }
  .section { padding: 42px 0; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .article-header { padding: 45px 0 30px; }
  .article-header h1 { font-size: 35px; }
  .article-layout { padding-top: 36px; }
  .post-navigation { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
